Jump to content

Problem installing Wiznav in 1.5 (help requested)


Recommended Posts

Hello all

 

I am relatively new to Prestashop but I am picking it up. I recently downloaded and installed Wiznav. However the instructions for assigning it to a hook tell me to amend the 'header.php'. To quote the instructions:

 

4. Open your header.php file and edit the following:

$smarty->assign(array(

'HOOK_HEADER' => Module::hookExec('header'),

'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),

'HOOK_TOP' => Module::hookExec('top'),

'static_token' => Tools::getToken(false),

'token' => Tools::getToken(),

'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,

'content_only' => intval(Tools::getValue('content_only'))

));

 

5. Edit it to the following:

$smarty->assign(array(

'HOOK_HEADER' => Module::hookExec('header'),

'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),

'HOOK_WIZNAV' => Module::hookExec('wiznav'),

'HOOK_TOP' => Module::hookExec('top'),

'static_token' => Tools::getToken(false),

'token' => Tools::getToken(),

'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,

'content_only' => intval(Tools::getValue('content_only'))

));

 

However, when I open my header.php all I see is:

 

if (isset(Context::getContext()->controller))

$controller = Context::getContext()->controller;

else

{

$controller = new FrontController();

$controller->init();

}

Tools::displayFileAsDeprecated();

$controller->displayHeader();

 

I know I must be doing something wrong or that 1.5 is very different in where this information is stored.

 

I should really appreciate some help and advice please.

 

Mike

Link to comment
Share on other sites

  • 4 weeks later...

Hi Mike.

Here you can download Wiznav for prestashop 1.5 http://dl.dropbox.co...4116/wiznav.zip

Hi, Marek Mnishek! I have a same experience like Mike's problem. I go to http://dl.dropbox.com/u/5104116/wiznav.zip. But so sorry, I find this :

Error (404)

 

We can't find the page you're looking for. Check out our Help Center and forums for help, or head back to home.

Link to comment
Share on other sites

Hi, SERTIUS! I find an idea and it works.

I still copy this at the end of header.php file :

 

 

$smarty->assign(array(

'HOOK_HEADER' => Module::hookExec('header'),

'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),

'HOOK_WIZNAV' => Module::hookExec('wiznav'),

'HOOK_TOP' => Module::hookExec('top'),

'static_token' => Tools::getToken(false),

'token' => Tools::getToken(),

'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,

'content_only' => intval(Tools::getValue('content_only'))

));

 

Then open public_html/classes/controller/FrontController.php and edit this (I find it at line of 448) :

 

 

'HOOK_HEADER' => Hook::exec('displayHeader'),

'HOOK_TOP' => Hook::exec('displayTop'),

 

Add 'HOOK_WIZNAV' => Module::hookExec('wiznav'), Finally you see like this :

 

'HOOK_HEADER' => Hook::exec('displayHeader'),

'HOOK_WIZNAV' => Module::hookExec('wiznav'),

'HOOK_TOP' => Hook::exec('displayTop'),

Edited by yusufzulkarnain (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Sertius,

I just upgraded to version 1.5.3 and my solution to get Wiznav working is to :

 

1)

Add the Wiznav hook to the header.tpl file of your current theme (add the following line of code)

 

 

...

<!-- Header -->

<div id="header" class="grid_9 alpha omega">

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

<img class="logo" src="{$img_ps_dir}logo.jpg?{$img_update_time}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />

</a>

 

{$HOOK_WIZNAV}

 

<div id="header_right" class="grid_6 omega">

{$HOOK_TOP}

</div>

...

 

 

*You can play with the position of the menu bar to suit your needs.

 

 

2)

Assign Wiznav to this hook in classes\controller\FrontController.php file by adding the following line

 

 

...

$this->context->smarty->assign(array(

'HOOK_HEADER' => Hook::exec('displayHeader'),

'HOOK_WIZNAV' => Module::hookExec('wiznav'),

'HOOK_TOP' => Hook::exec('displayTop'),

'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),

'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),

));

...

 

 

Hope this helps.

Edited by sean1234 (see edit history)
Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...