Show sub-categories in 'Categories' menu-box
This xcart 4.1.3 modification also alows you to change the settings in the admin area General Settings - Appearance options. ( A new section is added called "Categories" menu-box" )
2 files to change and also patch the sql. include/categories.php skin1/customer/categories.tpl Apply the SQL changes (Open the Patch/Upgrade page in admin area and select the patch.sql from the archive for the "Apply SQL patch" section). Code:
Then change the skin1/customer/categories.tpl from: (You need to amend the second category which is the line that has home.php?cat={$catid} - add in <FONT style='padding-left:{$c.indent}px;'> before the {$c.category} - Dont forget to close the font command with </font> Code:
Replace with: (Items in RED is the extra code) Code:
Now to the include/categories.php there are 5 changes to this 4.1.3 xcart file 1st change - Find in include/categories.php Code:
Replace with: (You are adding in the extra command $with_subcategories=false ) (Items in RED is the extra code) Code:
2nd change - Find in include/categories.php Code:
Replace with: (Items in RED is the extra code) Code:
3rd change - Find in include/categories.php Code:
Replace with (Items in RED is the extra code) Code:
4th change - Find in include/categories.php Code:
Replace with: (Items in RED is the extra code) Code:
5th change - Find in include/categories.php Code:
Replace with: (Items in RED is the extra code) Code:
|
Re: Show sub-categories in 'Categories' menu-box
good mod
Advice from a customer point of view. You might want to indent subcategory icons also or remove them altogether. Right now it's a long unreadable list and you can't say either it's cat or subcat. |
Re: Show sub-categories in 'Categories' menu-box
hello,
i was unable to find <tr style="CURSOR: pointer;" class="MenuItemOff" {if $js_enabled}onmouseover="ShowMenyItem(this,'On'); MM_swapImage('cat_img{$catid}','','{if $full_url}{$http_host}{$ImagesDir|replace:"..":""} {else}{$ImagesDir}{/if}/custom/cat_itemon{cycle name='on_images' values='8,1,2,3,4,5,6,7'}.gif',1)" onmouseout="ShowMenyItem(this,'Off'); MM_swapImgRestore()"{/if}> <td><img src="{$ImagesDir}/spacer.gif" width="7" height="1" alt="" /></td> <td height="17"> <img id="cat_img{$catid}" src="{$ImagesDir}/custom/cat_item{cycle values="8,1,2,3,4,5,6,7"}.gif" alt="" class="CatImage" /> <a href="home.php?cat={$catid}" class="CategoriesList">{$c.category}</a></td> <td><img src="{$ImagesDir}/spacer.gif" width="10" height="1" alt="" /></td> </tr> {if not $smarty.foreach.cats.last} in my categories.tpl |
Re: Show sub-categories in 'Categories' menu-box
I like this mod... but is there anyway to have only the subcategories shown for the current category you are in. So basically all the categories are shown and then the sub categories for the current category are located under the category name. Thanks for your help!
|
Re: Show sub-categories in 'Categories' menu-box
Quote:
yeah, the original categories.tpl has nothing like this. He posted the original the same as the replace with. Instead, maybe you can post your entire categories.tpl file? I tinkered with it and never got it working |
Re: Show sub-categories in 'Categories' menu-box
Quote:
Here is my full shopcart/skin1/customer/categories.tpl code Code:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} |
Re: Show sub-categories in 'Categories' menu-box
Will this mod work for version Gold 4.1.9?
|
Re: Show sub-categories in 'Categories' menu-box
Quote:
I can't see why not, try it, just make sure you backup the files before you try the mod. |
Re: Show sub-categories in 'Categories' menu-box
Quote:
I have highlited the new parts of the code in RED to make it easier to understand. The categories.tpl code shown before was using the Crystal blue skin. You maybe able to follow this mod a bit better now. |
Re: Show sub-categories in 'Categories' menu-box
I've tried but didn't work with the 4-1-9...anyone?
|
All times are GMT -8. The time now is 08:42 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.