![]() |
Use a different frontend product template for products in a certain category
Hello,
I want to use a different frontend product template for viewing products but only if they are in a category with an ID 243 (for example, the category could have any ID)? Other products would use the normal product template. Is this possible - if so can someone give me some advice how to do this please? thanks |
Displaying a different product template is very easy to do. But you need a "trigger" in order to know when to switch the template. In your case the trigger is the categoryid.
Thankfully the main category id for the current product page is stored in the $product array. So you can switch templates based on some code like this: Code:
{if $product.categoryid eq '243'} |
| All times are GMT +8. The time now is 02:06 AM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.