Jump to content

How to resolve the search box on top menu?


Recommended Posts

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

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 by Xarapauy (see edit history)
Link to comment
Share on other sites

  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

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

  • 4 months later...

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 by rose77 (see edit history)
Link to comment
Share on other sites

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 by rose77 (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...