justine123 Posted May 6, 2020 Posted May 6, 2020 Hi, I'm fairly new to prestashop and we'd like to add a small section in the product detail page depending on the product's category. How can I do that? Is there a variable I can use in the product.tpl? I'd appreciate any help, thank you very much Share this post Link to post Share on other sites More sharing options...
ndiaga Posted May 6, 2020 Posted May 6, 2020 Hi, You can use a condition based on category id like this: {if $product.id_category_default==3} <div class="your_class" id="my_id"> here div content </div> {/if} Share this post Link to post Share on other sites More sharing options...
justine123 Posted May 6, 2020 Posted May 6, 2020 thank you very much! Share this post Link to post Share on other sites More sharing options...
ndiaga Posted May 6, 2020 Posted May 6, 2020 6 minutes ago, justine123 said: thank you very much! You are welcom ! Share this post Link to post 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