Jump to content

Get all associated categories for a product in Smarty


nbarnum
 Share

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More