kugi Posted August 21, 2012 Share Posted August 21, 2012 (edited) 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> Edited August 25, 2012 by kugi (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted August 25, 2012 Share Posted August 25, 2012 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' 1 Link to comment Share on other sites More sharing options...
kugi Posted August 25, 2012 Author Share Posted August 25, 2012 Thanks Shacker you are a star Link to comment Share on other sites More sharing options...
shacker Posted August 25, 2012 Share Posted August 25, 2012 your welcome. Please change the post title to solved Link to comment Share on other sites More sharing options...
Recommended Posts