PricingTier SFO
Properties
Methods
Method | Signature | Comments/Sample |
|---|---|---|
|
|
|
| BigDecimal |
|
|
| returns cost in local currency. |
| BigDecimal | local currency in numeric format |
|
| returns the currency code of the item |
|
|
|
| VolumeDiscount |
|
Method | Signature | Comments/Sample |
|---|---|---|
|
|
|
| BigDecimal |
|
|
| returns cost in local currency. |
| BigDecimal | local currency in numeric format |
|
| returns the currency code of the item |
|
|
|
| VolumeDiscount |
|
The pricing tiers are usually iterated through to list out the prices or find the cheapest price.
## list out the pricing tier costs <table> <tr><th>Pricing Tier Name</th><th>Cost</th></tr> #foreach ($pt in $item.getPricingTiers()) <tr><td>$pt.getName()</td><td>$pt.getCost()</td></tr> #end </table>The pricing tiers have their volume discounts, which are often accessed directly from the $item rather than going through the pricing tiers.
## figure the lowest tier cost #set ($lowest_price=$item.getCost()) #foreach ($d in $item.getVolumeDiscounts()) #if ($d.getUnitCost() < $lowest_price) found a lower cost: ${d.getUnitCost()} ## this will print on the web page as a debugging aid. #set ($lowest_price=$d.getUnitCost()) #end #end