Page 1 of 1

Search Bar

Posted: Wed Aug 11, 2010 12:21 am
by Glycosan
Currently when you search for a product number no results are returned unless youclick the "search by product number"; Is there a way that i can make it so that when a regular search is run the product number is also searched?

Re: Search Bar

Posted: Wed Aug 11, 2010 5:58 am
by kedgetech
There is no enhanced module (ready made) I recall. You should start looking at search logic and add the other column into search functionlity.

Re: Search Bar

Posted: Wed Aug 11, 2010 6:45 am
by Moggin
Glycosan wrote:Currently when you search for a product number no results are returned unless youclick the "search by product number"; Is there a way that i can make it so that when a regular search is run the product number is also searched?
If you mean product model, Glycosan, this can be done fairly easily - see this post/thread:
http://forum.opencart.com/viewtopic.php?t=14380#p72054

...I put my product refs in the 'model' field, and it works well for me.

Re: Search Bar

Posted: Wed Aug 11, 2010 7:24 am
by kedgetech
Good find Moggin. That looks about right.

Re: Search Bar

Posted: Wed Aug 11, 2010 11:15 pm
by Glycosan
Thank you problem resolved.

Re: Search Bar

Posted: Thu Aug 12, 2010 12:41 am
by vojtech25
Thanks for advice, it helped.

I would like to ask for another thing ( i have asked before, but no one answer). I am using czech language, and this searching does not work for diacritics. If the name of product is for example "pásová pila", it will not find it.

I try to change the name for example to "pasova pila" and everything was ok, searching was succes. So the problem is in DIACRITICS. Any ideas???

Thank you so much

Re: Search Bar

Posted: Thu Aug 12, 2010 4:03 am
by vojtech25
I found, that the name and description of product is saved using entities - for example "okružní pila" is saved like "okružní pila" and so on.. I have to probably change the encoding during the saving to database..

But I have no clue where to change this, does someone no..?? Thank you

Re: Search Bar

Posted: Fri Aug 13, 2010 3:22 pm
by vojtech25
Does anyone know, in what file it is saving to the database??? Maybe it is the solution to change the way of saving.. Thank u

Re: Search Bar

Posted: Sat Aug 14, 2010 7:01 am
by Moggin
Cheers kedgetech, Glycosan - glad to help :)

vojtech25, unfortunately I know almost nothing about MySQL and character sets. I just found this page by chance, on Opencart member webaccent's site (ran it through the google translator)
http://web-accent.com/ru/stati/kodirovk ... poisk.html - Character set in MySQL, or why can't I search) If you can understand it, maybe it will help you? It sounds like character set may be the problem.

If any Czech users are reading this, please lend vojtech25 a hand...

Re: Search Bar

Posted: Tue Mar 15, 2011 10:13 pm
by mayhemer
vojtech25, in catalog\model\catalog\product.php you have to replace all occurences of strtolower(*) call to mb_strtolower(*, 'UTF-8').

This has nothing to do with sql or web page encoding setting.

Re: Search Bar

Posted: Wed Mar 16, 2011 2:40 am
by vojtech25
Great! Thank you very much, it helped pretty nice :)