View Single Post
  #23  
Old 01-04-2004, 01:51 PM
 
jordan0 jordan0 is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: San Francisco, CA
Posts: 77
 

Default $rot_category_name...

Boomer,
I have modified the SQL query in /include/categories.php as you instructed above, but my code (from products.tpl) below still does not work:

Code:
{if $root_category_name eq "Chain"} {include file="customer/main/products_struc.tpl" products=$products} {else}

The "Chain" cat has only one subcat, and products.tpl doesn't include products_struc.tpl when listing its products.

I was thinking about a different solution to this problem that might work better for me. Would it be possible to create an extra column in the xcart_categories table for "listing style"? It could contain a path to a custom products.tpl that the regular products.tpl would load if this column contained any data.
How would I write the code for this? Do I just have to add the column and then use $categories[cat_num].listingstyle ? Or is there somewhere I have to tell xcart to put the listingstyle info into $categories?

The way I'm doing it right now, which I have to change, is with a massive set of {if} statements that check $cat for each category and subcategory...

This seems like something fairly common... How has everyone else handled the problem of making custom products.tpl pages for specified categories?

Example of what I have now:
Structural Materials: http://www.kitkraft.biz/customer/home.php?cat=20
Acrylic Paint: http://www.kitkraft.biz/customer/home.php?cat=12

Thanks
- Jordan
__________________
Jordan Sitkin
http://www.kitkraft.biz
X-Cart 4.0.18 [unix]
Reply With Quote