Jump to content

How can I swap out top Search field?


Recommended Posts

A simple way for you to do this would be...

 

Inside your modules dir, go into blocksearch and copy blocksearch-top.tpl to

 

themes/YOURTHEME/modules/blocksearch/blocksearch-top.tpl

 

change the contents of it to this


<!-- block seach mobile -->
{if isset($hook_mobile)}
{else}
<!-- Block search module TOP -->
<div id="search_block_top">

CUSTOM TEXT OR IMAGE GOES HERE

</div>

{/if}
<!-- /Block search module TOP -->

This if statement will stop it showing on mobile devices, so if you also want it on mobiles, then remove these lines too

{if isset($hook_mobile)}{else}
{/if}

That should do the trick
 

  • Like 1
Link to comment
Share on other sites

blocksearch-top.tpl doesn't exist. Only blocksearch.tpl with contents:

 

 

 

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

<!-- Block search module -->
<div id="search_block_left" class="block exclusive">
    <p class="title_block">{l s='Search' mod='blocksearch'}</p>
    <form method="get" action="{$link->getPageLink('search', true)|escape:'html'}" id="searchbox">
        <p class="block_content">
            <label for="search_query_block">{l s='Enter a product name' mod='blocksearch'}</label>
            <input type="hidden" name="orderby" value="position" />
            <input type="hidden" name="controller" value="search" />
            <input type="hidden" name="orderway" value="desc" />
            <input class="search_query" type="text" id="search_query_block" name="search_query" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
            <input type="submit" id="search_button" class="button_mini" value="{l s='go' mod='blocksearch'}" />
        </p>
    </form>
</div>
{include file="$self/blocksearch-instantsearch.tpl"}
<!-- /Block search module -->
 
Link to comment
Share on other sites

blocksearch-top.tpl has to be there, as that is what is showing the search block (at the top), hence the name of it.

 

look in your root directory, and copy the file from:

/modules/blocksearch/blocksearch-top.tpl to the place I said

Link to comment
Share on other sites

A simple way for you to do this would be...

 

Inside your modules dir, go into blocksearch and copy blocksearch-top.tpl to

 

themes/YOURTHEME/modules/blocksearch/blocksearch-top.tpl

 

change the contents of it to this


<!-- block seach mobile -->
{if isset($hook_mobile)}
{else}
<!-- Block search module TOP -->
<div id="search_block_top">

CUSTOM TEXT OR IMAGE GOES HERE

</div>

{/if}
<!-- /Block search module TOP -->

This if statement will stop it showing on mobile devices, so if you also want it on mobiles, then remove these lines too

{if isset($hook_mobile)}{else}
{/if}

That should do the trick

 

 

My mistake - I didn't comprehend your instructions properly. My bad. After re-reading it, I realized that I had to Copy blocksearch-top.tpl from /modules/blocksearch to the Theme's modules folder.

 

I now understand, and had done it, and it worked. Many thanks! Really appreciate your help, guys! :)

Link to comment
Share on other sites

Thanks Vekia. As a newbie, I am working through learning and polishing my first site. Not sure if I should start a separate thread for different questions, but I can't seem to get the OUR STORE(S) to work properly. Clicking on this it launches Google Maps, but it doesn't load the location and I can't figure where to place the address so that it gets passed to Google Maps. (Should this be a separate Thread?).

Cheers,

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