specific price access in prestashop 1.6

本小妞迷上赌 提交于 2019-12-23 16:24:35

问题


I'm on prestashop 1.6

When I use this code in my product.tpl file there's no problem, and everything works correctly:

{if  $product->specificPrice.from_quantity==0} <img src="http://url/finish.png" >{/if}

But the same code in the file, homefeatured.tpl gets an answer wrong I even changed the code to the following, but I still did not resolve the problem

{if  $product.specificPrice.from_quantity==0} <img src="http://url/finish.png" >{/if}

or

{if  $product.specific_price.from_quantity==0} <img src="http://url/finish.png" >{/if}

Please help me, experts.


回答1:


You have to take a look what actualy is asignet to homefeatured.tpl It's an array of data what you get from Category->getProducts(); When you check what is returned you can see, that it returns an array that has a key [specific_prices] that contains a key [from_quantity].



来源:https://stackoverflow.com/questions/29955840/specific-price-access-in-prestashop-1-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!