S7 Media Ltd Posted May 20, 2014 Share Posted May 20, 2014 Hi all, I'm working on a website where some products have attributes which will vary in price. So for example, a bag of dog food at 1kg may be £10. A 2kg bag may be £18. These would be variations/attributes of one product. So as not to mislead customers, on the product list, we'd like to introduce an if statement which detects whether the product has attributes. If the item has variations and can be altered, then on the product list, we'd like it to say 'From:' next to the price. I have tried things like {if ($product.id_product_attribute == 0 )}From {/if} but that yields nothing. Any help would be greatly appreciated. Thanks! Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted June 3, 2014 Author Share Posted June 3, 2014 Does anyone have a solution to this? Link to comment Share on other sites More sharing options...
CartExpert.net Posted June 3, 2014 Share Posted June 3, 2014 Hi. Try {if $product.id_product_attribute} Regards.Robin.The CartExpert Team 1 Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted June 3, 2014 Author Share Posted June 3, 2014 Hi. Try {if $product.id_product_attribute} Regards. Robin. The CartExpert Team Absolute boss, thank you so much! Link to comment Share on other sites More sharing options...
CartExpert.net Posted June 4, 2014 Share Posted June 4, 2014 Happy we could help Please mark the topic [sOLVED] Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
Elise B. Posted May 10, 2015 Share Posted May 10, 2015 (edited) Hello, I just wanted to add I added: {if $product.id_product_attribute}Select options{/if} right before (or after, depending on your likes!) the </h5> {hook h='displayProductListReviews' product=$product} part of my product-list.tpl file. This added the text I chose (in this case, 'Select options') to products in product list which have attributes. Otherwise this thread was not clear on which file to modify or where to add: {if $product.id_product_attribute}Select options{/if} part. But thanks I am grateful with help of other tutorial I was able to add this feature. Edited May 10, 2015 by Elise B. (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now