Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Different set of tabs based on root category selected

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-17-2006, 02:30 PM
 
bycv bycv is offline
 

Member
  
Join Date: Apr 2006
Posts: 15
 

Default 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!
__________________
X-Cart Gold Version 4.0.18
Add-on: X-RMA
Add-on: X-AOM
Reply With Quote
  #2  
Old 05-18-2006, 04:14 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-18-2006, 01:08 PM
 
bycv bycv is offline
 

Member
  
Join Date: Apr 2006
Posts: 15
 

Default

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?
__________________
X-Cart Gold Version 4.0.18
Add-on: X-RMA
Add-on: X-AOM
Reply With Quote
  #4  
Old 05-18-2006, 01:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

No, because the cart doesn't have any 'current' category information.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-18-2006, 01:19 PM
 
bycv bycv is offline
 

Member
  
Join Date: Apr 2006
Posts: 15
 

Default

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
__________________
X-Cart Gold Version 4.0.18
Add-on: X-RMA
Add-on: X-AOM
Reply With Quote
  #6  
Old 05-18-2006, 01:23 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

How do I actually add anything to the cart? Very confusing...
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 05-18-2006, 01:31 PM
 
bycv bycv is offline
 

Member
  
Join Date: Apr 2006
Posts: 15
 

Default

I know!! I'm sorry.

You can click on shop online / 12th street / tops / view product details
__________________
X-Cart Gold Version 4.0.18
Add-on: X-RMA
Add-on: X-AOM
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:02 AM.

   

 
X-Cart forums © 2001-2020