in src/Modules/SimplCommerce.Module.Catalog/Models/Product.cs [121:172]
public Product Clone()
{
var product = new Product();
product.Name = Name;
product.MetaTitle = MetaTitle;
product.MetaKeywords = MetaKeywords;
product.MetaDescription = MetaDescription;
product.ShortDescription = ShortDescription;
product.Description = Description;
product.Specification = Specification;
product.IsPublished = IsPublished;
product.Price = Price;
product.OldPrice = OldPrice;
product.SpecialPrice = SpecialPrice;
product.SpecialPriceStart = SpecialPriceStart;
product.SpecialPriceEnd = SpecialPriceEnd;
product.HasOptions = HasOptions;
product.IsVisibleIndividually = IsVisibleIndividually;
product.IsFeatured = IsFeatured;
product.IsAllowToOrder = IsAllowToOrder;
product.IsCallForPricing = IsCallForPricing;
product.StockQuantity = StockQuantity;
product.BrandId = BrandId;
product.VendorId = VendorId;
product.TaxClassId = TaxClassId;
product.StockTrackingIsEnabled = StockTrackingIsEnabled;
product.Sku = Sku;
product.Gtin = Gtin;
product.NormalizedName = NormalizedName;
product.DisplayOrder = DisplayOrder;
product.TaxClassId = TaxClassId;
product.Slug = Slug;
foreach (var attribute in AttributeValues)
{
product.AddAttributeValue(new ProductAttributeValue
{
AttributeId = attribute.AttributeId,
Value = attribute.Value
});
}
foreach (var category in Categories)
{
product.AddCategory(new ProductCategory
{
CategoryId = category.CategoryId
});
}
return product;
}