Guest User

Untitled

a guest
Apr 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. <section class="page-product-box">
  2. <h3 class="page-product-heading">{l s='Volume discounts'}</h3>
  3. <div id="quantityDiscount">
  4. <table class="std table-product-discounts">
  5. <thead>
  6. <tr>
  7. <th>{l s='Quantity'}</th>
  8. <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th>
  9. <th>{l s='You pay'}</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
  14. <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}">
  15. <td>
  16. {$quantity_discount.quantity|intval}
  17. </td>
  18. <td>
  19. {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  20. {if $display_discount_price}
  21. {convertPrice price=$quantity_discount.real_value|floatval}
  22. {else}
  23. {convertPrice price=$quantity_discount.real_value|floatval}
  24. {/if}
  25. {else}
  26. {convertPrice price=(( (100 - $quantity_discount.real_value|floatval) * $productPrice / 100)|round:2)}
  27.  
  28. {/if}
  29. </td>
  30. <td>
  31. <span>{l s=''}</span>
  32. {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  33. {$discountPrice=$productPrice-$quantity_discount.real_value|floatval}
  34. {else}
  35. {$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval}
  36. {/if}
  37. {$discountPrice=$discountPrice*$quantity_discount.quantity}
  38. {$qtyProductPrice = $productPrice*$quantity_discount.quantity}
  39. {convertPrice price=(( (100 - $quantity_discount.real_value|floatval) * $productPrice / 100)|round:2)*$quantity_discount.quantity}
  40. </td>
  41. </tr>
  42. {/foreach}
  43. </tbody>
  44. </table>
  45. </div>
  46. </section>
Add Comment
Please, Sign In to add comment