Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section class="page-product-box">
- <h3 class="page-product-heading">{l s='Volume discounts'}</h3>
- <div id="quantityDiscount">
- <table class="std table-product-discounts">
- <thead>
- <tr>
- <th>{l s='Quantity'}</th>
- <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th>
- <th>{l s='You pay'}</th>
- </tr>
- </thead>
- <tbody>
- {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
- <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}" data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value|floatval}" data-discount-quantity="{$quantity_discount.quantity|intval}">
- <td>
- {$quantity_discount.quantity|intval}
- </td>
- <td>
- {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
- {if $display_discount_price}
- {convertPrice price=$quantity_discount.real_value|floatval}
- {else}
- {convertPrice price=$quantity_discount.real_value|floatval}
- {/if}
- {else}
- {convertPrice price=(( (100 - $quantity_discount.real_value|floatval) * $productPrice / 100)|round:2)}
- {/if}
- </td>
- <td>
- <span>{l s=''}</span>
- {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
- {$discountPrice=$productPrice-$quantity_discount.real_value|floatval}
- {else}
- {$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval}
- {/if}
- {$discountPrice=$discountPrice*$quantity_discount.quantity}
- {$qtyProductPrice = $productPrice*$quantity_discount.quantity}
- {convertPrice price=(( (100 - $quantity_discount.real_value|floatval) * $productPrice / 100)|round:2)*$quantity_discount.quantity}
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- </div>
- </section>
Add Comment
Please, Sign In to add comment