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

时间:2019-07-16 05:40:11

标签: prestashop smarty prestashop-1.7

这是错误:

  

模板“文件中的语法错误:/ home / quetupec / public_html / clonpresta /模块/忠诚度/视图/模板/挂钩/购物车.tpl“在线32” {ls ='可以转换为凭证of'mod ='loyalty'} {convertPrice价格= $优惠券} {如果isset($ guest_checkout)&& $ guest_checkout} * {/ if}。
“未知标签'convertPrice'

我尝试了另一种类似Tools::displayPrice的方法,但我认为1.7.6中已弃用该方法。

有人在解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

在Prestashop 1.7 *中,您不需要使用任何smarty或php函数。所有必要的数据已经传输到带有产品信息的阵列内的模板中。因此,只需使用$ product.price,您将获得已转换的字符串。另外,请注意,PS 1.6 *和PS 1.7 *模板以及某些模块在店面中不兼容。