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

Subcategory Mods on 4.2.0

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 08-18-2009, 09:18 PM
 
iDC Photography iDC Photography is offline
 

Member
  
Join Date: Jun 2009
Posts: 13
 

Default Re: Subcategory Mods on 4.2.0

Haha. My bad. I put the catagories.php code AFTER the line instead of BEFORE it. Such a newbie.....

Got the accordion working like a charm. Thanks Victor for you ingenuity!
__________________
X-Cart version 4.2.1
Product Configurator 4.2.1
Reply With Quote
  #32  
Old 08-19-2009, 06:43 AM
 
iDC Photography iDC Photography is offline
 

Member
  
Join Date: Jun 2009
Posts: 13
 

Default Re: Subcategory Mods on 4.2.0

One more question...

I don't want you to do all the work, but could someone point me in the right direction?

I need to make an "active" class for the nested elements so that i can customize the javascript to leave the category section in the menu open if an item from that category is being viewed. I would also like the have the subcategory highlighted, but that isn't as crucial. (Using an accordion style menu)

I am going to start tinkering with it today, but any ideas would be awesome!

Thanks!

jonah
__________________
X-Cart version 4.2.1
Product Configurator 4.2.1
Reply With Quote
  #33  
Old 08-20-2009, 06:36 AM
 
iDC Photography iDC Photography is offline
 

Member
  
Join Date: Jun 2009
Posts: 13
 

Default Re: Subcategory Mods on 4.2.0

I got it. Not only that but I was able to also insert a class for the active subcategory so both the active category and the active subcategory are given custom classes to as to help the customer keep track of where the are in the menu.

Thanks to all who started this thread. It has helped infinitely!
__________________
X-Cart version 4.2.1
Product Configurator 4.2.1
Reply With Quote
  #34  
Old 09-11-2009, 12:26 PM
  xcel's Avatar 
xcel xcel is offline
 

eXpert
  
Join Date: Nov 2008
Posts: 220
 

Default Re: Subcategory Mods on 4.2.0

Quote:
Originally Posted by artmatt
I've made it work with sub-sub cats, will post how it's done when I get time.

But if I remember correctly all the data is there, so you just have to add the code to the categories.tpl file to display the sub-sub-cats.

Have a play you just need to make a sub loop in the same format, it can then be extended again and again for each further level you require.

Hope that makes sense

Sorry I haven't got time to post it at the moment

artmatt... any possibility of posting your fix for sub-sub cats?

Also... could you possibly explain how I could get it to work with sub-sub-sub cats??? like this...

MAIN
SUB 1
SUB 2
SUB 3

Thanks in advance (and thanks to user1 for cleaning things up a bit)
__________________
X-Cart Gold Plus 4.6.6

Altered Cart - Checkout One
Altered Cart - Checkout One Payments
Altered Cart - Cash Rewards
Altered Cart - On Sale

Smack Digital - CDSEO
Smack Digital - CDSEO Rich Snippets
Smack Digital - xCMS

The xCart Store - xBanners2

Star Plugins - Cloud Zoom

Heavily Customized by Starts Here Ltd. (UK)
Reply With Quote
  #35  
Old 11-04-2009, 02:52 AM
 
mescalito_ve mescalito_ve is offline
 

Advanced Member
  
Join Date: Sep 2005
Location: Spain
Posts: 49
 

Default Re: Subcategory Mods on 4.2.0

Hello thanks for this mod is very ussefull.

I im using it but when you click in a subcategory the subcategory sub menu dissapears, im i missing something or it works like that?
__________________
Alvaro Grillet
XCART GOLD 4.4.1
XCART GOLD 4.1.10
XCART GOLD 4.1.9
XCART GOLD 4.2.2
Reply With Quote
  #36  
Old 02-11-2010, 04:29 AM
 
artmatt artmatt is offline
 

Member
  
Join Date: Aug 2006
Posts: 12
 

Default Re: Subcategory Mods on 4.2.0

As a quick update I can confirm this also works with the new 4.3.0 version of x-cart. The new version does include a few extra choices with the Fancy Categories module being included, but it still doesn't do a "normal" functional menu. I've just followed my own post from the first page and it works fine, all sorting on sub-menus is correct as well

*EDIT*

Sorting wasn't correct! It just happened to be correct because it was in alphabetic order anyway!

Code should be as per Victors Code on post 16:

http://forum.x-cart.com/showpost.php?p=253759&postcount=16
__________________
Xcart Pro Version 4.1.2
Reply With Quote
  #37  
Old 03-03-2010, 08:22 AM
 
kooki kooki is offline
 

Member
  
Join Date: Jun 2008
Posts: 20
 

Default Re: Subcategory Mods on 4.2.0

This code works great, but like others I really need to know how to get sub-sub categories appearing..
__________________
X-Cart 4.4.2
Reply With Quote
  #38  
Old 05-05-2010, 08:29 AM
 
Penelope Penelope is offline
 

Newbie
  
Join Date: Dec 2004
Posts: 3
 

Default Re: Subcategory Mods on 4.2.0

Thanks to everyone for the fantastic information in this thread. I thought modifying the categories menu to include subcats would be a real trial-and-error effort. But all of your input has made it painless!
__________________
Penelope
---------
X-Cart v4.3.1
Reply With Quote
  #39  
Old 08-07-2010, 08:10 PM
 
gatordp gatordp is offline
 

Advanced Member
  
Join Date: Aug 2009
Posts: 72
 

Default Re: Subcategory Mods on 4.2.0

I tried doing this mod on 4.2.2 and it all seemed to work OK, but I have a custom skin and when I used this it added bullets in front of the Main Categories and changed the font size.

I'm sure this is a css issue. Anyone know where I might look to fix this and keep the same formatting I had?
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #40  
Old 09-22-2010, 04:08 AM
 
Jeremy Smith Jeremy Smith is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 167
 

Default Re: Subcategory Mods on 4.2.0

Would this work with v4.1.11?

Also would this allow when viewing the front page, to display the root categories as defined in the side bar, then when the user selects a value say:

root_category1, it then shows all the sub categories applied to that root category.

But still keeping the value of the root_category1.

Then when the user selects say:

sub_category1 it keeps both displayed in the html drop down select box.

Would this accomplish that requirement?

Sorry if this has already been asked etc but just wanted to clarify that.

Thanks,
Jeremy
__________________
Version 4.1.11 on Linux (Fedora)
X-Cart Gold
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 04:05 AM.

   

 
X-Cart forums © 2001-2020