Hey Nick thanks for this answer!
This is exactly what I was looking for! I had been scouring for a solution but never found anything on how to call the price group module like that. Much appreciated.
Will also keep those snippets in mind over there on CACHER.
Announcement
Collapse
No announcement yet.
Return which Price Groups are assigned to a logged in customer
Collapse
X
-
Here is a link to a snippet that will get you the information needed.Originally posted by MGWben View PostNot sure how to view variables for a customer regarding which specific Price Groups may or may not be assigned to that logged in customer. I see there is a global var [g.customer:pgrpcount] that returns the number of Price Groups attached to a customer but nothing on the Price Group's ID.
Is there a way to call this info based on the logged in customer?
https://snippets.cacher.io/snippet/5bbdcccc1a67269615d7
This snippet is checking if there is a logged in customer then using the PriceGroupAndModuleList_Load_Customer function pulling all the price groups that the customer is assigned and adding it to the g.PriceGroups array. Then if there are price groups assigned it loops through the price groups. There is an added conditional in the snippet that checks for specific price groups if that is something you needed.
Let me know if you have any questions about the snippet.
- 1 like
Leave a comment:
-
Return which Price Groups are assigned to a logged in customer
Not sure how to view variables for a customer regarding which specific Price Groups may or may not be assigned to that logged in customer. I see there is a global var [g.customer:pgrpcount] that returns the number of Price Groups attached to a customer but nothing on the Price Group's ID.
Is there a way to call this info based on the logged in customer?Tags: None
Leave a comment: