| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Subcategory Mods on 4.2.0 | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Not far off for 4.2.0. I've just come to need this mod again, and I needed the sorting to work so took a look into it.
As benz says in the first bit of code I posted change Code:
to Code:
Then you need to add the bit from benz's last post but it's not on line 68 of categories.php anymore it's now on line 533ish of /include/func/func.category.php Add the two lines of code and it seems to work perfectly. Hope this helps someone
__________________
Xcart Pro Version 4.1.2 |
|||||||
#22
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
Anybody know how to make this work with sub- subcategories?
__________________
X-Cart 4.2 |
|||||||||
#23
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
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
__________________
Xcart Pro Version 4.1.2 |
|||||||
#24
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
Thank you artmatt
__________________
X-Cart Gold v4.2.1 |
|||||||||
#25
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Thank you artmatt! The code you posted worked great!
I hope you can find time to post the sub-sub category sub-loop. I understand what you are saying, but I don't know where to start to implement it.
__________________
Tobias Ross Ineye.com Xcart 4.2.2 |
|||||||
#26
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
How can you make this only show subcategories in a certain category? Victor if you can help I would really appreciate this.
Also, can you limit the amount of results shows for subcategories and maybe leave it with another one called 'More...'?
__________________
x-cart 4.2.3 AlteredCart Smart Search Auto Featured Products Mod (Personal Mod) BCSE Product Importer Pro & Drop Shipper Pro CDSEO Pro CMS EZRecommends EE slider login (Personal Mod) Next Prev Link Mod (Customized) ShadowBox Detailed Images (Personal Mod) Shop By Price (Customized) Social Media (Personal Mod) Switch Layout View (Personal Mod) Special Offers Testimonials (Personal Mod) Whats New (Customized) |
|||||||
#27
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Bump any ideas how to show like 5 random subcategories in a main category? Any help would be greatly appreciated.
__________________
x-cart 4.2.3 AlteredCart Smart Search Auto Featured Products Mod (Personal Mod) BCSE Product Importer Pro & Drop Shipper Pro CDSEO Pro CMS EZRecommends EE slider login (Personal Mod) Next Prev Link Mod (Customized) ShadowBox Detailed Images (Personal Mod) Shop By Price (Customized) Social Media (Personal Mod) Switch Layout View (Personal Mod) Special Offers Testimonials (Personal Mod) Whats New (Customized) |
|||||||
#28
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
Quote:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#29
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
Quote:
I tried this method - found the line in the /include/func/func.category.php - patched it - but the categories still show up in the wrong order once we get to the Sub category level. Its weird how it shows up in the correct order when we are on the Parent Category (which dsiplays the subcategory list). Any corrolation? Also - another question - is it possible to Not Show the <UL> for Categories that do NOT HAVE Sub categories. The way the code is written - It runs a loop on all Categories - then runs an IF - the Category has a parent ID of the same number - then display the Sub Category list. But I wish I could run a loop that only displayed Categories that had a ParentID of '0' (root) then ran an IF - the Category has a parent ID of the same number - then display the Sub Category list. The reason is - this is creating unncessary UL tags and shifting my css design. Anybody know how to do this? Is there any way to run an IF statement on the $allcategories array to check if it returns Nothing (null - no value)? Then print the UL only if the value was NOT Null?
__________________
------ Brian Portland web design / development X-Cart 4.1.9 (a few carts) X-Cart 4.2.0 (1 cart so far) |
|||||||||
#30
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
This mod is freakin awesome!
I needed something to get me half way to making an accordion menu, and this did the job. I have followed all the directions I could, but am having a strange problem. Menu works GREAT on the homepage, no problems at all. But every other page doesn't load the subcategories. I tried with the original code and my "tweaked" version to display as an accordion. Why would the subcats not display on the child pages? Any ideas? The shop isn't open for business yet, and I am in the styling stages. If you need to see it, send me a PM. THX!
__________________
X-Cart version 4.2.1 Product Configurator 4.2.1 |
|||||||
|
|||
X-Cart forums © 2001-2020
|