Zen Cart Logo
Forums / General Questions / advanced search

advanced search

Locked

Views: 4,747

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
3 Jun 2010, 5:51 PM
#1
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

advanced search

I'm getting frustrated with the number of issues that keep cropping up with the advanced search functions.

  1. I can't seem to search for anything less than 4 letters long using either the advanced search function or the regular search sidebox on my site. Is this really so? I read here:

https://www.zen-cart.com/forum/showthread.php?t=82408

that it's possible that mysql won't search for words that are 3 letters long. That seems exceptionally odd, especially as my Zen Cart site is a test site (installed in a folder) and my live site (installed at public_html) searches for words of even a single letter without any trouble.

  1. I've tried installing both the 'whole word search' mod and the 'advanced search plus' mod, and they've only resulted in sql errors being thrown. Is there some addon that I'm missing which everyone uses?

You can see both my live site search function, which is all I'm looking to replicate, and the zen cart search fuction, at these pages. Just take out the spaces around "com":

http://weirdorecords. com /cpCommerce/search.php?obj=advanced

http://weirdorecords. com /zen/index.php?main_page=advanced_search

Thanks for reading, and any advice you have. I've found this forum very patient & helpful so far.

7 Jun 2010, 9:44 PM
#2
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Still nobody, eh? It seems odd that no one else needed to search a product that was less than 4 letters long at some point. Do I perhaps have this posted in the wrong forum?

7 Jun 2010, 10:58 PM
#3
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Okay, moving this question over from the template forum.

I'm having tons of trouble with the results that my advance search page gives. They include:

-I can't search for a word less than 4 letters long, and some of my products have names with less than 4 letters

-I can't search just the name of the product or just the manufacturer, I can only choose between (name+manufacturer) or (name+manufacturer+description)

-there are lots of problems when searching using partial words. For example, "circuit" returns 2 products with 'circuit' in the title, but searching for "ircuit" only returns one of those products, even though the spelling within the product's name is the same.

-what's worse, with roughly 3500 products in my database, customers will need to be able to choose whether their search is whole word/exact or keyword/inexact

It's fine if the regular search box is rather basic, but for advanced search functions, what I've found so far isn't very robust. So, it looks as though I'm going to have to tear apart the search function and completely rewrite it. Having never done such a thing before, I would love a slow, step-by-step plain-as-possible English walk through of how the search function currently works, from a programming standpoint.

Anyone who's up to the task? I've been searching the forums here for a couple of weeks, & have seen many people with the same or similar problems, but no solutions.

thanks for your time.
Angela
weirdorecords . com/zen (remove the spaces around the .)

7 Jun 2010, 11:00 PM
#4
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Just for those who look later, I moved this thread into the General Questions forum under the topic: advanced search begninning.

8 Jun 2010, 12:03 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: advanced search

I search from the sidebox for:
mar
marc

and get results ... :unsure:

8 Jun 2010, 3:01 AM
#6
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

I've done some work in the past few hours on the search box, and things are a bit better. Currently, even though I've installed fresh versions (1.39d) of advanced_search/header.php and advanced_search_result/header.php, my biggest problem is that the search in product descriptions checkbox doesn't seem to do anything. So, for example, if you search the word 'bubbly' in the sidebox, you get plenty of results, but if you search for it on the advanced search page you get no results. About to change the template to see if that helps.

8 Jun 2010, 3:08 AM
#7
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Okay- looks like my current problem is related to the template. I'll try restoring sections of the advanced search page (which I'd knocked out) and see if I can get things working again.

Looks like most of my problems were related to trying to install mods, and failing to remove them properly. Still not the most intuitive search function, but at least it's mostly working as intended now.

8 Jun 2010, 3:49 AM
#8
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Thanks much for your attention so far. I've been working, and only have one problem to solve now. Here it is.

If I use double quotes to search for a short word (like the band "Can"), I get no results. Doesn't matter whether the search_in_descriptions checkbox is checked or unchecked, doesn't matter if a subcategory or manufacturer is selected, and it doesn't matter whether the word is capitalized. Same zero results.

However, if I search for can with no double quotes, I get tons of results. I can get fewer by choosing a category or a manufacturer or by refraining from searching in descriptions. But that's the only way to get a result that includes the band Can.

Do I not understand how the double quotes work? They do work as I expect for longer strings. "ornette coleman" (in names), "lonely woman" (in descriptions), etc turn out just fine.

26 Aug 2010, 10:20 PM
#9
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

I've finagled many things over the last few months, but still never found a solution for this last problem.

Zen cart seems unable to handle exact searches (aka searches in quotes) for words less than 4 letters long. I've scoured everywhere trying to figure out how to change this, but without luck. Anyone?

26 Aug 2010, 10:54 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: advanced search

In v1.3.8 and v1.3.9b-f ... I did not go back any further ...

I cannot search for "seven" but I can search for "test seven" ...

Which version of Zen Cart are you using? :unsure:

26 Aug 2010, 10:58 PM
#11
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Apologies, I should've mentioned. I'm using 1.3.9f. So, if I understand you correctly, this is a known issue?

27 Aug 2010, 6:57 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: advanced search

That depends ...

If you try to search for:
"seven"

Can you give an example of why you would search for:
"seven"

and not just:
seven

If you are searching for something like:
"test seven"

and cannot find it, then you need to check your upgrade to v1.3.9f as I cannot reproduce the problem ...

Can you give a specific search that you are trying to make that is not working?

28 Aug 2010, 7:59 PM
#13
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Sure. My issue stems from people trying to search for bands with short names. 2 examples would be the band 'Can' or the band 'AMM'. Currently on my site, if you do a search for these, even if you're not searching through the entire description, there are far too many results for the results to be useful.

I'm assuming people would try quotes in order to do a whole word search (much as one would on google). Thus, in the example of 'Can', knocking out results like 'american' or 'volcanic'.

I realize that one could also use the dropdown menu to just look under 'C artists', but I think that particular extra step is an untypical requirement, and so one that will ultimately reduce sales.

I suppose what I'd really like is for people to be able to use checkboxes to limit their search to particular fields (artist, title, etc), and then choose whether it's a whole word or keyword search. I did spend some time looking for this in zen cart forums, but mostly ran into dead ends.

Any of that helpful?

29 Aug 2010, 12:25 AM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: advanced search

I think you would have to build a custom search to limit these searches and expand your advance search for other fields as needed ...

29 Aug 2010, 2:21 AM
#15
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: advanced search

Great, but one of the problems I will need to solve in order to cobble together the code for an entire custom search function, is how to make whole word searches for strings of 3 letters or less.

That's the problem. Zen Cart does not allow for exact keyword searches of less than 4 letters. Why on earth not?

29 Aug 2010, 3:18 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: advanced search

Because then all people who search for 3 letters and want to find them when mixed in words would complain ... :blink:

You need to customize this for your shop if you need it otherwise ...

You can check if the length of the keyword is only 3 characters and if so then work out a different search method ...

I would suggest a checkbox of some sort as many will not want to just search for 3 letter exact matches and may want to see anything that contains the 3 letters ...

Look in the file:
/includes/pages/advanced_search_result/header_php.php

to see how the current search is done ...

23 Sep 2010, 10:32 PM
#17
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: advanced search

An answer to this issue sure would be nice. Short word searches seem to place items that actually contain the short word at the end of the product list.

:(