Jump to content

If-Condition for category and related subcategories in product.tpl, PS 1.6.1.24, how?


Rayna Butler
 Share

Recommended Posts

I like to show content on product pages only when the product is in a dedicated category and their subcategories.

I do this in product.tpl like this at the moment.

{if $category->id == 614 
OR $category->id == 532
OR $category->id == 657
OR $category->id == 658

...

{/if}

I am pretty sure there is a better way like "if $category->id == 614 and all subcategories"

How can I achieve that in Prestashop 1.6.1.24

Thanks,

Dirk

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