| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Displaying categories/subcategories in an unordered list | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Displaying categories/subcategories in an unordered list
Hi,
Not sure whether this mod has been previously posted (i really hope not, as i've wasted most of the day trying to figure this out, and done alot of searching ) i've found lots of similar solutions, but nothing list based which displays the subcategory as well. (Useful if using css based dropdown/list menus, such as http://www.brothercake.com/site/products/menu) Here's a quick screengrab ... output intentionally left very raw http://www.mylhost.co.uk/list.gif oh yeah, i'm using 4.0.8, but should work with 4.x i reckon Right replace skin1/customer/categories.tpl with ... Code:
Hopefully this will save someone a bit of time, if i had more time i would probably do something more elegant, (probably recursive) but just thought i'd post before i get the sack for doing sod all today |
|||||||
#2
|
|||||||||
|
|||||||||
Please post the version # this is for.
Thanks for contributing btw. People are always looking for good category display mods. |
|||||||||
#3
|
|||||||
|
|||||||
No worries, I did post the version number above, but I probably could have been clearer.
This was developed using version 4.0.8. I'm assuming it will work on 4.x but haven't had time to test on other installations. May also be worth trying on 3.5.x - as long as $allcategories is supported and the subcategory_count can be checked, all should be fine. I'm not sure if smarty supports recursion, (will check later) but this could actually be done using a fraction of the code (and also be of unlimited depth). Oh yeah, if anyone has any joy on other versions let us know! |
|||||||
#4
|
|||||||
|
|||||||
Thanks...it's cool mod
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#5
|
|||||||
|
|||||||
this is a great mod. i used it and it works. awesome job.
but i'm a little stuck because i reorganized things and now i want to list my products in their categories. i only have about 20 products in 5 categories. so it seems like it should be pretty easy to do that. but i've been trying and i'm totally stuck. do you guys have any idea how you would add products into this code? |
|||||||
#6
|
|||||||
|
|||||||
Excellent mod. Just what I was looking for! Works in 4.0.10. I think this needs to be one of the options available in a default x-cart install: Show subcategories in menu.
If you have a store with only a few categories and subcategories, its a waste of clicks to always have to travel to the main category first. Thanks! |
|||||||
#7
|
|||||||
|
|||||||
Hi
Many thanks for posting this mod. Exactly what I needed. I was trying to implement this on the menu section as well. So for categories.tpl I added Code:
This code works fine if your in the subcategory listing. However, when you go into the product details, the menu disappears. I notice it requires {categoryid} but I think in the product menu, it needs to find the {parentid}. For the index page, would I be able to write an if then statement to turn this code off ? Many thanks for a great code!
__________________
X-Cart 4.0.11 {My simple mods} Adding Market list and % save on product detail Quantity input box |
|||||||
#8
|
|||||||
|
|||||||
Re: Displaying categories/subcategories in an unordered list
That code was gold - thank you
__________________
X-Cart Version 4.1.8 |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Displaying categories/subcategories in an unordered list
didnt work in 4.1.3 for me. just made the vert menu display this
<*><*> <*><*></list>
__________________
rjroffroad.com x-cart 4.1.3 +ez checkout +remember anonymous carts |
|||||||||
#10
|
|||||||
|
|||||||
Re: Displaying categories/subcategories in an unordered list
Hi,
I tried to use this code, but my menu code came out like this: [*] [*] [*] [*] [*] [/list] Any ideas how to make it work in 4.1.9? Thanks
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5 Linux |
|||||||
|
|||
X-Cart forums © 2001-2020
|