Jump to content
Denton

[1.7.3.2] Hook ActionProductUpdate not working

Recommended Posts

Hi all,

I'm working to a custom module but I've got a problem that I don't understand.

I'm tring to use the hook ActionProductUpdate, but it seems never called.

I can see the hook correctley registred into DB with my module, but when I save the product the hook doesn't work,

In debug mode I don't see the ActionProductUpdate call!

Have you got any ideas?

Thanks to all for help 

public function install() {
        if (!parent::install() 
             || ! $this->registerHook('displayAdminProductsExtra')
			 || ! $this->registerHook('actionProductUpdate')
        ) {
            return false;
        }

        return true;
    }
	
	public function hookActionProductUpdate($params) {
     die();
    }

 

Edited by Denton (see edit history)

Share this post


Link to post
Share on other sites

just do your logic in  

hookActionProductUpdate 

function because update action working with ajax and you cant make break point


 
Edited by ahmed elnoor (see edit history)

Share this post


Link to post
Share on other sites

Any solution to test your break point is add a die() just in module hook listener, something like die('OK') and test it with dev tools:

image.png.d942ff3aec04dea77de7d482d6d8fd74.png

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More