Jump to content

hookActionProductAdd doesn't trigger in PS 1.7.4


veijari

Recommended Posts

Hi, we are trying to modify product ID when user manually add's a product via BO.

I found the hook  public function hookActionProductAdd($params), but it doesn't trigger at all. I have registered this hook in our module and reset the module after that, even reinstalled.

Test I did:

 public function hookActionProductAdd($params){
        $product = $params['product'];
        $productID = 10000 + $params['id_product'];
        $product->id = $productID;
        var_dump($product->id);
    }

Is this something you have encountered and how do we overcome this?

All help is appreciated :)

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

Hello,
this event is well triggered,

but in some cases on hooks,var_dump will not show, try to use

die('Event actionProductAdd Fired');

after your var_dump().

Then you should be able to show your var_dump().

& have a look if you get an override in (override/controllers/admin/AdminProductsController.php on "public function processAdd()"

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