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)
-   -   Different set of tabs based on root category selected (https://forum.x-cart.com/showthread.php?t=21867)

bycv 05-17-2006 02:30 PM

Different set of tabs based on root category selected
 
I need an {if} statement that shows my subheads (or tabs)
based on the root, or parent category selected
and continues to display them all the way to checkout
unless another root category is selected.

I looked at the {if} statement post by Instinctual
http://forum.x-cart.com/viewtopic.php?t=12234
and it was very helpful but it didn't answer my question.

I have it working for when the root category is clicked, but it disappears as soon as a sub category is selected. The following code is in my head.tpl

Code:

{ if $cat eq "289" }
{ include file="head_shop.tpl" }

{elseif $cat eq "267"}
{ include file="head_view.tpl" }

{elseif $cat eq "268"}
{ include file="head_trade.tpl" }

{/if}


I need a code that says
for as long as the patent or root ...
or
until another parent or root category ...
is selected

Thank you!

balinor 05-18-2006 04:14 AM

You need to use something like this:

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

Replace Category Name with the actual category name. It needs to be exact, so watch the punctuation.

bycv 05-18-2006 01:08 PM

Thank you for your reply.

I now have managed to keep my subheads/tabs up while browsing products etc...
(thanks to Fernando: http://forum.x-cart.com/viewtopic.php?t=12058)
but they disappear as soon as I click on view cart or checkout ... because there is no specific category selected!

Would the {if $location[1].0 eq "Category Name"} resolve that?

balinor 05-18-2006 01:10 PM

No, because the cart doesn't have any 'current' category information.

bycv 05-18-2006 01:19 PM

hmmm!!!

here is my srore if you want to have a look at it.

http://216.174.99.9/~mystore/

(I am still working on the left side categories list)

thanks again

balinor 05-18-2006 01:23 PM

How do I actually add anything to the cart? Very confusing...

bycv 05-18-2006 01:31 PM

I know!! I'm sorry.

You can click on shop online / 12th street / tops / view product details


All times are GMT -8. The time now is 05:32 AM.

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