I need to display a message next to a product in a Price Group, but only to customers in that Price Group
This code puts the message next to only products in the Price Group but shows the message to everyone:
This shows the message to only those in the Price Group, but shows it next to every product:
This one is just a bit beyond me (but will probably make perfect sense when I see it).
Note: I do not know why one uses l.price_group and one uses l.pricegroup
Thanks,
Leslie
This code puts the message next to only products in the Price Group but shows the message to everyone:
Code:
<mvt:do file="g.Module_Feature_PGR_DB" name="l.ok" value="PriceGroup_Load_Name( 'Barrys_Tea_10_1', l.price_group )" /> <mvt:if expr="l.price_group:id GT 0"> <mvt:do file="g.Module_Feature_PGR_DB" name="l.b" value="PriceGroupXProduct_Load( l.price_group:id , l.settings:product:id, l.settings:pricegroupvar )" /> <mvt:if expr="NOT ISNULL l.settings:pricegroupvar"> <span class="category-product-flag volume">Barry's Deal</span> </mvt:if> </mvt:if> <mvt:assign name="l.settings:pricegroupvar" value="''"/>
Code:
<mvt:if expr="g.Basket:cust_id"> <mvt:do name="l.result" file="g.Module_Feature_PGR_DB" value="PriceGroup_Load_Name( 'Barrys_Tea_10_1', l.pricegroup )" /> <mvt:if expr="l.result"> <mvt:do name="l.exists" file="g.Module_Feature_PGR_DB" value="PriceGroupXCustomer_Load( l.pricegroup:id, g.Basket:cust_id, l.null )" /> <mvt:if expr="l.exists"> <mvt:assign name="g.basket:customer:Barrys_Tea_10_1" value="1" /> </mvt:if> </mvt:if> </mvt:if> <mvt:if expr="g.basket:customer:Barrys_Tea_10_1"> <span class="category-product-flag volume">BARRY'S DEAL</span> </mvt:if>
Note: I do not know why one uses l.price_group and one uses l.pricegroup
Thanks,
Leslie
Comment