The following information will tell you how to use quantity break tokens in a template.
Step-by-step guide
The following table shows the tokens that can be used in a template to retrieve quantity break information for the current product:
Token | Data Type Returned | Description |
---|---|---|
HasQuantityBreaks | bool (true/false) | Whether or not the current product has quantity breaks defined. |
QuantityBreaks | QuantityBreakInformation* (see below) | A list of all the quantity breaks for the current product. Prices are INC or EX tax, determined by settings on the customer. |
QuantityBreaksExGST | QuantityBreakInformation* (see below) | A list of all the quantity breaks for the current product. Prices are EX tax. |
QuantityBreaksIncGST | QuantityBreakInformation* (see below) | A list of all the quantity breaks for the current product. Prices are INC tax. |
QuantityBreakInformation - a list of quantity breaks that include the following fields:
Field | Data Type | Description |
---|---|---|
Break | int (integer) | The starting quantity break number. |
BreakEnd | int (integer) | The ending quantity break number. |
Price | decimal | The price of the quantity break. |
BreakRange | string | A formatted representation of the quantity range values. |
Example template that shows the quantity breaks for a product:
<h3>[Product.Description] ([Product.ProductCode] | [Product.CustomerProductCode])</h3> <hr /> <h5>Quantity Breaks</h5> Product.HasLiveQuantityBreaks = [Product.HasLiveQuantityBreaks]<br /> Product.HasQuantityBreaks = [Product.HasQuantityBreaks]<br /> <table border="1" style="border-collapse: collapse"> <tr> <th>Type</th> <th>Range</th> <th>Price</th> <th>All properties</th> </tr> <!--CSSREPEAT:Product--> <!--CSSREPEAT:Product.LiveQuantityBreaks--> <tr> <td>LIVE</td> <td>[Product.LiveQuantityBreaks.BreakRange]</td> <td>$ [Product.LiveQuantityBreaks.Price]</td> <td> [Product.LiveQuantityBreaks.Break]<br /> [Product.LiveQuantityBreaks.BreakEnd]<br /> $ [Product.LiveQuantityBreaks.Price]<br /> [Product.LiveQuantityBreaks.BreakRange]<br /> </td> </tr> <!--CSSENDREPEAT:Product.LiveQuantityBreaks--> <!--CSSREPEAT:Product.QuantityBreaks--> <tr style="background-color: #FFEEEE"> <td>NON-LIVE</td> <td>[Product.QuantityBreaks.BreakRange]</td> <td>$ [Product.QuantityBreaks.Price]</td> <td> [Product.QuantityBreaks.Break]<br /> [Product.QuantityBreaks.BreakEnd]<br /> $ [Product.QuantityBreaks.Price]<br /> [Product.QuantityBreaks.BreakRange]<br /> </td> </tr> <!--CSSENDREPEAT:Product.QuantityBreaks--> <!--CSSREPEAT:Product.QuantityBreaksIncGST--> <tr style="background-color: #CCFFCC"> <td>NON-LIVE IncGST</td> <td>[Product.QuantityBreaksIncGST.BreakRange]</td> <td>$ [Product.QuantityBreaksIncGST.Price]</td> <td> [Product.QuantityBreaksIncGST.Break]<br /> [Product.QuantityBreaksIncGST.BreakEnd]<br /> $ [Product.QuantityBreaksIncGST.Price]<br /> [Product.QuantityBreaksIncGST.BreakRange]<br /> </td> </tr> <!--CSSENDREPEAT:Product.QuantityBreaksIncGST--> <!--CSSREPEAT:Product.QuantityBreaksExGST--> <tr style="background-color: #CCCCFF"> <td>NON-LIVE ExGST</td> <td>[Product.QuantityBreaksExGST.BreakRange]</td> <td>$ [Product.QuantityBreaksExGST.Price]</td> <td> [Product.QuantityBreaksExGST.Break]<br /> [Product.QuantityBreaksExGST.BreakEnd]<br /> $ [Product.QuantityBreaksExGST.Price]<br /> [Product.QuantityBreaksExGST.BreakRange]<br /> </td> </tr> <!--CSSENDREPEAT:Product.QuantityBreaksExGST--> <!--CSSENDREPEAT:Product--> </table>