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

ALWAYS display first level subcats beneath root cats

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #61  
Old 12-12-2007, 02:47 AM
  wardworth's Avatar 
wardworth wardworth is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 78
 

Default Re: ALWAYS display first level subcats beneath root cats

Hi, I have the 1st level of subcategories displaying in the categories menu as described in this thread, but I also want to display 2nd and 3rd level subcategories in the categories menu too. How do I do this?
__________________
:: Wardworth Ltd
:: X-Cart 4.1.8
Reply With Quote
  #62  
Old 01-04-2008, 05:45 PM
  divinechic's Avatar 
divinechic divinechic is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 78
 

Default Re: ALWAYS display first level subcats beneath root cats

Has anyone been able to get this mod to work for version Gold 4.1.9? I have tried all of these with no luck. If anyone got it to owk could you post instructions and code here?
__________________
X-Cart Gold version 4.1.9
Reply With Quote
  #63  
Old 01-04-2008, 10:23 PM
 
awasson awasson is offline
 

Newbie
  
Join Date: Mar 2005
Location: Vancouver, BC Canada
Posts: 8
 

Default Re: ALWAYS display first level subcats beneath root cats

Did you check the thread I posted where it all came together for XCart Gold 4.15

http://forum.x-cart.com/showthread.php?p=161471#post161471
__________________
X-Cart Gold Version 4.15
PHP 5.16 / MySQL 5.022
Apache 2.2.3 / Linux (Fedora Core 6)
Reply With Quote
  #64  
Old 01-05-2008, 09:10 AM
  divinechic's Avatar 
divinechic divinechic is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 78
 

Default Re: ALWAYS display first level subcats beneath root cats

I must have missed that one. I will try it and post back to let you know. Thank you for your help!
__________________
X-Cart Gold version 4.1.9
Reply With Quote
  #65  
Old 01-05-2008, 09:45 AM
  divinechic's Avatar 
divinechic divinechic is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 78
 

Default Re: ALWAYS display first level subcats beneath root cats

I tried it and just got open line error and some other errors. I don't think it works for 4.1.9
__________________
X-Cart Gold version 4.1.9
Reply With Quote
  #66  
Old 01-14-2008, 06:23 AM
  wardworth's Avatar 
wardworth wardworth is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 78
 

Default Re: ALWAYS display first level subcats beneath root cats

awasson, any idea how I would extend the subcategories mod to show 2nd and 3rd level subcategories?
__________________
:: Wardworth Ltd
:: X-Cart 4.1.8
Reply With Quote
  #67  
Old 01-15-2008, 01:13 PM
 
staalejg staalejg is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 63
 

Default Re: ALWAYS display first level subcats beneath root cats

Does this work for subcategories.tpl?
__________________
Juan (Teksavers)
Reply With Quote
  #68  
Old 01-15-2008, 01:14 PM
 
staalejg staalejg is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 63
 

Default Re: ALWAYS display first level subcats beneath root cats

--------------------------------------------------------------------------------

Re: ALWAYS display first level subcats beneath root cats

--------------------------------------------------------------------------------

Hi, I have the 1st level of subcategories displaying in the categories menu as described in this thread, but I also want to display 2nd and 3rd level subcategories in the categories menu too. How do I do this?
__________________
Wardworth Ltd


I assume it has to do with subcategories.tpl which is what I asked above.
__________________
Juan (Teksavers)
Reply With Quote
  #69  
Old 01-15-2008, 01:34 PM
 
staalejg staalejg is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 63
 

Default Re: ALWAYS display first level subcats beneath root cats

Also, what if I wanted for all subcategories to show regardless of which category I am currently on?
__________________
Juan (Teksavers)
Reply With Quote
  #70  
Old 02-20-2008, 07:29 AM
 
robertswww robertswww is offline
 

X-Adept
  
Join Date: Jul 2003
Posts: 586
 

Default Re: ALWAYS display first level subcats beneath root cats

Quote:
Originally Posted by Jeremy.Freeman
Fixed it.. you need to comment out the following line in include/categories.php to sort the subcategories by pos:

usort($all_categories, "func_categories_sort");

I should appear around line 165ish

If you comment out that line, the subcategories will then sort by the Position Number you specify and not alphabetically. However, it will mess up the category order on the back end, which makes it more difficult to add a new product to the correct category/categories.

4.0.x Solution:

Only have the subcategories sorted by position number on the customer front-end by putting the usort in an IF statement as follows...
(Note: it's around Line 164 (4.0.19) and Line 171 (4.1.9) in my include/categories.php file)
Code:
if($current_area != 'C') { usort($all_categories, "func_categories_sort"); }
4.1.x Solution:
First, follow Post #22 in this same thread (on page 3):
http://forum.x-cart.com/showpost.php?p=124458&postcount=22

Next, notice the usort is now uasort in the 4.1.x code...
Code:
if($current_area != 'C') { uasort($all_categories, "func_categories_sort"); }
NOTE: Both of the 2 mods for the 4.1.x branch are in the same file: include/categories.php

Robert
__________________
X-cart 4.1.10
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 01:21 PM.

   

 
X-Cart forums © 2001-2020