![]() |
Add links on product page depending on category
Hi all,
depending on what category a product is in I would like to add a link to a static page in the product description. For example on a product page of a tent, which is in the category 'tents', I would like to add a link to a static page called 'learn more about how to choose the right tent'. For a backpack in the category 'backpacks' I would like a link to 'sizing backpacks' to appear. I can add these manually, as you can see on this page (the part with the questionmark): http://store.mountainmagic.com/Black-Diamond-Vista-SKU1511.html But I don't want to add this for every product in the store manually. I guess I would have to create various language files with the different versions for different categories and insert an if statement on the product.tpl? Something like this: {if $cat eq "8"} show language file x{/if} {if $cat eq "9"} show language file y{/if} Any help would be appreciated. |
Re: Add links on product page depending on category
I guess this is possible.
You can add come smarty code within the product detail page template with something like this (not tested): {if $product.categoryid eq xxx} <a href="http://store.mountainmagic.com/tent-information.html">How to choose a tent</a> {/if} xxx is the id of the category which you can find from within the admin area of the store. Hope this helps... Regards Shafiq :sK |
Re: Add links on product page depending on category
Thanks Shafiq, I will try that after the weekend.
|
Re: Add links on product page depending on category
Quote:
Thanks a lot Shafiq |
All times are GMT -8. The time now is 03:35 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.