Jump to content

Hook/trigger On Insert A New Product - Hookactionproductsave


Recommended Posts

Hi everybody,

 

First of all thanks to all the community for sharing al the knowledge about using PS, developing modules, etc.. it's always a GREAT help.

 

I use version 1.6.1.4 of PS.

I am trying to automate some process when inserting a new product.

 

Short version:

For a certain category of product, I would like to "automagically" add its declinaisons/combinations which are always the same four ones.

Is there a hook that exists to perform such a thing?

 

Long version:

Just for you to picture it more specifically, we sell jewels, and for a particular type/category of jewels, we propose a set of of finish/customization on top of the product, so there are no stock question involved, it's always there, it's a man made action on the product.

Besides the images for this customisations are always the same.

So at the end, all of the products for this category have all the same 4 combinations, thus all the same 4 images, with a one or more image for the product it self.

 

There is an extra combination for each product which is "no customisation", basically the product, unchanged, with the original photo of the product. 

I don't know if I have to create an extra combination for that to be able to unselect the combination on the front office.

 

I have seen here and there a hook called hookActionProductSave but couldn't manage to get a grasp of it.

 

Another solution would be to create a mysql trigger on product save, but for me that would be the last solution to envisage, because it is kind of uggly and prone to error or side effects.. I don't know what do you think.

 

Hopping this question will help some others.

 

Many thanks to the community.

Ben

 

Link to comment
Share on other sites

  • 5 months 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...