Little help function getDirectSalesPrice()

Hi. I do really need your help. I am trying to modify the data returned in function getDirectSalesPrice() using a condition. If the value of user_group_id in user_user_groups is, for example 777 then the function getDirectSalesPrice() returns 0, else, it returns its real value. The matter is that despite of the time and research I have been made, i’m still not able to get the value of user_group_id; in all my attempts, my variable get null. Could you please give me a hint of something that I can use?

BTW. I’m using version1.1.1-1
The path of the function is:

Thank you very much in advice,
William Ortiz.
Biteca Ltda.

Hi @William_Ortiz,

Are you trying to look up the user groups for the current user? There may be several, so you’ll have to figure out a way to choose which is most appropriate.

Alec Smecher
Public Knowledge Project Team