| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Has anyone found a good categories mod to show subs in 4.1.3 yet? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I haven't really seen anything I've been able to get to work.
I want to display one level of subcategories in the categories menu on version 4.1.3 I tried one mod that was posted but was unable to get it working, think it might have been for 4.0.x If you know of anything, thanks in advance.
__________________
rjroffroad.com x-cart 4.1.3 +ez checkout +remember anonymous carts |
|||||||||
#2
|
|||||||
|
|||||||
![]()
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() It was suggested, but I was hoping for a freebie.
I've spent too much already on a site thats not making any money, I'm hoping on changing that of course, but until I do I've gotta cut back
__________________
rjroffroad.com x-cart 4.1.3 +ez checkout +remember anonymous carts |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Solution for 4.1.6
Cat A --Cat A1 --Cat A2 Cat B --Cat B1 --Cat B2 Only one modification in incude/categorie.php Search for this in your code : # # Override subcategory_count for Admin area # if(!empty($subcategories) && ($current_area == 'A' || ($current_area == 'P' && $active_modules['Simple_Mode']))) { $product_counts = func_query_hash("SELECT categoryid, COUNT(*) FROM $sql_tbl[products_categories] WHERE categoryid IN ('".implode("','", array_keys($subcategories))."') GROUP BY categoryid", "categoryid", false, true); foreach($subcategories as $k => $v) { $subcategories[$k]['subcategory_count'] = func_query_first_cell("SELECT COUNT(subcat.categoryid) as subc FROM $sql_tbl[categories] USE INDEX (PRIMARY) LEFT JOIN $sql_tbl[categories] as subcat ON subcat.categoryid_path LIKE CONCAT($sql_tbl[categories].categoryid_path, '/%') WHERE $sql_tbl[categories].categoryid = '$k' GROUP BY $sql_tbl[categories].categoryid"); $subcategories[$k]['product_count_global'] = $subcategories[$k]['product_count']; $subcategories[$k]['product_count'] = isset($product_counts[$k]) ? intval($product_counts[$k]) : 0; } } then add this just below the line : //Subcategories in menu function func_getallsubcat() { $raj =func_get_categories_list("", true, "all"); $raj1=$raj['all_categories']; $ll=array(); foreach ($raj1 as $k=>$val) { if($val['parentid']!="0") { $ll[$val['parentid']][]=$val; } } return $ll; } $smarty->assign("allsubcategories", func_getallsubcat()); //Subcategorie in menu - end thank you
__________________
Chris ---------------------------------------- X-Cart Gold 4.1.xx / 4.2.xx Need some Help in french Webdesign or else. ---------------------------------------- |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() I forget this line too
in skin1/customer/categories.tpl Where you need to show the subcategorie {assign var=in value=$c.categoryid} {foreach from=$allsubcategories.$in item=c } and the link to show subcategories <a href="home.php?cat={$c.categoryid}" class="yourclassforsub">{$c.category}<br></a> thank you I was forogotten it in my previous post Thank you
__________________
Chris ---------------------------------------- X-Cart Gold 4.1.xx / 4.2.xx Need some Help in french Webdesign or else. ---------------------------------------- |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|