pszilard Posted January 1, 2014 Share Posted January 1, 2014 Hi, Using the default theme, I have TWO Search fields on my site (LINK). I would like to swap the topmost one with either a graphic or a text box. Can someone please help me on how to do this? Thanks, and Happy New Year! Link to comment Share on other sites More sharing options...
Ray UK Posted January 1, 2014 Share Posted January 1, 2014 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 1 Link to comment Share on other sites More sharing options...
vekia Posted January 1, 2014 Share Posted January 1, 2014 oops i can't open your website:( Link to comment Share on other sites More sharing options...
pszilard Posted January 1, 2014 Author Share Posted January 1, 2014 Sorry about that. I have USA access enabled. I am turning geothingy off for now. Link to comment Share on other sites More sharing options...
pszilard Posted January 2, 2014 Author Share Posted January 2, 2014 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 More sharing options...
pszilard Posted January 2, 2014 Author Share Posted January 2, 2014 (edited) Furthermore, as an experiment, I renamed blocksearch.tpl to OLD_blocksearch.tpl to see what happens, but it didn't make any visible changes. Where is the top search box referenced?. Edit: I then put the name back how it was. Edited January 2, 2014 by pszilard (see edit history) Link to comment Share on other sites More sharing options...
Ray UK Posted January 2, 2014 Share Posted January 2, 2014 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 More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 also make sure that this file isn't overrided by your theme in themes/YOUR_THEME//modules/blocksearch/blocksearch-top.tpl if this file exists there - it mean that you have to change this one (not original from modules dir) Link to comment Share on other sites More sharing options...
pszilard Posted January 2, 2014 Author Share Posted January 2, 2014 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 More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 thanks for confirmation where the problem was anyway, now everything works well? Link to comment Share on other sites More sharing options...
pszilard Posted January 2, 2014 Author Share Posted January 2, 2014 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 More sharing options...
vekia Posted January 3, 2014 Share Posted January 3, 2014 definitely, it's topic totally not related to this one thanks in advance 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