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

Link to parent/root cat

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-01-2010, 09:40 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Link to parent/root cat

do you mean $current_category

Seem like you are looking for the cat that the product belongs to?
__________________
xcart 5.1.2
Reply With Quote
  #12  
Old 12-01-2010, 09:45 AM
 
jvolvovski jvolvovski is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 46
 

Default Re: Link to parent/root cat

the way that i have it set up is

main category > sub category > product
the product is listed only in the sub category, so $product.categoryid returns the sub category
i'm looking to return the main category

thanks!
__________________
Version 4.3.2
Reply With Quote
  #13  
Old 12-01-2010, 01:03 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Link to parent/root cat

{$product.current_category.categoryid_path|regex_r eplace:" /\/[0-9\/]*/":""}

thry this will leave the root cat for any cat or sub cat
__________________
xcart 5.1.2
Reply With Quote
  #14  
Old 12-01-2010, 01:14 PM
 
jvolvovski jvolvovski is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 46
 

Default Re: Link to parent/root cat

i'm not getting that to show up.
it seems like the only category related variables within {$product} is categoryid

thanks,
jenny
__________________
Version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 09:40 PM.

   

 
X-Cart forums © 2001-2020