| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
V4 - keeping first level subcategories viewable at all times | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
Yes, I'm still at it...and am feeling stupid with this Smarty code.
I added this code to home.tpl Code:
The file "menu_blah.tpl" is the custom menu I want to show in all the pages of a certain category. The problem is that menu only shows on one page, not the rest of it's category. I'm sure the code I need to change is : {$smarty.get.cat eq "248"}, but to what? I'm still trying to control the order of the menu being shown at any given time. Like the control freak I am... Thanks in advance... |
|||||||
#22
|
|||||||
|
|||||||
I'm not sure what's in $smarty.get.cat. Would it be the current category that you're browsing?
In my code, I figure out what the (topmost) category we're browsing is by: Code:
So that variable current_category_top will hold the topmost category in the current category tree. So if you're browsing Food :: Chinese :: Noodles :: Very thin ACME noodles current_category_top will report "Food". Would this do the trick for you? This is all trial and error... but I'd suggest you'd try this: Code:
__________________
Fernando Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you. |
|||||||
#23
|
|||||||
|
|||||||
Fernando, you're a genius. That worked perfectly. It's a bit manual, but it's really only me that makes changes to this sort of thing, so that's okay.
Brilliant! I can move onto all the other annoying details... Have a good one! |
|||||||
#24
|
|||||||
|
|||||||
Amazing how I can't ever get it right the first time around when I work for my own store! Haha!
Glad I could be of help.
__________________
Fernando Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you. |
|||||||
#25
|
|||||||
|
|||||||
Quote:
Been messing with categories.php, and I have manged to get the sub-cats to be nicely ordered by position in the admin area, but no such luck on the customer side. Here's what I have in categories.php: Code:
Any other place I should be adding an order_by??? Thanks in advance!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#26
|
|||||||
|
|||||||
I commented out
Code:
|
|||||||
#27
|
|||||||
|
|||||||
Beautiful, thanks!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#28
|
|||||||
|
|||||||
I'm trying to implement the code from zilker (thanks, btw ), and till now I manage to display the categories horizontal in the head and to show the subcategories in the left menu, when a categorie is clicked.
So far so good... But after clicking on a subcategorie the whole box with subcategories disappears. Like zilker I would like the box with subcategories to stay visible so a customer can choose another subcategorie without having to click again on the categorie. I've tried to use the code provided by shan, but without any luck... Could someone please be so kind to show how to do this? Many thanks in advance!
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#29
|
|||||||||
|
|||||||||
show sub categories only when main category is selected
This mod works great in 4.0.13 by combining heads Fernando and Gabriela provide X-er's with code that will list sub categories under the main category
Example: MAIN NAV 1 MAIN NAV 2 sub nav 1 sub nav 2 sub nav 3 sub nav 4 MAIN NAV 3 MAIN NAV 4 Just add Fernando's code to customer/main/subcategories.tpl and to ensure categories maintain their 'order by' status take Gabriela's advice editing out 'usort' item within the includes/categories.php. One other thing I hadn't found mentioned here... you must have "Always show Root Categories' checked in the admin section under general settings. Thanks. |
|||||||||
#30
|
|||||||
|
|||||||
I've got it also working, but I'm looking for a solution to display all levels
of subcategories. Not in a permanent way but only when a first level subcategorie is clicked. The link below shows roughly what I'm looking for. http://www.udm4.com/demos/expanding-multiple.php
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|