Prestashop:在product-list.tpl中显示产品位置编号

时间:2017-10-19 16:37:48

标签: php smarty prestashop-1.7

我有一个特殊类别并手动更改产品的位置。我想在product-list.tpl中显示位置编号。如果我在后台排序产品,那么也想要更改前端的数字。

我在这样的前端尝试:

{if $product.id_category_default == '1'}
    <p class="ranking">{$product.id_product.position}</p>
{/if}

但Smarty没有工作。还有另外一种选择吗?

我正在使用Prestashop 1.7。

0 个答案:

没有答案
相关问题