sokpet Posted April 11, 2010 Share Posted April 11, 2010 HelloI want to place Quick Search in certain place inside Header.I made new Hook searchBlock, regestered this Hook in header.php, changed header.tpl accordingly.Now Quick search works and placed perfectly but Module Categories does not show up properly. Could you please help to find a mistake???blocksearch.php <?php class BlockSearch extends Module { function __construct() { $this->name = 'blocksearch'; $this->tab = 'Blocks'; $this->version = 1.0; parent::__construct(); $this->displayName = $this->l('Quick Search block'); $this->description = $this->l('Adds a block with a quick search field'); } function install() { if (!parent::install() OR !$this->registerHook('searchBlock')) return false; return true; } function hooksearchBlock($params) { global $smarty; $smarty->assign('ENT_QUOTES', ENT_QUOTES); $smarty->assign('ajaxsearch', intval(Configuration::get('PS_SEARCH_AJAX'))); return $this->display(__FILE__, 'blocksearch-top.tpl'); } function hookHeader($params) { if (Configuration::get('PS_SEARCH_AJAX')) return $this->display(__FILE__, 'header.tpl'); } } header.tpl > <html > <head> <title>{$meta_title|escape:'htmlall':'UTF-8'}</title> {if isset($meta_description) AND $meta_description} <meta name="description" content="{$meta_description|escape:htmlall:'UTF-8'}" /> {/if} {if isset($meta_keywords) AND $meta_keywords} <meta name="keywords" content="{$meta_keywords|escape:htmlall:'UTF-8'}" /> {/if} <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico" /> {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} [removed][removed] [removed] var baseDir = '{$content_dir}'; var static_token = '{$static_token}'; var token = '{$token}'; var priceDisplayPrecision = {$priceDisplayPrecision*$currency->decimals}; [removed] [removed][removed] [removed][removed] [removed][removed] {if isset($js_files)} {foreach from=$js_files item=js_uri} [removed][removed] {/foreach} {/if} {$HOOK_HEADER} </head> <body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}> {if !$content_only} </pre> <ul>{l s='This shop requires JavaScript to run correctly. Please activate JavaScript in your browser.'}</ul> <br><div> <!-- Header --> {$HOOK_TOP} INICIO PRODUCTOS SERVICIO MI-CUENTA CONTACTOS {$HOOK_SEARCHBLOCK} <!-- Left --> {$HOOK_LEFT_COLUMN} <!-- Center --> {/if} < Link to comment Share on other sites More sharing options...
Jimbola Posted July 23, 2010 Share Posted July 23, 2010 Hi,This won't help, but I don't think this is happening as a result of your changes.Moving the position of the quick search does this to the categories. The onl;y way around is to move the categories block to a slightly different position. Link to comment Share on other sites More sharing options...
tomerg3 Posted July 23, 2010 Share Posted July 23, 2010 Check for JavaScript errors on your page (in Firefox -> Tools-> Error Console 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