Zen Cart Logo
Forums / General Questions / Search in Admin now showing products

Search in Admin now showing products

Locked

Views: 1,359

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
22 Jan 2010, 6:04 PM
#1
encanto avatar

encanto

New Zenner

Join Date:
Jan 2010
Posts:
1
Plugin Contributions:
0

Search in Admin now showing products

Zen Cart 1.3.8a vanilla install.

Facts:

  1. added a new Product: Red Delicious Apple

  2. search query: red apple

Problem

Search in Catalog works fine and my product (Red Delicious Apple) shows up in the search result.

Search in Admin, however, does not return any results.

Question:

What codes do i have to change to make it work in admin or how do i get my product to show up in admin search? is there a boolean operator?

28 Jan 2010, 1:17 AM
#2
dutchkiwis avatar

dutchkiwis

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: Search in Admin now showing products

Similar case here where admin product search and catalog search don't behave similarly.

For my zencart (1.3.8) I for example search for one keyword, for example MTB

Admin search returns nothing, even though I have that keyword in about 10 products in the product name and/or description.

Catalog search is doing its job just fine. I only see this issue with a limited set of products that do not show up in admin search result. In order to exclude issues with the data I am trying to find out what queries are generated. Since I am on a hosted solution, I can't run a MySQL profiler.

Can someone help point out what search queries are generated and where the code lives in 1.3.8 ?? Any thoughts or help welcome - I am getting a little desparate on this one:frusty:

Thanks,
Ed

28 Jan 2010, 1:20 AM
#3
dutchkiwis avatar

dutchkiwis

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: Search in Admin now showing products

I just came across damonparker.org/blog/2006/10/20/zencart-products-id-search/

This may give a clue.

28 Jan 2010, 3:03 AM
#4
dutchkiwis avatar

dutchkiwis

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: Search in Admin now showing products

Turns out that Damon points in the right direction indeed. My code has the original query commented out in order to force master_categories_id and fix duplicates.

Undone that fix and all is SWEEEEET:clap:

20 Oct 2010, 7:39 PM
#5
jab_be avatar

jab_be

New Zenner

Join Date:
Oct 2010
Posts:
1
Plugin Contributions:
0

Re: Search in Admin now showing products

i have found :clap:: http://damonparker.org/blog/2006/10/20/zencart-products-id-search/

Uncomment the first and decomment the second one.
After,

Add

or p.products_id = '" . zen_db_input($_GET['search']) . "%'
``` Don't forget the %, it's not indicate in the link above!

After 
```php
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'

and Before

or p.products_model like '%" . zen_db_input($_GET['search']) . "%')" .