| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
V4 - keeping first level subcategories viewable at all times | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
As above, I would really like a menu like that.
__________________
Version: 4.1.3 One of the largest UK Suppliers of Car Modification Accessories http://www.impact-styling.com |
|||||||
#32
|
|||||||
|
|||||||
Code:
First, my code above displays all the time, everytime. I need an if statement that will only display after you have clicked on a category. Once you click on a category, the code above should display. Next, I need to name the subcategory that they selected. I tried {$current_category_top.category} which didn't work. Then I tried {$current_category.category} which just displays the name of the item you are on. If I click on a sub cat, it will display the sub cat name, then if I click on a product, it will display the product name. I only want it to display the sub cat name for the 2nd level sub cat.
__________________
Product: X-Cart Gold Current version: 4.0.14 Additional Mods: X-Affiliate |
|||||||
#33
|
|||||||
|
|||||||
I solved that by using a cookie. When I'm browsing a category, I'll create a cookie (e.g. X_CURRENT_CATEGORY). Then, when I'm in a product, I just retrieve the value of the cookie.
BTW: this is very useful if you want to add a Keep Shopping button on cart.php. You click it, and return to the last category you were on. If you want to refine it even more, you could even add an X_CURRENT_CATEGORY_PAGE cookie Regards
__________________
Fernando Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you. |
|||||||
#34
|
|||||||
|
|||||||
I'd rather not use a cookie. You should be able to do this easily using some logic statements, but I just don't know what the variables are in xcart.
__________________
Product: X-Cart Gold Current version: 4.0.14 Additional Mods: X-Affiliate |
|||||||
#35
|
|||||||
|
|||||||
Anyone?
__________________
Product: X-Cart Gold Current version: 4.0.14 Additional Mods: X-Affiliate |
|||||||
#36
|
|||||||
|
|||||||
This seems to work just fine
Code:
The only problem is that I want the title of the subcategories (in the code in my last post) to show the sub cat title, not the product title.
__________________
Product: X-Cart Gold Current version: 4.0.14 Additional Mods: X-Affiliate |
|||||||
#37
|
|||||||||
|
|||||||||
subcategory mod not working w/ x-cart 4.1.0
Had this working with x-cart 4.0.13 however does not seem to work when upgrading to x-cart 4.1.0 ... any ideas?
|
|||||||||
#38
|
|||||||
|
|||||||
Hello Fernando,
I have used your code Code:
Is there any way to use the same thing a second time with the first or top subcategory intead of the top category? or to say second from the top of the category tree? Thank you in advance.
__________________
X-Cart Gold Version 4.0.18 Add-on: X-RMA Add-on: X-AOM |
|||||||
#39
|
|||||||
|
|||||||
As Hyperdelicious said, it doesnt seem to be working in x-cart 4.1.
I believe there are only 2 arrays present in the template that contain categories. * $categories, which contains the toplevel categories. * $subcategories, which contains the subcategories of the current category. Is this correct? And if it is I assume the only thing get the subcats of the parent category is to perform an extra query and assign the results to smarty? I think the nicest thing to use would be that the category structure is available as a tree
__________________
X-Cart Gold 4.1.2 + X-Affiliate on LAMP server |
|||||||
#40
|
|||||||
|
|||||||
Has anyone been able to figure out how to do this in 4.1?
__________________
Holli x-cart gold: 4.2 php: 5.2.6 mysql: 5.0.67-community |
|||||||
|
|||
X-Cart forums © 2001-2020
|