0

我运行使用 SMARTY 的 Prestashop 1.5。显示数量折扣时,它们不会按逻辑顺序显示。

我想按以下顺序排列它们:

先 1 个单位 然后
2 个单位 然后
3 个单位 然后
4 个单位 然后
5 个单位

而不是按照我添加它们的顺序,现在就是这种情况。任何人都可以帮忙吗?

兄弟,
托拜厄斯

我试过 |@array_reverse 但它似乎不起作用......

当前代码:
................................
{if $quantity_discounts}
{foreach from=$quantity_discounts item='quantity_discount '名称='数量折扣'}

xxxxx

{/foreach}
{/if}

4

1 回答 1

1

在 Classes/specificprice.php 第 293 行:
更改:

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

进入:

ORDER BY `id_product_attribute` DESC, `from_quantity` ASC, `id_specific_price_rule` ASC, `score` DESC
于 2013-12-16T22:54:00.070 回答