Jump to content

Staffelkorting op productpagina


Recommended Posts

Hallo, op mijn productpagina maak ik gebruik van speciale prijzen. Nu staat dit in een tabel met bijv.

 

Aantal (50, 100, 500, 1000 etc.)

Korting (-20%, -33.33%, -40%, -46.67% etc.)

 

Wat ik graag wil is dat hier ook de stukprijs word weergeven. (€8, €6, €4, €2 etc.) 

Uiteindelijk moet de tabel er dan dus zo uitzien: 

 

Aantal (50, 100, 500, 1000 etc.)

Korting (-20%, -33.33%, -40%, -46.67% etc.)

Stukprijs (€8, €6, €4, €2 etc.) 

 

Of dat in de kolom van Korting bijv. staat:

€ 2,50 per stuk. u bespaart 17%
€ 2,00 per stuk. u bespaart 34%
€ 1,80 per stuk. u bespaart 40%
€ 1,60 per stuk. u bespaart 47%
€ 1,40 per stuk. u bespaart 54%
 
Hieronder is het stukje code van de tabel uit de product.tpl van mijn theme:
<table class="table table-bordered table-hover std shop_table footable ">
    <thead>
        <tr>
            <th data-class="expand">{l s='Product'}</th>
            <th data-hide="phone">{l s='From (qty)'}</th>
            <th data-hide="phone">{l s='Discount'}</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}">
            <td>
                {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
                    {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
                {else}
                    {$product->getProductName($quantity_discount.id_product)}
                {/if}
            </td>
            <td>{$quantity_discount.quantity|intval}</td>
            <td>
                {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
                   -{convertPrice price=$quantity_discount.real_value|floatval}
               {else}
                   -{$quantity_discount.real_value|floatval}%
               {/if}
            </td>
        </tr>
        {/foreach}
    </tbody>
</table>

Kan iemand mij hier mee helpen? Ik gebruik trouwens PrestaShop 1.6.0.9

Hier onder nog een screenshot van mijn tabel nu:

tabel_product_page.jpg

 

Link to comment
Share on other sites

×
×
  • Create New...