Código:
{if $quantity_discounts} <div id="idTab5" class="rte"> {if $quantity_discounts} <!-- quantity discount --> <div id="quantityDiscount"> <table class="std"> <tr><th></th> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <th>{$quantity_discount.quantity|intval} {if $quantity_discount.quantity|intval > 1} {l s='packs'} {else} {l s='pack'} {/if} </th> {/foreach} </tr> <tr> <td> <b>Pack Price</b></td> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <td> {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} {convertPrice price=$productPrice-$quantity_discount.real_value|floatval} {else} -{$quantity_discount.real_value|floatval}% {/if} </td> {/foreach} </tr> <tr> <td><b>Save</b></td> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <td> {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} {round((($quantity_discount.real_value/$productPrice)*100), 2)|floatval}% {else} -{$quantity_discount.real_value|floatval}% {/if} </td> {/foreach} </tr> <tr> <td><b>Total Cost</b></td> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <td> {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} {convertPrice price=(($productPrice-$quantity_discount.real_value)*$quantity_discount.quantity)} {else} -{$quantity_discount.real_value|floatval}% {/if} </td> {/foreach} </tr> </table> </div> {/if} </div> {/if}