Page 1 of 1

Getting Admin Product Search to Ignore Special Characters

Posted: Wed Aug 29, 2018 5:54 pm
by rikmg67
I have a client who is wanting the product search in the admin area to ignore the fact that there are special characters in the product names.

For example, they have a lot of products listed with the word “kings” or the word “king’s” with an apostrophe - both used correctly grammatically depending on the product.

What they want to be able to do is search for “kings” on the admin area and all products called “kings” and “king’s” appear - rather than just “kings” as it does by default.

They have the same problem with “remy” and “r.e.m.y” where, when searching for “remy” the search needs to ignore the fact that there are “.” In the name.

Opencart Version 2.3.0.2

Any help is greatly appreciated!

Re: Getting Admin Product Search to Ignore Special Characters

Posted: Wed Aug 29, 2018 6:02 pm
by xxvirusxx

Re: Getting Admin Product Search to Ignore Special Characters

Posted: Wed Aug 29, 2018 7:00 pm
by thekrotek
If you know sone coding you can simply change the query a bit. Particularly you need to replace LIKE with REGEX and strip all characters from keyword using simple regular expression.

Re: Getting Admin Product Search to Ignore Special Characters

Posted: Thu Aug 30, 2018 4:30 pm
by paulfeakins