davidcalabuig Posted July 21, 2016 Share Posted July 21, 2016 (edited) Hi Prestashopers, In version 1.6 when I search in my store, the following is added at the end of the URL: "?search_query=keyword&results=position" Leaving the URL like this: http://www.mystore.com/category/1-product.html?search_query=shoes&results=12 Is there any way to let clean URLs without the sentence: "?search_query=shoes&results=12"? Thank you very much, Best regards Edited July 22, 2016 by nest4 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2016 Share Posted July 21, 2016 in back office there is no option to remove this from url moreover - without modifications of prestashop core and theme - it will not be possible you can alter search block theme file and change method="get" to method="post" but this will work only for first page of search other will not work because it requires customer code development in search controller and theme files. Link to comment Share on other sites More sharing options...
davidcalabuig Posted July 22, 2016 Author Share Posted July 22, 2016 Thanks I found the solution thanks to your contribution. I mentioned the following lines of code within the file SearchController.php the folder controllers/front/ /*if (is_array($search['result'])) { foreach ($search['result'] as &$product) { $product['link'] .= (strpos($product['link'], '?') === false ? '?' : '&').'search_query='.urlencode($query).'&results='.(int)$search['total']; } }*/ Regards 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