Posted on 11/03/2011 13:36:27
Hi,
There is no notification AFAIK.
You could probably use Ribbon extensibility or...
Another approach is to use extensibility available in the searching api...
public class ProductSavedHandler : Dynamicweb.Extensibility.Searching.IDataItemListener
{
[ModificationsCategory("eCommerce")]
public void HandleDataItemModifications(string category, Dynamicweb.Extensibility.Searching.DataItemModificationsInfo info)
{
var productinfo = info as Dynamicweb.Extensibility.Searching.ProductModificationsInfo;
if(productinfo == null) return;
switch (productinfo.State)
{
case Dynamicweb.Extensibility.Searching.DataItemState.New:
case Dynamicweb.Extensibility.Searching.DataItemState.Updated:
var product = new Dynamicweb.eCommerce.Products.Product(productinfo.ID, productinfo.VariantID, productinfo.LanguageID);
// do your stuff here
break;
}
}
}
Note: The HandleDataItemModifications might be called more than once when a product is saved.
BR.
Morten