| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Show sub-categories in 'Categories' menu-box | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() 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:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#2
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart version 4.0.19 |
|||||||
#3
|
|||||||
|
|||||||
![]() 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
__________________
Current version: 4.1.5 Centos 4x |
|||||||
#4
|
|||||||
|
|||||||
![]() 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!
__________________
X-Cart Gold Version 4.1.5 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() 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
__________________
rjroffroad.com x-cart 4.1.3 +ez checkout +remember anonymous carts |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() Quote:
Here is my full shopcart/skin1/customer/categories.tpl code Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() Will this mod work for version Gold 4.1.9?
__________________
X-Cart Gold version 4.1.9 |
|||||||||
#8
|
|||||||||
|
|||||||||
![]() Quote:
I can't see why not, try it, just make sure you backup the files before you try the mod.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#9
|
|||||||||
|
|||||||||
![]() 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.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() I've tried but didn't work with the 4-1-9...anyone?
__________________
_____________ Capture Your Mini-Me Look! - X-CART Gold (Current Version) V4.6 - Reboot - CDSEO |
|||||||||
|
|||
X-Cart forums © 2001-2020
|