Jump to content

[SOLVED] quantity discount display "help"


Recommended Posts

Hi, I have in the quantity discounts tab a display of the discounts as you can see in the image. The problem is that displays the discounts from 30 to 10 when it should be from 10 to 30.... any ideas???

 

Here is the code....

 

 

<td><b>Discount Applied</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>

post-388672-0-15899800-1345580116_thumb.jpg

Edited by kugi (see edit history)
Link to comment
Share on other sites

this is becouse is orderer in desc mode.

In classes, open que QuantityDiscounts.php file

 

you get

public static function getQuantityDiscounts($id_product, $price, $usetax = true)

 

Change

 

ORDER BY dq.`quantity` ASC'

 

to

 

ORDER BY dq.`quantity` DESC'

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...