Developer forum

Forum » Development » Ecommerce.Product.AfterSave not firing for language inherited fields

Ecommerce.Product.AfterSave not firing for language inherited fields

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a notification subscriber that responds to Ecommerce.Product.AfterSave so I can add it to a custom queue to be exported to an external system. My solution also has multiple languages. What I am seeing is that when I change a field that can differ per language, AfterSave is called for the default and non-default languages as expected. However, for inherited fields across languages, it only fires for the default language. Consider this product form:

When I change the TeaserText in Danish and English, ProductSave is called twice, which is exactly what I want.

However, if I change the Type product field only, ProductSave is only called for Danish, my default language. Under the covers though, the changes to the Type field in Danish are still applied to the English product,, so the product *has* changed and is saved, but the notification isn't fired. This causes me to miss changes to products in the non-default languages.

Is there a solution for this? Maybe another subscriber that I can use?

Imar

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

None that I know of. These values are inherited.... Just mark all language ids as integration ready when a change happens maybe? Or you have to look at the field inheritance of the changed properties.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Nicolai. I was hoping to avoid registering all languages to avoid unnecessary overhead, but it seems that might be the quickest solution after all.

Imar

 

 

You must be logged in to post in the forum