View Single Post
  #4  
Old 09-29-2008, 11:43 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: little help with a {if} statement

I see, there isn't a real elegant solution to this unfortunately as x-cart won't allow a category to be both a root category and a subcategory.

In your .tpl find:

Code:
home.php?cat={ $subcat.categoryid }

Change to:

Code:
home.php?cat={if $subcat.categoryid eq '264'}270{else}{$subcat.categoryid}{/if}

In case the 264 subcategory is accessed from elsewhere you may want to put this code in your .htaccess:

Redirect 301 /home.php?cat=264 http://1090484.nwinetworks.com/home.php?cat=270
Reply With Quote