Forums / General Questions / The search on my store is not working properly

The search on my store is not working properly

Views: 2,888

Results 1 to 19 of 19
25 Feb 2014, 9:27 PM
#1
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

The search on my store is not working properly

Hi,

I just noticed a problem with my shop. The built-in search engine is not indexing products I have recently added. I don't know when this started happening but I did a test search and noticed that older products are showing up in the search fine, whereas newer products that I have added more recently are not appearing. Here is a link to my ZC store search engine using the keyword "agar": http://tinyurl.com/m28zvz9

You will notice 11 results, but there should be more than that... for instance, all the products listed on this page (see URL at end of paragraph) are not appearing in the search and should be (the products listed on this page are more recent additions to my store): http://tinyurl.com/kwyjlkr

I don't have any add-ons installed which are related to the search engine.

Anybody have any idea what could be going on here?

Thank you for your time.

25 Feb 2014, 10:00 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: The search on my store is not working properly

Do you have both Products and Categories in your Categories?

Categories hold Categories or Products never both ... and it kind of looks like you might have these mixed but I have trouble reading SEO/rewrites to tell for sure on how things are laid out ... :lookaroun

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Feb 2014, 12:32 AM
#3
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

Ajeh:

Do you have both Products and Categories in your Categories?

Categories hold Categories or Products never both ... and it kind of looks like you might have these mixed but I have trouble reading SEO/rewrites to tell for sure on how things are laid out ... :lookaroun

No, I don't. I'm using the mod made by yellow that allows you to click on a category and have it list all products within subcategories of that category, rather than listing the individual subcategories when clicked on. That mod was downloaded from this thread: http://www.zen-cart.com/showthread.php?88215-Simple-Category-Tree

But, all my categories either contain just products or just subcategories. All subcategories contain just products.

26 Feb 2014, 5:05 AM
#4
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: The search on my store is not working properly

Some fun things happen when you search for agar and change what it's searching, for example turn the search in product descriptions off, or include sub categories, or select the agar categories and run the search.

Any chance the advanced search files have been modified in any way?

Remember the code is 'logically' returning the results. It's not magic so it's returning 11 products because that's the 11 products that fit the search 'agar' without spaces. Perhaps you cut and paste the new titles/descriptions and other code came with it?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

26 Feb 2014, 6:17 AM
#5
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

twitchtoo:

Some fun things happen when you search for agar and change what it's searching, for example turn the search in product descriptions off, or include sub categories, or select the agar categories and run the search.

Any chance the advanced search files have been modified in any way?

Remember the code is 'logically' returning the results. It's not magic so it's returning 11 products because that's the 11 products that fit the search 'agar' without spaces. Perhaps you cut and paste the new titles/descriptions and other code came with it?

Well, I did what you suggested, and the four product listings in the second URL of the OP, which have the word "agar" in all of their titles AND all of their descriptions still do not show up. Furthermore, I tried limiting the search to only the "Agar Kits" subcategory, which is the subcat the second link in the OP points to, and it returns 0 results, even though every product listing in that subcat has the word "agar" in it.

I really don't think I've done anything that would have modified the advanced search files. If someone could point me in the direction of where they are located, I could perhaps try overwriting those files with unmodified ones from a clean ZC install... if that's suggested... I don't know, just throwing that out there.

I did not cut and paste the new product titles/descriptions and there are is no hidden code around the words that might be adversely affecting the search results.

This may not seem like too big of a deal, but it really is, because many people rely solely on the search engine to look for products on the site... and if they don't show up, well, they don't think we carry them... and we lose out on sales. This is frustrating!

27 Feb 2014, 4:54 AM
#6
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

Ajeh:

Do you have both Products and Categories in your Categories?

Categories hold Categories or Products never both ... and it kind of looks like you might have these mixed but I have trouble reading SEO/rewrites to tell for sure on how things are laid out ... :lookaroun

Could this issue possibly have something to do with the Ceon URI Mapping plugin? I've recently noticed that recently added categoried are not getting rewritten by Ceon URI Mapping properly. Would this affect the store's internal search engine?

27 Feb 2014, 2:12 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: The search on my store is not working properly

That is possible ... try turning off the SEO/rewrites and see if it works ... then try switching temporarily to Classic Template to see if it works ... that would rule out some issues ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

27 Feb 2014, 10:10 PM
#8
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

Ajeh:

That is possible ... try turning off the SEO/rewrites and see if it works ... then try switching temporarily to Classic Template to see if it works ... that would rule out some issues ...

Okay, I tried both of your suggestions and am still having the same problem. I feel I should also note that all of my products have been added manually... I did not use anything like Easy Populate to add my products. Pulling my hair out here!

27 Feb 2014, 10:34 PM
#9
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: The search on my store is not working properly

Lets recap...

  • You have a problem with 'newly added' products not showing in the search
  • You can recreate this problem further by adding more new products to the same category/sub-category
  • You have checked that the category to products structure is: category -> sub-category -> product
  • The rest of your site works just fine when it comes to searching anything and everything else except the 'newly added' products
  • The Classic Green Template is still green and no changes occur to the original problem
  • There are no new updates or attempted updates plugins or other test codes on the site

Jump in here if I missed something...

Have you checked that the advanced search and advanced search result php files are original?

Because really the product information is just data in the database. Assuming it's not corrupt in some way - special characters or other, that points at the module doing the work of looking for the data in the database.

Switching to the Green template just rules out the includes/templates folder as a primary source.

Try testing it with one new category and one new product, add some unique text to the product and see if it will find the unique text for that new unique product.

Eat a chocolate bar, they help with stress ;)

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

27 Feb 2014, 11:25 PM
#10
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

twitchtoo:

Lets recap...

  • You have a problem with 'newly added' products not showing in the search
  • You can recreate this problem further by adding more new products to the same category/sub-category
  • You have checked that the category to products structure is: category -> sub-category -> product
  • The rest of your site works just fine when it comes to searching anything and everything else except the 'newly added' products
  • The Classic Green Template is still green and no changes occur to the original problem
  • There are no new updates or attempted updates plugins or other test codes on the site

Jump in here if I missed something...

Have you checked that the advanced search and advanced search result php files are original?

Because really the product information is just data in the database. Assuming it's not corrupt in some way - special characters or other, that points at the module doing the work of looking for the data in the database.

Switching to the Green template just rules out the includes/templates folder as a primary source.

Try testing it with one new category and one new product, add some unique text to the product and see if it will find the unique text for that new unique product.

Eat a chocolate bar, they help with stress ;)

All of the bullet points you listed are accurate. I just tried creating a new category and adding a new product to it, and the search will not find that product either. I found some people having similar issues with their search engine which were related to the collation of the products_name and products_description fields in the products_description table, and I don't think that is the issue because mine are set to latin1_general_ci which is a case insensitive collation... and no matter how I change the case of the search term, the products still are not indexed in the results.

It's also worth noting that the product search on the admin side returns the results just fine.

I am going to compare my advanced_search.php and advanced_search_result.php to the originals right now. Will report back soon.

27 Feb 2014, 11:41 PM
#11
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: The search on my store is not working properly

you're getting closer... :)

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

28 Feb 2014, 1:41 AM
#12
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

lolwaut:

All of the bullet points you listed are accurate. I just tried creating a new category and adding a new product to it, and the search will not find that product either. I found some people having similar issues with their search engine which were related to the collation of the products_name and products_description fields in the products_description table, and I don't think that is the issue because mine are set to latin1_general_ci which is a case insensitive collation... and no matter how I change the case of the search term, the products still are not indexed in the results.

It's also worth noting that the product search on the admin side returns the results just fine.

I am going to compare my advanced_search.php and advanced_search_result.php to the originals right now. Will report back soon.

Well, I just replaced my advanced_search.php and advanced_search_result.php with the files from a clean install and it still doesn't work :no:

28 Feb 2014, 1:55 AM
#13
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

Okay! I feel like I'm making progress here. First of all, I found this thread: https://www.zen-cart.com/showthread.php?210215-Some-products-not-displaying-in-Search in which the poster was having the same exact problem as I am.

I know that it's the same exact issue, because I tried moving one of the offending products to a different category, and it showed up fine in search results! When I moved it back to it's original category (a newer category), it disappeared again. So, I have figured out that entire categories (recently created categories) are not being searched, whereas older categories are. Any products that reside in these newly created categories/subcats are not being indexed by the store search.

Now, the OP of the thread I linked says "Aha! That's the problem, right there: somewhere along the line, the template used for uploads lost its categories, which is why some could be searched, and others could not. This should be a pretty simple fix. Thanks so much!". Unfortunately, that's all the say and they don't elaborate on precisely HOW they fixed the issue.

Perhaps I have inadvertently screwed up whatever file is used to create new categories and/or products.

Any ideas??

28 Feb 2014, 2:09 AM
#14
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: The search on my store is not working properly

Compare your admin/categories.php with a stock version, then check into admin/includes/modules/category_product_listing.php

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

28 Feb 2014, 4:51 AM
#15
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

I compared both of those files to the vanilla files. I have two add-ons which have modified both of those files, the store credit add-on, and the hidden categories add-on. As a test, I replaced both files with the vanilla versions. It did not fix the problem. :(

Any other suggestions?

28 Feb 2014, 6:20 AM
#16
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: The search on my store is not working properly

I figured it out! It is due to a bug in the HiddenCategories mod. The file affected is /includes/modules/pages/advanced_search_result/header_php.php

I removed the modifications the HiddenCategories mod made to that file, and the search works perfectly now.

If anyone else has this issue, you can still hide products from your hidden categories from the search by modifying the WHERE statement in header_php.php and appending AND c.categories_id != '27'"; to then end of it where 27 is the ID of your hidden category.

Thanks for the help!

28 Feb 2014, 2:20 PM
#17
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: The search on my store is not working properly

Glad you tracked it down :)

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

12 Jun 2015, 6:10 PM
#18
samson62 avatar

samson62

New Zenner

Join Date:
Jun 2015
Location:
usa
Posts:
1
Plugin Contributions:
0

Re: The search on my store is not working properly

The search box on my home page is displayed but it will no take any text. It just ignors any effort at input.
b i g l i c k a t v . com. Thanks for any help.

13 Jun 2015, 5:32 AM
#19
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: The search on my store is not working properly

I just tried it on my iPad and could enter text.