lat9 / ZCA-Bootstrap-Template

A Bootstrap-4 template for Zen Cart versions 1.5.8 through 2.1.0. Forked from https://github.com/zcadditions/ZCA-Bootstrap-Template-for-1.5.6-v2.0.0c. See the demo site, below, for additional information.
https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=index
GNU General Public License v3.0
4 stars 14 forks source link

zcAjaxBootstrapSearch.php not finding known product_model when entered. #398

Closed dbltoe closed 4 months ago

dbltoe commented 4 months ago

Apologies if this is way off base, but I really need to have the Ajax search come up with a product's model number, and my limited expertise has been stretched beyond its limit.

includes/classes/ajax/zcAjaxBootstrapSearch.php appears to be collecting the products_model, but when a known product model# is entered, we get no result.

In fact, items shown when typing the first character will disappear after the second or third character. For example, go to topkDOTjeandretDOTcom (2.0.1, bootstrap 3.7.0, SBA-affected 1.5.7c DB patched to 2.0, and PHP 8.2) and open the ajax search.

Enter a capital C. A total of 1648 items have been found.

Add a capital T. You will see a Nautical Protractor product among the 121 results, and underneath it is the model number CTR-255 (SR4). It is the actual model number of the item.

Add a capital R to the search and it is down to only 6 items found. And, Nautical Protractor has completely disappeared from the choices.

Add the - in the model number to the search, and nothing is found.

Conversely, go to brothersandnoblesDOTcom and enter 8, then 7, then 1, then -, and the one item with the model # starting in 871- (871-8800) correctly appears. If I enter the last four of the model number (8800), the search correctly finds the 36 products with that last four.

IMRO (R for rookie), either there is something that drops the products_model out of the results or SBS is doing something to model numbers.

Neither of the sites has SBA files, but, as mentioned, the DB used at topkDOTjeandretDOT.com is a copy of that on the current store, which uses SBA.

lat9 commented 4 months ago

I have no current knowledge of how SBA deals with model numbers, all I can tell you is that I'm not seeing that behavior on a zc200 install with Bootstrap 3.7.1 (minor changes, nothing to do with search).

dbltoe commented 4 months ago

Thank you for taking the time to look. I have not been able to point a finger at SBA and am leaning more to a DB munge at migration. Headed that direction today.