Jump to content

WrapperTop hook not working, prestashop 1.7


Recommended Posts

Hello,

I created a module that works correctly on my localhost, but when I install on the client server (same version of Presta => 1.7), the hook "DisplayWrapperTop" does not work (i.e when I return a .tpl file in it or if I echo something nothing shows up).

I am looking for a way to debug this situation, or if you have the solution it would be even better. In the code below, just "hookDisplayFooter" shows up:

<?php

if (!defined('_PS_VERSION_'))
	exit;


class TheModule extends Module
{

	function __construct()
	{
		$this->name = 'themodule';
		$this->tab = 'front_office_features';
		$this->version = '1.0';
		$this->author = 'My Name';
		$this->need_instance = 0;

		$this->bootstrap = true;
	 	parent::__construct();

		$this->displayName = $this->l('Le module test');
		$this->description = $this->l('Juste un essai');
		$this->confirmUninstall = $this->l('Are you sure you want to do it?');
	}


	public function install()
	{
		if (!parent::install() OR
			!$this->registerHook('WrapperTop') OR
			!$this->registerHook('Footer')
		)
			return false;
		return true;
	}



	public function uninstall()
	{
		if (!parent::uninstall()
			)
			return false;
		return true;
	}



	public function hookDisplayFooter($params)
	{

		print_r("hookDisplayFooter");

	}

	public function hookDisplayWrapperTop($params)
	{
		print_r("hookDisplayWrapperTop");
	}


}

Thanks

 

 

p.s.: "I checked in the Design > positions, and my module is the only one present in displayWrapperTop

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

  • 4 weeks 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...