Zen Cart Logo
Forums / General Questions / search not working

search not working

Views: 5,253

Results 1 to 20 of 28
5 Dec 2009, 2:41 AM
#1
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

search not working

I installed Zen Cart 1.3.8a and the shop where I installed it is working properly, I can add categories and products and they can be viewed but the problem is when I searched for that product or any in through my website, it always saying that "There is no product that matches the search criteria". I am new and I couldnt find a solution for this problem. I did not change anything yet, its a fresh installation and the website where I installed mine is

http:https://www.fahimagu.com/shop

Any answer will be highly appreciated.
Thanks

5 Dec 2009, 4:17 AM
#3
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks a lot, that rings a bell. Until your reply, I was lost in nowhere and was thinking whether its a problem of zen cart or where I host my site. Now I think its a problem in zen cart where I could try to fix. Thanks. However, I will still be very happy if somebody else could help me with fixing the problem. Thanks

5 Dec 2009, 5:24 PM
#4
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

I installed a fresh copy of zen cart 1.38a and after adding a category and some 2 products to that category and when I searched for the products I listed, nothing appears at first. When I posted that probelm in here, somebody had a look at my website and told me that if the product title has any Uppercase letters, nothing appears in search results and then I changed the product titles to lower case and it works fine. But I need to use correct format of English and the titles should be starting with Uppercase letters and so on. Anybody has any idea how my search results will bring up the results ignoring the upper/lower case.

My website I am trying to set the storefront is
http://www.fahimagu.com/shop

Any help will be highly appreciated.
Thanks

5 Dec 2009, 5:38 PM
#5
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

I would go back and check to make sure no files were modified for advanced_search_result, including:

includes/modules/pages/advanced_search_result/header_php.php
includes/templates/YOUR_TEMPLATE/tpl_advanced_search_result.php

When I click on your "All Products" link, I see two Nintendo products, however when I search for "Nintendo" I only see one. I was unable to replicate the behavior regarding capitalization from the post above.

The quickest thing to do will be to switch back to the classic template and see if the issue goes away; if it does, then you know it's in your custom template files somewhere. If you've been editing files under includes/modules/pages, then all bets are off, you've introduced a bug that you'll have to track down.

Good luck!

5 Dec 2009, 5:40 PM
#6
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

One other thing: Your template doesn't set up you language defines correctly. You should not be seeing the "HEADING_TITLE" on the home page.

5 Dec 2009, 5:54 PM
#7
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

thanks for the quick reply. I am in the process of editing the site however, I DID NOT TOUCH any SEARCH PAGES. Its still there as it is and even when I switched to classic template, same problem: ie; I can browse the products but when I searched for the items, only titles that matched the search with lowercase appears. For instance if you seached for "Nintendo" only one item appears but if you searched for "intendo" you will get the two items there. You can see how I wrote the products titles.
Any help would be highly appreciated.
Thanks

6 Dec 2009, 5:57 AM
#8
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

Are you using MySQL for the backend? If so, what version? Have you changed any system settings on MySQL? Normally, database searches are not case-sensitive.

6 Dec 2009, 4:10 PM
#9
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks but as I said before, I havent touch anything relating to search and especially the database. I am a novice and I have no idea how I could access the database. I have only been fiddling with banner boxes and things like greeting messages.
I had a look at the control panel of my hosting provider (hostmonster) and I found out that I am using MySQL and the version is 5.0.81-community-log. Any help would be highly appreciated.
Thanks

7 Dec 2009, 5:49 AM
#10
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

I looked at this a little more and I don't think it's a file issue. I think the Nintendo DSi product got corrupted in the database somehow. It doesn't come up no matter what you search on. If you search for "DSi" you don't get any products at all. Can you please delete the DSi and re-add it? Afterward, try searching for "Nintendo" again. Do you see both products?

7 Dec 2009, 9:15 AM
#11
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks Tick. I am trying to follow your instructions very carefully and as you have suggested, I deleted the DSi product and add it again but the description this time will be more or less like a Nintendo product description. The product description last time was bla bla.
Anyway, I have relisted the DSi product and also I listed some two books in books category and intentionally I have listed one book heading in all lowercase and the other book in Upper and lower case. You can see it in my webpage, http://www.fahimagu.com/shop
As I have mentioned in an earlier post, when I searched for "The Sea of adventure", it says "There is no product that matches the search criteria" but if changed the search query to "adventure" which is infact a part of the product title I searched ealier and this time the search result brought up the correct product.

More search results
Searched for "DS", the result is "There is no product that matches the search criteria"
Searched for "Nintendo", the result is 1 product "nintendo DS lite"
Searched for "intendo" which is a part common to both Nintendo products, the result is 2 products "nintendo DS lite" and "Nintendo DSi"

Once again thanks for the help being given.

7 Dec 2009, 12:29 PM
#12
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

Weird. Do you have any languages installed other than English? Are all the products of the "Product - General" product type?

7 Dec 2009, 12:39 PM
#13
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks,
Its a fresh copy of zen-cart and I havent so far install any language packs or any add-ons. Products may be listed in free shipping and general. But I dont think its a problem cos I have said earlier, if I list the products with lower case titles, then evereything is fine but once there is some uppercase letters in the titles of the items, hmmm problem occurs, well, its not a problem but only its out of sight for search, isnt it. Have you searched as I said earlier.

8 Dec 2009, 1:54 PM
#14
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

Getting very close to being stumped. I have no idea why the DS search isn't working. The capitalization issue may be from the collation settings in your products_description table.

Can you go into your control panel (from your hosting provider) and look for an option called phpMyAdmin? Go into that application, select your database (it will be called whatever you named it -- it's probably the only one there), select the products_description table (there may be a prefix on the name if you set one), and look at the structure of the table. In the collation column, does the products_name field have a value of "utf8_general_ci"? If you hover over that value, it should say something like "Unicode, case-insensitive."

8 Dec 2009, 6:26 PM
#15
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks Tick, I trully appreciate your help.
I am trying to follow your instructions but I think I may get lost easily in your directions now. As I said before, I am a novice and I dont know anything about Databases and stuff and I never gave a name to a database myself. When I installed zen-cart in my hosting place, it was all automatic, ie; everything was done for me and all I have to do was start adding products, of course, I may have to cofigure some things. Anyway, I tried to follow your instructions and was able to open the databse and I found that place you instructed and when I hover over that value, it said "Unicode (multilingual) Binary".
Also, you can see a picture of it through my the URL given below. I hope it will be of some help for you.

http://www.fahimagu.com/shop/index.php?main_page=product_info&cPath=3&products_id=6

thanks

9 Dec 2009, 3:41 AM
#16
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

I think we may have found it -- the case sensitivity issue, anyway. Your provider's script set up the database wrong. MySQL treats binary collations as case sensitive, meaning "Nintendo" would not be the same as "nintendo". Try the following on the products_description and manufacturers tables:

  1. Go to the structure of the table (as you did in the screenshot you linked to).
  2. Check the box on the left of each row that has a collation listed. In the screenshot you made, that would be for the rows containing products_name, products_description, and products_url.
  3. Edit the checked items by clicking on the pencil down at the bottom of the listing. I've edited in a big red arrow pointing to it in the attached screenshot.
  4. A screen will come up listing the properties of each field. Change the collation to "utf8_general_ci". For each field.
  5. Click "Save".
  6. Try the "Nintendo" search again. You should get both products.
  7. If it works, you will need to repeat the process (except for testing the search) on every table in the cart.
    You might also want to try the "DS" search again. I'm not sure why that one isn't working, but it will be nice if this fixes it too! :smile:

BTW, don't worry about being a beginner. We all started somewhere. You managed to navigate around in phpMyAdmin using only my (sketchy) instructions, so I'd say you're doing pretty well!

10 Dec 2009, 4:05 AM
#17
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

THANKS THANKS THANKS, its wonderful, and its working fine, atleast my problem for the timebeing is solved. THANKS.
I dont how could I thank you. I have been away from this computer last 24hrs and thats why I couldnt answer sooner. I just changed the field/s you instructed and now everything is fine, no matter in what case the product is listed. I am so happy and I hope you would be willing to help all of us when we need your help. Thanks TICK.

10 Dec 2009, 4:42 AM
#18
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

No problem at all. Glad I could help. This forum really is one of the best reasons to use Zen Cart. There are a whole host of people here willing to help all of us out when we get stuck.

Don't forget to change the collation values in the other tables (especially customers). Otherwise, you'll get odd behavior with other pages as well.

Good luck with your store!

11 Dec 2009, 2:38 AM
#19
geel avatar

geel

New Zenner

Join Date:
Nov 2009
Location:
Maldives
Posts:
22
Plugin Contributions:
0

Re: search not working

Thanks Tick. I want to follow your advice but since its a lot of work to change all those, is there a way I can use the site without bringing the changes you mentioned?
I have checked a little, I mean, a member logged in and he tried everything by himself and found no problem so far in searching any products that it listed. I havent configured a lot of things like, languages, shipping, store name, locations and especially the "online payment" part yet and therefore one cant test the site for the full functionality yet. I hope everything will be fine. Lets hope for the best. If you know or think of any apparent issues invloved in if I didnt bring those changes you said, please tell me. I dont want to touch anything that is not needed. Your help will be much appreciated.
Thanks.

11 Dec 2009, 4:37 AM
#20
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: search not working

You can certainly give it a try. However, it may be worth it to put in the time up front rather than chase problems around later.

At a minimum, do the customers table (if you haven't already). Otherwise, people's email addresses will be case sensitive when they try to log in.

I can't speak to the payment modules. I can't think of a reason off the top of my head why they wouldn't work, however we only use two of them.