| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Display Subcategories of Parent, While in Subcategory | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi All,
I've made a dropdown menu at the top of my category pages in a 4.4.3 store that lists the subcategories in that category, like so: HTML Code:
I would like this dropdown menu to be visible and function even after you go into a subcategory. Currently, it shows on the parent category page correctly, but then when you go into a subcategory the selections are no longer in the menu. http://future.thefutureforward.com/~aso/Snow/ I think I need an if statement in there that grabs the parent's subcats when in a subcat, but I'm not sure how to do it. Any help is much appreciated!
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#2
|
|||||||
|
|||||||
![]() SOLVED thanks to this post - http://forum.x-cart.com/showthread.php?p=320214#post320214
Here's how I did it: In subcategories.tpl: HTML Code:
In subcategories_dropdown.tpl: HTML Code:
Works perfectly!
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#3
|
|||||||||
|
|||||||||
![]() shouldn't you put the PHP in php file?
__________________
xcart 5.1.2 |
|||||||||
#4
|
|||||||
|
|||||||
![]() Probably, but with a deadline looming, this worked so I ran with it!
__________________
nick hoag looking forward to the future http://thefutureforward.com xcart versions 4.2.x, 4.3.x, 4.4.x |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Nice solution!
{php} is deprecated so you'll definitely want to clean this up when you have a chance. Maybe post your new solution then. ![]() |
|||||||||
|
|||
X-Cart forums © 2001-2020
|