Jump to content

[SOLVED] [PS v8.1.3] Hook to change the product combination when saving it.


Recommended Posts

Is there a hook triggered when saving/updating a combination in the product administration form? Something similar to hookActionObjectProductUpdateBefore?

I would like to dynamically change some combination values as I save them
I tried hookActionObjectProductAttributeUpdateBefore but it is not triggered.
I also tried to do it via hookActionObjectProductUpdateBefore, but it is only triggered when saving the product. When saving a combination, it is not triggered.

Maybe there is another way this can be done?

Edited by REGE
[SOLVED] (see edit history)
Link to comment
Share on other sites

Hi.

hookActionObjectCombinationAddAfter

hookActionObjectCombinationAddBefore

hookActionObjectCombinationUpdateAfter

hookActionObjectCombinationUpdateBefore

./classes/Combination.php

$idCombination = $params['object']->id;

$idProduct = $params['object']->id_product;

 

Edited by ps8moduly.cz (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • REGE changed the title to [SOLVED] [PS v8.1.3] Hook to change the product combination when saving it.

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