Jump to content

[SOLVED] Word Search in Front End returns "" in header after Search


Recommended Posts

Searching works in my shop but in the header simply read: SEARCH "" and does not show the words searched for. theme/search.tpl is below.

{capture name=path}{l s='Search'}{/capture}
{include file=$tpl_dir./breadcrumb.tpl}

{l s='Search'} {if $nbProducts > 0}"{if $search_query}{$search_query|escape:'htmlall':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'htmlall':'UTF-8'}{elseif $ref}{$ref|escape:'htmlall':'UTF-8'}{/if}"{/if}

{include file=$tpl_dir./errors.tpl}

{if !$nbProducts}


       {if $search_query}
           {l s='No results found for your search'} "{$search_query|escape:'htmlall':'UTF-8'}"
       {elseif $search_tag}
           {l s='No results found for your search'} "{$search_tag|escape:'htmlall':'UTF-8'}"
       {else}
           {l s='Please type a search keyword'}
       {/if}

{else}
{$nbProducts|intval} {if $nbProducts == 1}{l s='result has been found.'}{else}{l s='results have been found.'}{/if}
   {include file=$tpl_dir./product-sort.tpl}
   {include file=$tpl_dir./product-list.tpl products=$products}
   {include file=$tpl_dir./pagination.tpl}
{/if}

Link to comment
Share on other sites

  • 2 weeks later...

I'm having exactly the same problem. If I type anything in, say xyz, the search results page displays:


No results found for your search ""

It should read: No results found for your search "xyz"

should it not?

Any help would be greatly appreciated!

Thank you, everyone, who has helped me so far! I am so grateful, I am so pleased I chose to use prestashop!

Link to comment
Share on other sites

  • 1 month later...

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...