Sprenzy Posted July 11, 2013 Share Posted July 11, 2013 Hi, I am having a problem with prestashop search whereby I am not getting the results I need. The products in my shop will mostly be found by using a part number, for instance HJ12345. When entering into the search field 12345 I do not get a result. The search requires the full part number to be entered. Is there any way around this? Maybe a module? (could not find) Thanks Link to comment Share on other sites More sharing options...
Miniwheels-online_com Posted November 16, 2013 Share Posted November 16, 2013 I have the same problem, is there a solution? Link to comment Share on other sites More sharing options...
Sprenzy Posted November 19, 2013 Author Share Posted November 19, 2013 No solution as yet that i know of except for entering aliases for each product under preferences - search. Alternatively you can add the different search options in a <p style="display: none;"> tag in the product description field. This will not be visible to your customers but the search picks it up. Link to comment Share on other sites More sharing options...
stottycabanas Posted November 19, 2013 Share Posted November 19, 2013 The search requires the full part number to be entered. Hi Sprenzy, The search doesn't quite work like that. Please see this thread for more info and a possible solution. http://www.prestashop.com/forums/topic/280306-native-prestashop-search-module-issuessolved-casesimprovementsother Cheers, Dave Link to comment Share on other sites More sharing options...
Sprenzy Posted November 19, 2013 Author Share Posted November 19, 2013 Hi stottycabanas, Why do you say that? I got it working on my site using: <p style="display: none;"> in the description field? my site is www.sparepower.co.za. try search 'ZX670' and 'ZX 670'(with a space) both results will yield product HJ4676385. As you can see on the product page for HJ4676385 you will not see 'ZX 670'(with a space), it is in a <p style="display: none;"> tag. But it still shows up in results. Link to comment Share on other sites More sharing options...
stottycabanas Posted November 19, 2013 Share Posted November 19, 2013 Sprenzy, I say that because the search doesn't require the full search term - it compares the search term entered to the beginning part of any search words in the database. If a match is found, it then checks to see which product(s) have a link to that search word. Sorry to disillusion you, but you haven't 'got it working' at all, I'm afraid. The css styling you added has no bearing on how the search works. In the example you gave, ZX670 and ZX 670 returned the same product because you have different search words in your database linked to that product. One starts with ZX670 and the other with 670 - check the search tables via phpmyadmin. Searching on ZX 670, the system will drop the ZX part because it is below the minimum search word length (3 in your case) and look for and find a match on 670 (try just searching for 670 - HJ4676385 is returned). Then try searching for X670 (nothing found) and ZX67 (product found). You have added some logic to switch to a Contact Us page when the search produces no results - unfortunately the advice provided to your customers on that page is misleading. I hope the above information is of help to you. Cheers, Dave 1 Link to comment Share on other sites More sharing options...
Sprenzy Posted November 19, 2013 Author Share Posted November 19, 2013 Hi stottycabanas, i do appreciate that explanation big time. Seems i have made a huge error! Will the solution posted in the thread you shared with me by PascalVG sort my problem out? Thanks once again for your help!!! Link to comment Share on other sites More sharing options...
stottycabanas Posted November 19, 2013 Share Posted November 19, 2013 No problem, Sprenzy. I haven't tried Pascal's solution for making the search operate on a wild card basis, but I would be confident that it works. He does however caution that there could be a performance hit. You may want to experiment with his changes in a test environment and see if it does the job for you. Good luck, Dave Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now