Jump to content

Prestashop 1.7.4 and displayCustomerAccountFormTop


Recommended Posts

Hi,

I'm trying to use displayCustomerAccountFormTop in a module to make a div appear before the registration form.

This is my simple code:

public function hookdisplayCustomerAccountFormTop($params) 
    {
		return $this->display(__FILE__, 'hookdisplayCustomerAccountFormTop.tpl');
    }

But it does not seem to have effect even if, by checking the AuthController.php file, I can see it:

if (Tools::isSubmit('submitCreate') || Tools::isSubmit('create_account')) {
............
$this->context->smarty->assign([
                'register_form'  => $register_form->getProxy(),
                'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop')
            ]);

Why is not it working? Can it depend on the template? Is there any kind of verification I can do?

Thank you

 

EDIT: as additional information I am seeing that the set hook does not appear in the hook_module DB table. Should not it be there?
This is the registration code:

public function install() {
		 return (
                parent::install() &&
				$this->installSql() &&
				$this->registerHook('displayCustomerAccountFormTop')
            ); 
    }   

 

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

4 minutes ago, Nishith said:

Hi...

you have register "displayCustomerAccountFormTop" hook in your module install method ?

Thanks

 Hi, thanks for your message. I was in fact updating the first post with this information.

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