jd250 Posted February 8, 2017 Share Posted February 8, 2017 Hi!! I would like to show choosen features on product-list.tpl I want to show it on line 120 of product-list.tplFor instance if free shiping or not with an image.Here is part of product.tpl code that works on my web: <td>{if $feature.id_feature==32} {if $feature.value=='Free Shipping'}{html_image file='https://www.web.com/freeshipping.gif'} I want to do something in product-list.tpl. I think I must load the product id to show feature.value with an image. I don't know how to do this... Thank you so much! Link to comment Share on other sites More sharing options...
jd250 Posted February 8, 2017 Author Share Posted February 8, 2017 I've found this code: {if isset($product.features)} <div class="features"> {foreach from=$product.features item=feature} <div> {$feature.name}: <span>{$feature.value}</span> </div> {/foreach} </div> {/if} That works but I only want to show one value... Link to comment Share on other sites More sharing options...
rocky Posted February 9, 2017 Share Posted February 9, 2017 Try: {if isset($product.features)} <div class="features"> {foreach from=$product.features item=feature} {if $feature.id_feature == 32} <div> {$feature.name}: <span>{$feature.value}</span> </div> {/if} {/foreach} </div> {/if} 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