tobbecokta Posted October 14, 2012 Share Posted October 14, 2012 Hi, I run Prestashop 1.5. When Quantity discounts are shown, they do not shown in logical order. I would like to arrange them in this order: first 1 unit then 2 units then 3 units then 4 units then 5 units Instead of in the order i added them, which is the case now. Can anoyone help? Br, Tobias Link to comment Share on other sites More sharing options...
tobbecokta Posted October 15, 2012 Author Share Posted October 15, 2012 Hi again, Does anyone have a clue how to fix this? Please help then! Br, Tobias Link to comment Share on other sites More sharing options...
tobbecokta Posted October 29, 2012 Author Share Posted October 29, 2012 Hi! I would really appreciate help on this one. Anyone who can spare a few minutes for this? Link to comment Share on other sites More sharing options...
tobbecokta Posted November 6, 2012 Author Share Posted November 6, 2012 Hi all! I give this one more shot! I would really appreciate if i can get some help on this.. I would like to sort the quantity discounts in ascending order! But how to? Br, Tobias Link to comment Share on other sites More sharing options...
Big_Berny Posted January 4, 2013 Share Posted January 4, 2013 (edited) A bit late, but I just found an easy solution: Open "product.tpl" from your theme and replace the line {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} with {foreach from=$quantity_discounts|@array_reverse item='quantity_discount' name='quantity_discounts'} Another solution would be to modify a class (SpecificPrice.php I think) but the above solution is much safer IMHO. Edited January 4, 2013 by Big_Berny (see edit history) 8 Link to comment Share on other sites More sharing options...
plb Posted February 26, 2013 Share Posted February 26, 2013 That's great Big_Berny, thanks a lot! It works v1.5.3.1 cheers Link to comment Share on other sites More sharing options...
fats2005 Posted August 30, 2013 Share Posted August 30, 2013 Thanks a lot!! Works perfectly Link to comment Share on other sites More sharing options...
ReyStub Posted February 24, 2014 Share Posted February 24, 2014 Thank you very much Big_Berny, it works perfectly well with 1.5.6.1. I am delighted, my client too. Link to comment Share on other sites More sharing options...
hhcj Posted May 13, 2015 Share Posted May 13, 2015 Thank you very much Big Berny, works fine!! Link to comment Share on other sites More sharing options...
Ugo Fontana Posted June 14, 2016 Share Posted June 14, 2016 (edited) NICE! but now i have 1pz. 5pz. 25.pz could i have a reverse order? from bigger quantity to smaller? i'd like 50 pz. 25 pz. 5 pz. |SOLVED| i'm using the QUANTITYDISCOUNTS Free Module (a nice module to show discounts in your cart before the base price) So i have not to modify product.tpl but quantitydiscounts.tpl search this {foreach from=$qd_quantity_discounts item='qd_quantity_discount' name='quantity_discounts'} and just add |@array_reverse after FROM command {foreach from=$qd_quantity_discounts|@array_reverse item='qd_quantity_discount' name='quantity_discounts'} Same as Big_Berny said. Edited June 14, 2016 by Ugo Fontana (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now