Add Customer Into Price Group#
Description#
Insert Customer Into Price Group
Snippet#
<mvt:if expr="g.Basket:cust_id GT 0">
<mvt:do name="l.return" file="g.Module_Feature_PGR_DB" value="PriceGroup_Load_Name( 'Test', l.pricegroup )" />
<mvt:if expr="l.return EQ 1">
<mvt:do name="l.exists" file="g.Module_Feature_PGR_DB" value="PriceGroupXCustomer_Load( l.pricegroup:id, g.Basket:cust_id, l.null )" />
<mvt:do name="l.eof" file="g.Module_Library_DB" value="Error_Is_EOF()" />
<mvt:if expr="NOT l.exists AND ( l.eof )">
<mvt:do name="l.insert" file="g.Module_Feature_PGR_DB" value="PriceGroupXCustomer_Insert( l.pricegroup:id, g.Basket:cust_id )" />
Customer added to price group:
<mvt:if expr="l.insert">
Success
<mvt:else>
Failed
</mvt:if>
</mvt:if>
</mvt:if>
</mvt:if>
Functions Used#
PriceGroup_Load_Name
PriceGroupXCustomer_Load
PriceGroupXCustomer_Insert