X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product.tpl need to know root cat (https://forum.x-cart.com/showthread.php?t=10033)

ETInteractive.com 10-26-2004 03:46 PM

Product.tpl need to know root cat
 
How can i determine the ROOT category of the product i am currently on.

Basically im looking ot see if the product's root cat is "Apparel" then if it is, i want to include a Sizing Chart link for customers.

but lets say its, "Motherboards" then dont show the sizing chart link.

Any ideas?

TIA,
Tony

shan 10-27-2004 04:09 AM

look at how the location variable works

something like

Code:

{if $location[1].0 eq "Apparel"}

blah blah

{if}


ETInteractive.com 10-27-2004 05:16 AM

where can i find more info on Location var?

searching around, no luck.

Thanks Shan!

ETInteractive.com 10-27-2004 05:21 AM

Found it

{$location[position].1} is the variable.

ETInteractive.com 10-27-2004 05:46 AM

Problem.

if i use this code
Code:

{if {$location[position].1} eq "Riding Gear"}
[img]{$ImagesDir}/size_icon.gif[/img]

{/if}


I get the following output:

eq "Riding Gear"} Image appears



if i use this code
Code:

{if $location[position].1 eq "Riding Gear"}
[img]{$ImagesDir}/size_icon.gif[/img]

{/if}



I get NOTHING to output.

what am i doing wrong?

ETInteractive.com 10-27-2004 06:09 AM

{if $location[0].0 eq "Gear"}
blah blha
{/if}

This works, thanks Shan.


All times are GMT -8. The time now is 07:16 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.