Presta1.5.4.1Newbies Posted July 18, 2013 Share Posted July 18, 2013 I am having a problem with search function on top menu. I can search none of the products. Which file I should fix? As I understand I should fix "serach.php" or tools.php or else? This is my url www.grandcoralaustralia.com.au/Grandcoral Attached is my css and header.tpl This is an error report Warning: File /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/search.php is deprecated in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/classes/Tools.php on line 1845 Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/classes/Tools.php:1845) in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/classes/Tools.php on line 105 Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/classes/Tools.php:1845) in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/Grandcoral/classes/Tools.php on line 108 global.cssV10.cssFetching info... header.htmlFetching info... Link to comment Share on other sites More sharing options...
vekia Posted July 18, 2013 Share Posted July 18, 2013 it's related to the block top menu module, you've got there search block, not in header.html / css you have to change the url to: index.php?controller=search because search.php is deprecated Link to comment Share on other sites More sharing options...
Presta1.5.4.1Newbies Posted July 18, 2013 Author Share Posted July 18, 2013 I On 7/18/2013 at 10:03 AM, vekia said: it's related to the block top menu module, you've got there search block, not in header.html / css you have to change the url to: index.php?controller=search because search.php is deprecated In which file? search.php Link to comment Share on other sites More sharing options...
vekia Posted July 18, 2013 Share Posted July 18, 2013 no. The problem is related to the block top menu, you have search block there. show please the contents of the blocktopmenu.tpl file located in modules/blocktopmenu/ directory Link to comment Share on other sites More sharing options...
Presta1.5.4.1Newbies Posted July 18, 2013 Author Share Posted July 18, 2013 (edited) I Template file cannot attach here. Can I save as html? {if $MENU != ''} <div id="topmenu"> <ul class="sf-menu clearfix"> {$MENU} {if $MENU_SEARCH} <li class="sf-search noBack"> <form id="searchbox" action="search.php" method="get"> <input type="hidden" value="position" name="orderby"/> <input type="hidden" value="desc" name="orderway"/> <input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" /> </form> </li> {/if} </ul> </div> {/if} search.phpFetching info... SearchController.phpFetching info... Edited July 18, 2013 by Xarapauy (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 18, 2013 Share Posted July 18, 2013 On 7/18/2013 at 10:19 AM, Xarapauy said: I did not change anything in search.php. please read my post carefully: Quote no. The problem is related to the block top menu, you have search block there. show please the contents of the blocktopmenu.tpl file located in the modules/blocktopmenu/ directory Link to comment Share on other sites More sharing options...
Presta1.5.4.1Newbies Posted July 18, 2013 Author Share Posted July 18, 2013 On 7/18/2013 at 10:22 AM, vekia said: please read my post carefully: sorry about that. The blocktopmenu.tpl is posted up there. Link to comment Share on other sites More sharing options...
vekia Posted July 18, 2013 Share Posted July 18, 2013 voila, as i said, the problem is there: <form id="searchbox" action="search.php" method="get"> change it to: <form id="searchbox" action="{$link->getPageLink('search')}" method="get"> Link to comment Share on other sites More sharing options...
Presta1.5.4.1Newbies Posted July 18, 2013 Author Share Posted July 18, 2013 Vekia thanx for the guide This is how I fix ;-). Anyhow, I want to close the gap between the top and bottom of the topmenu ;-( {if $MENU != ''} <!-- Menu --> <div id="topmenu"> <div class="sf-contener clearfix"> <ul class="sf-menu clearfix"> {$MENU} {if $MENU_SEARCH} <li class="sf-search noBack" style="float:right"> <form id="searchbox" action="{$link->getPageLink('search')}" method="get"> <p> <input type="hidden" name="controller" value="search" /> <input type="hidden" value="position" name="orderby"/> <input type="hidden" value="desc" name="orderway"/> <input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" /> </p> </form> </li> {/if} </ul> </div> <div class="sf-right"> </div> <!--/ Menu --> {/if} Link to comment Share on other sites More sharing options...
rose77 Posted December 17, 2013 Share Posted December 17, 2013 (edited) Hello Vekia, I did the update on my blocktopmenu.tpl file, but when i submit the query , in the url i still have this: http://mywebsite/index.php?search_query=lampe&orderby=position&orderway=desc So because of that my search failed And if i had in the url "controller=search" it's work http://mywebsite/index.php?controller=search&search_query=lampe&orderby=position&orderway=desc I don't know how to add "controller=search" in my URL, i did action="{$link->getPageLink('search')}" If i write the URL directly it will be working for sure, but it's not the good solution Thanks in advance for your reply Edited December 17, 2013 by rose77 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 17, 2013 Share Posted December 17, 2013 {$link->getPageLink('search')}&controller=search you can use code above. what ps version you use? and theme ? (default?) Link to comment Share on other sites More sharing options...
rose77 Posted December 17, 2013 Share Posted December 17, 2013 (edited) Thanks for your quickly reply but it's not working, should i clear something ? i clear the cache but nothing too still have this in url:http://mywebsite/index.php?search_query=lampe&orderby=position&orderway=desc I use Prestashop PrestaShop™ 1.5.4.1, and the theme yes it's the default one Edited December 17, 2013 by rose77 (see edit history) Link to comment Share on other sites More sharing options...
rose77 Posted December 17, 2013 Share Posted December 17, 2013 Hey, I found the solution, in fact i have to update the blocksearch-top.tpl in module/blocksearch and add : <input type="hidden" name="controller" value="search" /> and now when i submit my query i have in my URL controller=search Link to comment Share on other sites More sharing options...
vekia Posted December 17, 2013 Share Posted December 17, 2013 very nice thank you for sharing this the weirdest thing: just wondering why {$link->getPageLink('search')} variable genereates wrong link anyway, thank you for solution 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