Jump to content

Quantity Discount on product page


Recommended Posts

Hi, on my product page I use special prices. Now it shows quantity (50, 100, 500, 1000 etc.) and it shows discount in percentage (-20%, -33.33%, -40%, -46.67% etc.)

 

What I want is for each to show the unit price.. ($8, $6, $4, $2 etc.) 

 

Below is the part of code from product.tpl:

<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>

Can someone help me on what to add to get this done?

Link to comment
Share on other sites

  • 2 months later...

Maybe I can help you.

I created for couple of customers specific view for quantity discount.

Instead of showing %discount it shows the item price and how much you save.

See attachment and let me know if this is what you mean.

 

 

 

That's exactly what I mean!  :rolleyes:

I send you a PM.

Link to comment
Share on other sites

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...