Jump to content

search facility


keat

Recommended Posts

I've been told that customers can't search by partial part number.

I've tried to explain that messing with this will break the search, which is one complaint we had on our V3 

example, if we sell items with part number GRN1, GRN2, GRN3, GRN4, etc, and you search GRN, then nothing comes up.

Is there a way to improve this ?

Link to comment
Share on other sites

There is a Suggestive Search mod/plugin that might solve our problem. Our way around such things is to change search so it searches the meta_keywords instead of the title or description, and I did various queries to add common variations to my existing keywords - for instance I discovered by watching Customers Online that some people search for bears, rather than bear. So I added the plurals to all animals to the keywords. I've added common misspellings, too. So you could add GRN to each of your part number variations that way.

Link to comment
Share on other sites

I don't really want to start editing products, I've 4500 of them.

 

If I search GRN1, it will show GRN1, but if I search GRN, it shows nothing.

I guess its running a search query along the lines 'if product_code equals xxx', so maybe changing the query to 'if product_code is like% xxx' would do the trick.

Of course this has the ability to dilute the search.

Link to comment
Share on other sites

I have over 4,000 as well. But it was not really hard to add to the keywords. Of course you may not have keywords filled in at all - not everyone does.

Using

UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring");


Something like CubeCart_inventory set seo_meta_description = replace(seo_meta_description,"GRN1,","GRN1,GRN,");

Link to comment
Share on other sites

I made the code change, and as suspected, it did indeed ruin the search.

For instance search the phrase 'NUT', and not only does it reveal nuts, but anything else that contains the phrase nut, like superglue which sets in 1 minute, or a soldering which heats in under 2 minutes.

Search for our part number TR (which is a range of cable ties) and a wire stripper shows up.

I've left it in situ just to prove my point.

 

Thanks chaps.

Link to comment
Share on other sites

It's a catch 22, On the old V3, we had such a fuzzy search that customers would complain that search results were not relevent, as can be seen above, and found it difficult to find anything.

The argument this weekend was: 'A customer who knows grease nipples are GRN part numbers would search GRN but the results come back null'

My reply was, 'But if he's half an ounce of intelligence, he'd search 'grease' 'nipple' or 'grease nipple and new customers wouldn't know GRN anyway'

 

Now after the code change, we can search GRN, but the results come back so diluted. (maybe not with GRN, but with lots of others it does) it's ruined the search facility.

I have left the code change in situ so the powers that be can see for themsleves. Personally, i feel there was nothing wrong, but i don't make those descisions.

 

In the meantime, I assume this line has something to do with the search.

$rlike = " AND (I.name RLIKE '".$regexp."' OR I.description RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')";

Would it be possible to change i.product_code to something along the lines like%%
 

Link to comment
Share on other sites

I don't profess to understand PHP, reading it, is like reading another language.

I can sort of half make out what it's trying to say, then try to fill in the blanks.

Hence the reason I assumed $rlike = " AND (I.name RLIKE '".$regexp."' OR I.description RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')"; was doing some sort of lookup.

If the name is like something, descriptioin is like something, and product code is like something. Therefore concluded I could use like%, but only on the product_code part.

I guess not.

Link to comment
Share on other sites

So, until some better code comes along, I'd like to pursue a discussion of my meta_keywords solution. Our store was dead until we had a way to search that made sense for our products. Bsmither coded a completely different way of searching for us, but I don't think that code would help your situation.

Then adding to his custom search code the changing to search keywords, not title and definition, AND having the ability to easily modify the keywords for large number of items at once via queries - has made all the difference to us.

Do you currently have terms in seo_meta_keywords for each product? For instance, would all these GRN items have grease or grease nipple as a keyword?

Link to comment
Share on other sites

We have nothing in seo_meta_keywords.

I really don't want to start editing 4500 products, if i'm being honest

The boss has conceded that it was broken, and i've rolled it back to how it was.

If I can use a wildcard on product_code somewhere and it allows us to search on products codes then great, but if not then I'm happy to leave it the way it is for now.

If we start getting customer complaints, then I'll re-address it.

Link to comment
Share on other sites

I understand. It's easy to do IF you have a good set of keywords already in place for each product. With keywords currently blank, my way would certainly not work. Since you are not the only one with part number search issues, hopefully someone will solve this problem without diluting search results past usefulness.

Link to comment
Share on other sites

What I don't understand is I can input a specific part number like GRN1, and GRN1 turns up, along with a kit which contains a GRN1 (as it's in the description)

So I'm guessing the search somewhere must be doing 'where product_code=', so wouldn't 'where product_code Like%' fix this.

 

Link to comment
Share on other sites

Probably not to be honest.

The boss was suggesting that a customer should be able to search partial part numbers, as well as everything else.

But the fact that the edit broke it, proves that it's one or the other but not both.

Link to comment
Share on other sites

  • 10 months later...

Sorry to bump old thread but may help other people

I was having problems with search where I could search the first 3 words of the title of one of my products and it would appear on the 3rd page of results, while products with non of those words would be at the top of the results.  Very strange the cubecart search function lol.  Changing the relevance didn't help.

Any way using this thread and the one linked I managed to sort it by deleting OR I.description RLIKE '".$regexp."' and changing $search_mode = 'fulltext' to $search_mode = 'like'  in the  /classes/catalogue.class.php file

This worked for me as I feel it was more important to search the title than the description.

Link to comment
Share on other sites

This is still ongoing for me, the search function almost ruins the experience if I'm being honest.

Maybe the search function should have a drop down, where the customer could choose whether he wants to search by Product Code, Title, Description or take his chances, which is what happens at the moment..

Link to comment
Share on other sites

I may have a solution to do that. I wrote some snippets that allowed a store to be searched on the UPC code.

This should be easily adapted to search on whatever specifics is desired.

Send me a PM with your email address and we can experiment.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...