问题
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