diff --git a/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductEvents.Codeunit.al b/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductEvents.Codeunit.al index 075ac8013c..9086b9960d 100644 --- a/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductEvents.Codeunit.al +++ b/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductEvents.Codeunit.al @@ -405,4 +405,31 @@ codeunit 30177 "Shpfy Product Events" internal procedure OnAfterProductsToSynchronizeFiltersSet(var ShopifyProduct: Record "Shpfy Product"; Shop: Record "Shpfy Shop"; OnlyUpdatePrice: Boolean) begin end; + + /// + /// Raised after the product variant data has been filled from Business Central Item, Item Variant, and Item Unit of Measure. + /// This event allows customization of the Shopify variant after all standard fields are set, but only when an Item Variant is present. + /// + /// The Shopify variant record to be customized. + /// The source Item record. + /// The source Item Variant record. + /// The source Item Unit of Measure record. + /// The Shopify shop context. + [IntegrationEvent(false, false)] + internal procedure OnAfterFillInProductVariantDataFromVariant(var ShopifyVariant: Record "Shpfy Variant"; Item: Record Item; ItemVariant: Record "Item Variant"; ItemUnitofMeasure: Record "Item Unit of Measure"; Shop: Record "Shpfy Shop") + begin + end; + + /// + /// Raised after the product variant data has been filled from Business Central Item and Item Variant (without Unit of Measure). + /// This event allows customization of the Shopify variant after all standard fields are set. + /// + /// The Shopify variant record to be customized. + /// The source Item record. + /// The source Item Variant record. + /// The Shopify shop context. + [IntegrationEvent(false, false)] + internal procedure OnAfterFillInProductVariantData(var ShopifyVariant: Record "Shpfy Variant"; Item: Record Item; ItemVariant: Record "Item Variant"; Shop: Record "Shpfy Shop") + begin + end; } \ No newline at end of file diff --git a/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductExport.Codeunit.al b/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductExport.Codeunit.al index 3312f04bdb..eb6d693c21 100644 --- a/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductExport.Codeunit.al +++ b/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductExport.Codeunit.al @@ -429,6 +429,7 @@ codeunit 30178 "Shpfy Product Export" ShopifyVariant."Item SystemId" := Item.SystemId; ShopifyVariant."Item Variant SystemId" := ItemVariant.SystemId; ShopifyVariant."UoM Option Id" := 2; + ProductEvents.OnAfterFillInProductVariantData(ShopifyVariant, Item, ItemVariant, Shop); end; end; @@ -481,6 +482,7 @@ codeunit 30178 "Shpfy Product Export" ShopifyVariant."Item SystemId" := Item.SystemId; ShopifyVariant."Item Variant SystemId" := ItemVariant.SystemId; ShopifyVariant."UoM Option Id" := 2; + ProductEvents.OnAfterFillInProductVariantDataFromVariant(ShopifyVariant, Item, ItemVariant, ItemUnitofMeasure, Shop); end; end;