diff --git a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Examples/Notifications/ProductInfoOnAfterProcessResponseSubscriber.cs b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Examples/Notifications/ProductInfoOnAfterProcessResponseSubscriber.cs
new file mode 100644
index 0000000..1c1d58f
--- /dev/null
+++ b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Examples/Notifications/ProductInfoOnAfterProcessResponseSubscriber.cs
@@ -0,0 +1,29 @@
+using Dynamicweb.Extensibility.Notifications;
+using Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Notifications;
+
+namespace Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Examples.Notifications
+{
+ ///
+ /// Class ProductInfoOnAfterProcessResponseSubscriber.
+ ///
+ ///
+ [Subscribe(ProductInfo.OnAfterProductInfoProcessResponse)]
+ public class ProductInfoOnAfterProcessResponseSubscriber : NotificationSubscriber
+ {
+ ///
+ /// Call to invoke observer.
+ ///
+ /// The notification.
+ /// The args.
+ public override void OnNotify(string notification, NotificationArgs args)
+ {
+ var myArgs = (ProductInfo.OnAfterProductInfoProcessResponseArgs)args;
+
+ // TODO: Add code here
+ if (myArgs?.ProductInfo != null)
+ {
+
+ }
+ }
+ }
+}
diff --git a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.csproj b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.csproj
index 6888e21..6865eda 100644
--- a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.csproj
+++ b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Dynamicweb.Ecommerce.DynamicwebLiveIntegration.csproj
@@ -1,6 +1,6 @@
- 10.4.27
+ 10.4.28
1.0.0.0
Live Integration
Live Integration
diff --git a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Notifications/ProductInfo.cs b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Notifications/ProductInfo.cs
index b6c3a43..0feb1d1 100644
--- a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Notifications/ProductInfo.cs
+++ b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Notifications/ProductInfo.cs
@@ -32,6 +32,11 @@ public static class ProductInfo
///
public const string OnAfterGenerateProductInfoXml = "Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Notifications.LiveIntegration.OnAfterGenerateProductInfoXml";
+ ///
+ /// Occurs after the response from ERP is returned before the product info object is stored. This enables you to change or analyze the product info object before it's added to cache.
+ ///
+ public const string OnAfterProductInfoProcessResponse = "Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Notifications.LiveIntegration.OnAfterProductInfoProcessResponse";
+
private static List GetProductSelectionsFromProducts(Dictionary products)
{
var productSelections = new List();
@@ -168,5 +173,45 @@ public OnAfterGenerateProductInfoXmlArgs(List products, P
///
public Logger Logger { get; }
}
+
+ ///
+ /// Arguments class for the OnAfterProductInfoProcessResponse subscriber.
+ ///
+ ///
+ public class OnAfterProductInfoProcessResponseArgs : NotificationArgs
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public OnAfterProductInfoProcessResponseArgs(Products.ProductInfo productInfo, XmlDocument responseXml, Settings liveIntegrationSettings, Logger logger)
+ {
+ ProductInfo = productInfo;
+ ResponseXml = responseXml;
+ Settings = liveIntegrationSettings;
+ Logger = logger;
+ }
+
+ ///
+ /// Gets the product info object.
+ ///
+ /// The products.
+ public Products.ProductInfo ProductInfo { get; }
+
+ ///
+ /// Gets the response XML document.
+ ///
+ /// The XML document.
+ public XmlDocument ResponseXml { get; }
+
+ ///
+ /// Settings
+ ///
+ public Settings Settings { get; }
+
+ ///
+ /// Logger
+ ///
+ public Logger Logger { get; }
+ }
}
}
\ No newline at end of file
diff --git a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Products/ProductManager.cs b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Products/ProductManager.cs
index 8286d38..d01d8f1 100644
--- a/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Products/ProductManager.cs
+++ b/src/Dynamicweb.Ecommerce.DynamicwebLiveIntegration/Products/ProductManager.cs
@@ -449,6 +449,9 @@ private static Dictionary ProcessResponse(Settings settings
productInfo["ProductDefaultUnitId"] = item.SelectSingleNode("column [@columnName='ProductDefaultUnitId']")?.InnerText;
}
+ Dynamicweb.Extensibility.Notifications.NotificationManager.Notify(Notifications.ProductInfo.OnAfterProductInfoProcessResponse,
+ new Notifications.ProductInfo.OnAfterProductInfoProcessResponseArgs(productInfo, response, settings, logger));
+
// avoid exception to duplicate products in XML
infos.TryAdd(productIdentifier, productInfo);
}