Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Removing the dependency for SKU field based on managing inventory.
support47bb12a4d228
diff --git a/src/Core/Grand.Domain/Catalog/ProductExtensions.cs b/src/Core/Grand.Domain/Catalog/ProductExtensions.csindex a0c3c29d7..44a17639f 100644--- a/src/Core/Grand.Domain/Catalog/ProductExtensions.cs+++ b/src/Core/Grand.Domain/Catalog/ProductExtensions.cs@@ -87,34 +87,33 @@ namespace Grand.Domain.Catalog/// <param name="attributes">Attributes</param>/// <param name="productAttributeParser">Product attribute service</param>/// <param name="sku">SKU</param>- /// <param name="Mpn">MPN</param>+ /// <param name="mpn">MPN</param>/// <param name="gtin">GTIN</param>private static void GetSkuMpnGtin(this Product product, IList<CustomAttribute> attributes,- out string sku, out string Mpn, out string gtin)+ out string sku, out string mpn, out string gtin){if (product == null)throw new ArgumentNullException(nameof(product));sku = null;- Mpn = null;+ mpn = null;gtin = null;- if (attributes != null &&- product.ManageInventoryMethodId == ManageInventoryMethod.ManageStockByAttributes)+ if (attributes != null && attributes.Any()){var combination = FindProductAttributeCombination(product, attributes);if (combination != null){sku = combination.Sku;- Mpn = combination.Mpn;+ mpn = combination.Mpn;gtin = combination.Gtin;}}if (string.IsNullOrEmpty(sku))sku = product.Sku;- if (string.IsNullOrEmpty(Mpn))- Mpn = product.Mpn;+ if (string.IsNullOrEmpty(mpn))+ mpn = product.Mpn;if (string.IsNullOrEmpty(gtin))gtin = product.Gtin;}