Skip to content

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.

Recommended products - use in copy product action

KrzysztofPajak59acf3f7d1ff
diff --git a/src/Business/Grand.Business.Catalog/Services/Products/CopyProductService.cs b/src/Business/Grand.Business.Catalog/Services/Products/CopyProductService.cs
index b4b92a9f3..9f42ed729 100644
--- a/src/Business/Grand.Business.Catalog/Services/Products/CopyProductService.cs
+++ b/src/Business/Grand.Business.Catalog/Services/Products/CopyProductService.cs
@@ -261,6 +261,11 @@ namespace Grand.Business.Catalog.Services.Products
productCopy.CrossSellProduct.Add(csProduct);
}
+ foreach (var reProduct in product.RecommendedProduct)
+ {
+ productCopy.RecommendedProduct.Add(reProduct);
+ }
+
// product specifications
foreach (var productSpecificationAttribute in product.ProductSpecificationAttributes)
{