{convertPrice 价格=$product.price} 在 prestashop 1.7 中不起作用

{convertPrice price=$product.price} does not work in prestashop 1.7

这是错误:

Syntax error in template "file: / home / quetupec / public_html / clonpresta / modules / loyalty / views / templates / hook / shopping-cart .tpl "on line 32" {ls = 'that can be converted to a voucher of' mod = 'loyalty'} {convertPrice price = $ voucher} {if isset ($ guest_checkout) && $ guest_checkout} * {/ if}.
"unknown tag 'convertPrice'

我已经尝试过另一个 Tools::displayPrice,但我认为它在 1.7.6 中已被弃用。

有人解决过这个问题吗?

在 Prestashop 1.7* 中,您不需要使用任何 smarty 或 php 功能。所有必要的数据都已传输到包含产品信息的阵列中的模板。所以只要使用 $product.price 你就会得到已经转换的字符串。另外请注意,PS 1.6* 和 PS 1.7* 模板和一些模块在店面中不兼容。