0

I run Prestashop 1.5 which uses SMARTY. When Quantity discounts are shown, they do not show 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

I have tried with |@array_reverse but it doens't seem to work...

CURRENT CODE:
................................
{if $quantity_discounts}
{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

xxxxx

{/foreach}
{/if}

1 Answer 1

1

In Classes/specificprice.php On line #293:
Change:

ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC

Into:

ORDER BY `id_product_attribute` DESC, `from_quantity` ASC, `id_specific_price_rule` ASC, `score` DESC
Sign up to request clarification or add additional context in comments.

1 Comment

You should copy the file and place it in the override/classes/ folder and make changes there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.