当前我的Prestashop商店中的wishlist模块仅显示产品图像和标题。有两个愿望清单视图,客户帐户视图和共享链接视图。我想在这两个视图中显示价格。我试着加入在Prestashop Wishlist模块中显示产品价格
$price = Product::getPriceStatic($productid);
到managewishlist.php的不同部分,增加
<span id="our_price_display">{convertPrice price=$productPrice}</span>
到managewishlist TPL文件,但没有显示出来。我正在运行版本1.5.6.2。
编辑:我也尝试添加
{if !$priceDisplay || $priceDisplay == 2}
{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
{/if}
到managewishlist.tpl但它所做的心愿消失
请提供更多的细节,什么版本的prestashop?你有什么尝试?你想在哪里增加价格?诸如“请为我做这件事”倾向于很快被删除...... – defuzed
感谢您的建议,我只是添加了这些细节。我感谢任何帮助。 –
您是否已将'productPrice'添加到smarty变量(使用'$ this-> context-> smarty-> assign')? – defuzed