Pricegroup Examples



Load All Pricegroups.
<mvt:item name="ry_toolbelt" param="pricegroup|Load_All|g.pcount" />
<mvt:if expr="g.pcount GT 0">
  <mvt:foreach iterator="pricegroup" array="pricegroups">
    &mvt:pricegroup:id;, &mvt:pricegroup:name; &mvt:pricegroup:discount;,
    &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
  </mvt:foreach>
</mvt:if>
 
Load a Pricegroup by Name.
<mvt:item name="ry_toolbelt" param="pricegroup|Load_Name|g.pg_found|prgp_name_exprsn" />
<mvt:if expr="pg_found">
  &mvt:pricegroup:id;, &mvt:pricegroup:name;, &mvt:pricegroup:discount;,
  &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
</mvt:if>
 
Load a comma separated list of Pricegroup Names.
<mvt:item name="ry_toolbelt" param="pricegroup|Load_Name|g.pg_found|prgp_name_list" />
<mvt:if expr="g.pg_found">
  <mvt:foreach iterator="pricegroup" array="pricegroups">
    &mvt:pricegroup:id;, &mvt:pricegroup:name; &mvt:pricegroup:discount;,
    &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
  </mvt:foreach>
</mvt:if>
 
Determine all Pricegroups a logged in customer is assigned to. Internally uses g.basket:cust_id
<mvt:item name="ry_toolbelt" param="pricegroup|Customer_Groups|g.count" />
<mvt:if expr="g.count GT 0">
  <mvt:foreach iterator="pricegroup" array="cust_pricegroups">
    &mvt:pricegroup:id;, &mvt:pricegroup:name; &mvt:pricegroup:discount;,
    &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
  </mvt:foreach>
</mvt:if>
 
Determine if a customer is in a price group.
<mvt:item name="ry_toolbelt" param="pricegroup|Customer_Find|g.pg_found|prgp_name_exprsn" />
<mvt:if expr="g.pg_found">
  &mvt:pricegroup:id;, &mvt:pricegroup:name;, &mvt:pricegroup:discount;,
  &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
</mvt:if>
 
Add a customer to a price group. Returns a 1 if successful or 0.
<mvt:item name="ry_toolbelt" param="pricegroup|Customer_Insert|g.result|prgp_name_exprsn" />
<mvt:if expr="g.result">
  Customer inserted into price group.
</mvt:if>
 
Delete a customer from a price group. Returns a 1 if successful or 0.
<mvt:item name="ry_toolbelt" param="pricegroup|Customer_Delete|g.result|prgp_name_exprsn" />
<mvt:if expr="g.result">
  Customer deleted from price group.
</mvt:if>
 
Determine all price groups a product is in.
<mvt:item name="ry_toolbelt" param="pricegroup|Product_Groups|g.count|product_code_exprsn" />
<mvt:if expr="g.count GT 0">
  <mvt:foreach iterator="pricegroup" array="prod_pricegroups">
    &mvt:pricegroup:id;, &mvt:pricegroup:name; &mvt:pricegroup:discount;,
    &mvt:pricegroup:markup;, &mvt:pricegroup:rate; <br>
  </mvt:foreach>
</mvt:if>
 
Determine if a Product is in a price group. Returns a 1 if found or 0
<mvt:item name="ry_toolbelt" param="pricegroup|Product_Find|g.found|prgp_name_exprsn|product_code_exprsn" />
<mvt:if expr="g.result">
  Product is in the group.
</mvt:if>
 
Add a product to a price group. Returns a 1 if successful or 0.
<mvt:item name="ry_toolbelt" param="pricegroup|Product_Insert|g.result|prgp_name_exprsn|product_code_exprsn" />
<mvt:if expr="g.result">
  Product added to the group.
</mvt:if>
 
Delete a product to a price group. Returns a 1 if successful or 0.
<mvt:item name="ry_toolbelt" param="pricegroup|Product_Delete|g.result|prgp_name_exprsn|g.product_code_exprsn" />
<mvt:if expr="g.result">
  Product deleted from the group.
</mvt:if>