Developer forum

Forum » Feature requests » Notification on EcomProduct Copy

Notification on EcomProduct Copy

Kenneth Radoor
Reply

Hi 

I would be great if we could have some kind of notifications when a product is coiped.

For some reason i seems that no notifications is fired when ever we copy a product, neither a Create nor a Save notification.

I'm in a situation where i need to make sure a field in the EcomProducts table is uniqe on each product, and when ever we copy a product in the Admin, that field value is also copied.

The work around it for now, is to test for dublicate values, when ever the newly copied product is saved, and that is kind of ok, but that inplements that the editor has to remember to save the copy right a way, and rules we have to remember is not good for anyboby at an age above 18 :)

I would suggest 2 notifications. OnCopyBeforeSave and OnCopyAfterSave, then we should have the nessesary opportunities to manipulate the product.

Thanks

/Kenneth

 


Replies

 
Nicolai Pedersen
Reply

I belive there is a Notifications.Ecommerce.Product.AfterCreate - at least on my head branch. We have done some refactoring lately so it might be new for copies as well - so what version are you on?

 
Kenneth Radoor
Reply

Hi Nicolai

The solutions is on v. 9.5.5

I have tried all likely notifications, and also AfterCreate, but non of them got fired when i copied a product.

/Kenneth