| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Improved Search Function | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
OK Im running 3.3.2 with an extended search paramaters so I can search by Brand SKU Desc.
It has been a pain in the head modifying this so that I can search in other paramaters. www.landspeedracing.com/customer/search.php If anyone needs the basic version of this Mod to work on 3.3.X I beleive I have the proper code. I would paste it hear but one of my main problems getting this code to work in the first place because copying the code from the forumn to a file without getting parse errors that made zero sense was impossible. I basicly had to go in and replace every return and space(used for formating. Once this is done and a couple minor changes for compatibility, I only found one error in the actual code so let me point this out. It does not noticeably affect the operation(so I can see why no one has noticed it) but is a typo none the less. Original CODEwith error) Code:
New corrected CODE: Code:
The $in_category was enclosed in quotes and I beleive it is not suppose to be as it was not in my original search.php So I moved the quotes and added a period. Also Boomers addition is a must if you are going to do what I did and add a Brand dropdown list to search via brand.(very handy) MY MAIN QUESTION IS: How can I have all my search results Ordered By ProductCode. I thought replacing: Code:
Code:
Would accomplish this but I am wrong as changing this has no affect on the product arrangment in Products.tpl Any suggestions for doing this. I am so just hacing this code and do not 100% understand every aspect of it. more like 70% Scott P.S. Thankyou so much REALLY it is sad that this is not standard one of my pet peaves of x-cart is its incomplete features sure has lots of features just few are complete or done in the standard popular way.(sure it will change)
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#22
|
|||||||
|
|||||||
Quote:
Well this code works for me in 3.4.8 just so everyone knows. I can get search results now from multiple words. |
|||||||
#23
|
|||||||||
|
|||||||||
This mod worked for me too in the newest version. Is it possible to make it search the "extra fields" too?
__________________
~ Andrea Beight |
|||||||||
#24
|
|||||||
|
|||||||
search product_options table
I have the customized search function working on Version a 3.4.8 install.
Is there a method to search the product_options table? I would like to search for products with certain size availability. Since the product_options table doesn't have a "membership" field, the search code will not allow that table to be used. Thanks for any help. Chris |
|||||||
#25
|
|||||||
|
|||||||
Quote:
Code for 3.3 or even 3.2 version is as follows: Code:
Hope it helps someone.
__________________
ex x-cart guru |
|||||||
#26
|
|||||||
|
|||||||
OK so this code is modified to do the following
1. function in 3.3.2 2. Substring search searches the following paramaters using funky's code Param00 Product Description Detailed Desription (ProductCode or sku#) 3.SKU# search searches ProductCode Only and searches it using Funky's code 4. Same as #3 only with the folowing paramater param00 5. Same as #3 only with the folowing paramater Product 6. Same as #3 only with the folowing paramater fulldescr 7. Added ability to search by brand using drop down list(see .tpl code) You may see this at www.landspeedracing.com/customer/search.php If anyone want me to mod this for 3.3.x for their uses I would be willing to help if it is not to much work. Scott Code:
advanced_search.tpl Code:
The only bug I have found is when one searches using the general seach on the main page It takes them to the advanced search and does not display any result however once this happens if you submit the seach again from the same spot all goes well I think I know what the problem is just have not had time to fix it. Scott
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#27
|
|||||||
|
|||||||
Search works great!...can we do more?
I have installed this search mod successfully in 3.4.8 and its great! thanks you guys and great work!
There is one thing, though, that i would like it to do: when a user seaches for "super car kit" , the search does not return any results even though i have a product called "car kit" . Is there any way to make it work this way? thanks Jordan |
|||||||
#28
|
|||||||
|
|||||||
One more quesiton...
In addition to my above question, I've got one more:
How can I make this search code search by one (or more than one at once) of the extra fields i defined for product options? I read somewhere that these extra fields are called param00, etc... so I am assuming that the search code posted previously (the one from LandSpeedRacing.com) is suited for this. What I need to know is where do i find out what these extra fields are called within X-Cart (param00, param01 etc...?) and how do i implement a search by them? Also, is it possible to make a search that uses multiple "extra field" parameters? for example: My store sells beads. We carry thousands of different sizes, colors, materials, etc. I want customers to be able to form a search query by choosing a color, size and material from 3 pull-down menus which will use information entered into extra fields in product options. Thanks Sorry if some of these questions are obvious, I am new to X-Cart - jordan |
|||||||
#29
|
|||||||
|
|||||||
Umm well use my code. Well actualy adapt my code to the original as mine is modified to use the extra paramaters but is also made to be compatible with 3.3.x
(I think its realy only the sessionID part that is different) Also as fare as your first question??? The code is suppose to work they way you wanted it to. Super car Kit should find Super Car and Kit and any combination. I dont know why this does not work for you? Maybe Im mistaken! Scott
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#30
|
|||||||
|
|||||||
Division by zero, line 149
Thanks Tuner!
I have installed the code above, keeping the session ID parts from the previously posted 3.4.8 search script. The search works somewhat (it will return results, but "super car kit" still does not find "car kit") and I get a warning: Warning: Division by zero in /home/jordan0/www/kitkraft/customer/search.php on line 149 I've looked at line 149 and I don't even know where to start with this one What can I do? - Jordan ** Added Dec.11 ** Tuner Б─⌠ I have tested out the search function on LandSpeedRacing.com and found that it returns results the same way. I searched for "Super Block Saver" and got no results, but found your block saver items by searching for just "Block Saver" I think it would make the search function much more effective if it worked in this way. Customers searching for an item of a certain brand may find that another one suits their needs better. ** ** Added Dec.11 ** After more thought on the subject, I've decided its best to leave the search function the way it is. I will include a note on the "no results found" page suggesting that users remove words from their query. ** |
|||||||
|
|||
X-Cart forums © 2001-2020
|