View Single Post
  #24  
Old 10-03-2006, 10:33 AM
 
Jeremy.Freeman Jeremy.Freeman is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 79
 

Default Re: ALWAYS display first level subcats beneath root cats

This works great on 4.1.3! However, the subcategories are not displaying in the order they are specified to order by (based on pos).. any idea how to do that?

Quote:
Originally Posted by chamberinternet
Hello ..

I did manage to get it working (with some help from the guys @ XCart Support)

This is how it's done:

Modify the "<xcart-dir>/include/categories.php" file:

1) find the following line (it is 290th in X-Cart v4.1.0 by default)

if (($current_area == "C" && defined("GET_ALL_CATEGORIES")) || defined('MANAGE_CATEGORIES')) {

2) replace it with the next one

if (($current_area == "C") || defined('MANAGE_CATEGORIES')) {


Then edit categories.tpl replace with the following code after {if $config.General.root_categories eq "Y"}


{foreach from=$categories item=c}
<font class="CategoriesList">{$c.category}</font>
<ul>
{foreach from=$allcategories item=cat}
{if $cat.parentid eq $c.categoryid}[*]<font class="CategoriesList">{$cat.category}</font>
{/if}
{/foreach}[/list]{/foreach}

Hope this helps ...

Regards

Shafiq :sK
__________________
Jeremy Freeman
EZWatch Store
X-Cart v4.1.5
Reply With Quote