Muller Posted July 21, 2011 Share Posted July 21, 2011 Hello,<br/><br/>I have an idea to create a module for the left column that will display all categories and sub categories and place check boxes by every sub category. The idea is that every time a check box is selected, I check which check boxes are selected and create a string out of that, and send that string to the search module.<br/><br/>Basically I want to re-use code in the search module.<br/><br/>However, I can't get the default search to do what I want. In the default theme, if I search "ipod laptops" it doesn't return anything. I want that search query to return ALL ipods and laptops.<br/><br/>Is there a search query that will do that?<br/>Also, is my idea for the module good?<br/><br/>Thanks. Link to comment Share on other sites More sharing options...
vivek tripathi Posted July 21, 2011 Share Posted July 21, 2011 It's so simplethis can be achieve with the help of jquery first of list category and subcategory with the check box you can easily get value of checked category and redirect to urlsearch.php?orderway=desc&search_query=ipodIf you still found problem in creating module then explain me which type of search query you want to create on check box clicked . So that I can help in better way Link to comment Share on other sites More sharing options...
Muller Posted July 21, 2011 Author Share Posted July 21, 2011 My only problem is getting the right search query that will display all products in two different categories.For example: What is the search query that will display all products in "ipods" and in "laptops"? I want to see all ipods AND laptops.I can test the query in the regular search box, I just need to know the correct query string Link to comment Share on other sites More sharing options...
vivek tripathi Posted July 22, 2011 Share Posted July 22, 2011 Hi MullerI have made a small changes in classes/Search.php file, attached belowNowQuery string should be likethis/search.php?orderby=position&orderway=desc&search_query=laptop,neeraj&submit_search=Search&search_query=laptop,ipod&search_query=laptop and ipod&search_query=laptop&ipod;&search_query=laptop+ipod&search_query=laptop ipod&search_query=laptop ipod&search_query=laptop&search_query=MacBook search.txt 1 Link to comment Share on other sites More sharing options...
Muller Posted July 22, 2011 Author Share Posted July 22, 2011 It works, you're the best man seriously thanks. VERY nice of you to even write the code for me! Now to brush up on my php and SQL so I can understand all of this Link to comment Share on other sites More sharing options...
Lee Posted November 28, 2011 Share Posted November 28, 2011 thanks Vivek, this works great. Allows for multiple search terms perfectly with the standard prestashop search! 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