Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Has anyone found a good categories mod to show subs in 4.1.3 yet?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-12-2006, 07:33 AM
  jasonroy's Avatar 
jasonroy jasonroy is offline
 

Senior Member
  
Join Date: Sep 2006
Location: Tualatin, Oregon
Posts: 147
 

Default Has anyone found a good categories mod to show subs in 4.1.3 yet?

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
Reply With Quote
  #2  
Old 12-12-2006, 10:37 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Has anyone found a good categories mod to show subs in 4.1.3 yet?

How about PhilJ's CSS based mods?

Four level vertical flyout category menu
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 12-12-2006, 01:17 PM
  jasonroy's Avatar 
jasonroy jasonroy is offline
 

Senior Member
  
Join Date: Sep 2006
Location: Tualatin, Oregon
Posts: 147
 

Default Re: Has anyone found a good categories mod to show subs in 4.1.3 yet?

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
Reply With Quote
  #4  
Old 02-21-2007, 10:14 AM
  chris2002's Avatar 
chris2002 chris2002 is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: French Polynesia
Posts: 30
 

Default Re: Has anyone found a good categories mod to show subs in 4.1.3 yet?

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.
----------------------------------------
Reply With Quote
  #5  
Old 02-21-2007, 05:37 PM
  chris2002's Avatar 
chris2002 chris2002 is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: French Polynesia
Posts: 30
 

Default Re: Has anyone found a good categories mod to show subs in 4.1.3 yet?

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.
----------------------------------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 PM.

   

 
X-Cart forums © 2001-2020