nbarnum Posted March 20, 2015 Share Posted March 20, 2015 I'm trying to edit the Product page so that if a product is associated with a particular category a section will be displayed. My problem is that I can only see the default category for the product. What statement could I run to see if the product is associated with a particular category? Thanks Link to comment Share on other sites More sharing options...
jgamio Posted March 20, 2015 Share Posted March 20, 2015 You can use there {foreach from=Product::getProductCategoriesFull(Tools::getValue('id_product')) item=cat} {if $cat.name== 'YOU TEST' } SHOW INFO HERE {/if} {/foreach} you can read about these on http://mypresta.eu/en/art/developer/display-all-product-categories-on-product-page.html 2 Link to comment Share on other sites More sharing options...
nbarnum Posted March 20, 2015 Author Share Posted March 20, 2015 That did it. Thanks. I was able to work around it by adding a keyword to the tag and using that. {if in_array('keyword', $product->tags.1)} show {/if} I'd rather use the category though. Thanks. 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