Page 1 of 1

Admin Product Name Search Filter issues still the same as in OC 3.x

Posted: Wed Jan 04, 2023 8:00 am
by ArtGallery
I have a new test installation of OC 4.0.1.1 and was hoping that partial product name searches in the Admin / Products area would finally work in this revision, but they do not.

In version 3.x I used an extension called "Admin Search Products and Model by Any keyword" to get around this issue, but it appears that the extension is not compatible with OC 4.0.1.1

https://www.opencart.com/index.php?rout ... eandrorppo

For example, searching for one of the demo products named iPod Nano will not show up in the admin product name search unless you type it correctly and in order - iPod Nano - if you just type in the word nano, the search fails. Sometimes if you type Nano with the capital N it will but sometimes it won't, or the correct product name will flash for a fraction of second without the upper case N, but then it disappears.

Any solution for this issue without spending more money on some other extension?

Re: Admin Product Name Search Filter issues still the same as in OC 3.x

Posted: Wed Jan 04, 2023 8:29 am
by straightlight
This extension's description states to use OCMod whereas OC v4.x releases don't. Contact the extension developer for more information.

Re: Admin Product Name Search Filter issues still the same as in OC 3.x

Posted: Wed Jan 04, 2023 9:00 am
by ArtGallery
straightlight wrote:
Wed Jan 04, 2023 8:29 am
This extension's description states to use OCMod whereas OC v4.x releases don't. Contact the extension developer for more information.
Thanks for the tip, but I actually have no desire to use that extension. I was just using it as an example of how I got around the same bug in OC 3.x. I would prefer that OC 4.x didn't have the admin product search bug still in it. After looking at all the issues with it plus no way to fix this particular bug which is a real pain, I think I am going to ditch 4.x and stick with 3.x for a bit longer.

Re: Admin Product Name Search Filter issues still the same as in OC 3.x

Posted: Wed Jan 04, 2023 7:02 pm
by JNeuhoff
The product name and model search fields work as intended via the autocomplete, the underlying DB queries contain something like

Code: Select all

LIKE 'xxx%'
in the SQL used by the autocomplete function. You could easily change it to using

Code: Select all

LIKE '%xxx%'
See file admin/model/catalog/product.php at function getProducts.

A simple event handler could be written up for this for OpenCart 4.