| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add links on product page depending on category | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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.
__________________
x-cart 4.3.1 |
|||||||
#2
|
|||||||||
|
|||||||||
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
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#3
|
|||||||
|
|||||||
Re: Add links on product page depending on category
Thanks Shafiq, I will try that after the weekend.
__________________
x-cart 4.3.1 |
|||||||
#4
|
|||||||
|
|||||||
Re: Add links on product page depending on category
Quote:
Thanks a lot Shafiq
__________________
Chris X-Cart 4.4.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|