protected virtual UCommerceProductDescription GenerateDescription(UCommerceProduct product, string languageCode) { return(_productDescriptionFaker .RuleFor(x => x.CultureCode, f => languageCode) .RuleFor(x => x.DisplayName, f => $"{product.Name} {f.Vehicle.Fuel()}") .RuleFor(x => x.ProductId, f => product.ProductId) .Generate()); }
protected override UCommerceProductDescription GenerateDescription(UCommerceProduct product, string languageCode) { string parentDisplayName = product.ParentProduct ?.UCommerceProductDescription ?.FirstOrDefault(d => d.CultureCode == languageCode) ?.DisplayName ?? ""; return(_productDescriptionFaker .RuleFor(x => x.CultureCode, f => languageCode) .RuleFor(x => x.DisplayName, f => $"{parentDisplayName} {f.Commerce.Color()}") .RuleFor(x => x.ProductId, f => product.ProductId) .Generate()); }