我运行的是Prestashop 1.5,它使用SMARTY。当显示数量折扣时,它们不会按逻辑顺序显示。
我想按这个顺序排列它们:
然后是第一个1单元
那么2个单位
然后是3个单位
那么4个单位
5个单元
而不是按照我添加它们的顺序,这是现在的情况。一个人能帮上忙吗?
Br
托比亚斯
我试过使用|@array_reverse,但似乎不起作用……
当前代码:
..
{if $quantity_discounts}
{foreach from=$quantity_discounts =‘quantity_discount’name='quantity_discounts'}
xxxxx
{/foreach}
{/if}
发布于 2013-12-17 06:54:00
在#293行的Classes/speicprice.php中:
更改:
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` DESChttps://stackoverflow.com/questions/13336153
复制相似问题