| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Search Upgrade | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Search Upgrade
Hi Everyone,
I have modified the advanced search so that the customer can search not only the main categories, but also the first level of sub categories. For example currently x-cart has: Code:
I modified is so that it has the following: Code:
Here's how I did it. I modified categories.php by adding the following... Code:
Then I modified the customer/main/advancedsearch.tpl by replacing the drop down box code with the following: Code:
My question is this: Can anyone figure out how I can modify the subcategories so that only the subcategory shows up in the drop down box? So it would be - Code:
I would really appreciate any help I am brain farting at the moment. So, if you like code return a favor Thanks everyone.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#2
|
|||||||
|
|||||||
{$categories_level_2[cat_num][0][cat_num1].category_name|escape}
I spend ages working that one out for a drop down menu system for a site. Nice coding
__________________
ex x-cart guru |
|||||||
#3
|
|||||||
|
|||||||
FD,
Thanks for the complement. I tried implementing your solution. It printed the values of the select options, but not the select options. I don't have a category_name column in my table (3.3.6) so that may be the problem. Here is a list of my xcart_categories table columns: categoryid image_x image_y category description meta_tags avail views_stats order_by membership threshold_bestsellers Any ideas? Thanks again
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#4
|
|||||||
|
|||||||
There isn't in mine either - but it does a little ditty with the dbase query in include/categories.php:
This may be missing from your coding
__________________
ex x-cart guru |
|||||||
#5
|
|||||||
|
|||||||
My categories.php code: (version 3.4.2)
Code:
Then in the categories.tpl you could have something like: Code:
This shows each main section then that section subsections under it... Cat 1 - sub cat 1 - sub cat 2 Cat 2 - sub cat 3 - sub cat 4 etc hth
__________________
ex x-cart guru |
|||||||
#6
|
|||||||
|
|||||||
Heck yeah, it worked really well. I simply updated my SQL statement from:
Code:
To: Code:
Thanks a ton, I would have never of guessed to updated my SQL statement, I was stuck on a PHP solution.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#7
|
|||||||
|
|||||||
I do that...get caught up solving a really big issue and some smart r's comes along
BTW - if someone wants to use the code above to produce a javascript drop down menu (that's what I used it for - obviously stripped the JS out for this post) then feel free.
__________________
ex x-cart guru |
|||||||
#8
|
|||||||||
|
|||||||||
I didn't catch that the first 3 times, can you please repeat it?
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want. |
|||||||||
#9
|
|||||||||
|
|||||||||
Yeah alright already, we heard you the first time
Someone prod funky he's gone into a loop.
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#10
|
|||||||
|
|||||||
slight connection problem - just kept pressing submit
Code:
welcome to my loop
__________________
ex x-cart guru |
|||||||
|
|||
X-Cart forums © 2001-2020
|