public FindProduct GetFindProduct(Mediachase.Commerce.IMarket market) { var language = (Language == null ? string.Empty : Language.Name); var findProduct = new FindProduct(this, language); findProduct.Color = Color != null ? new List <string>() { Color } : new List <string>(); findProduct.Description = Description; findProduct.Overview = Overview; EPiServer.Commerce.SpecializedProperties.Price defaultPrice = this.GetDefaultPrice(); findProduct.DefaultPrice = this.GetDisplayPrice(market); findProduct.DefaultPriceAmount = this.GetDefaultPriceAmount(market); PriceAndMarket discountPrice = this.GetDiscountPrice(market); findProduct.DiscountedPriceAmount = GetPriceWithCheck(discountPrice); findProduct.DiscountedPrice = GetDisplayPriceWithCheck(discountPrice); PriceAndMarket customerClubPrice = this.GetCustomerClubPrice(market); findProduct.CustomerClubPriceAmount = customerClubPrice != null ? (double)customerClubPrice.UnitPrice.Amount : 0; findProduct.CustomerClubPrice = customerClubPrice != null ? customerClubPrice.Price : string.Empty; findProduct.Brand = this.Facet_Brand; return(findProduct); }
public FindProduct GetFindProduct(IMarket market) { List <VariationContent> productVariants = GetVariants(this); var variations = GetFashionVariants(productVariants, market); var language = (Language == null ? string.Empty : Language.Name); string sizeType = string.IsNullOrEmpty(SizeType) ? "" : SizeType.First().ToString(CultureInfo.InvariantCulture); var findProduct = new FindProduct(this, language); findProduct.Description = Description; findProduct.Color = FacetColor == null ? new List <string>() : FacetColor.Split(',').ToList(); findProduct.Sizes = variations.Select(x => x.Size == null ? string.Empty : x.Size.TrimEnd('-')).Distinct().ToList(); findProduct.SizeType = sizeType; findProduct.SizeUnit = SizeUnit; findProduct.Fit = Fit; findProduct.SizesList = CreateSizeList(variations.Select(x => x.Size).Distinct().ToList(), SizeUnit, sizeType); EPiServer.Commerce.SpecializedProperties.Price defaultPrice = productVariants.GetDefaultPrice(market); findProduct.DefaultPrice = productVariants.GetDisplayPrice(market); findProduct.DefaultPriceAmount = productVariants.GetDefaultPriceAmount(market); findProduct.DiscountedPrice = productVariants.GetDiscountDisplayPrice(defaultPrice, market); // TODO: Set if not the same as default price findProduct.DiscountedPriceAmount = 0; findProduct.CustomerClubPrice = productVariants.GetCustomerClubDisplayPrice(market); findProduct.Variants = variations; findProduct.NewItemText = NewItemText; return(findProduct); }
// --- End of property definitions public FindProduct GetFindProduct(IMarket market) { var language = (Language == null ? string.Empty : Language.Name); var findProduct = new FindProduct(this, language); findProduct.Description = Info_Description; findProduct.Sizes = new List <string>() { this.Size }; EPiServer.Commerce.SpecializedProperties.Price defaultPrice = this.GetDefaultPrice(); findProduct.DefaultPrice = this.GetDisplayPrice(market); findProduct.DefaultPriceAmount = this.GetDefaultPriceAmount(market); findProduct.DiscountedPrice = this.GetDiscountDisplayPrice(defaultPrice, market); findProduct.CustomerClubPrice = this.GetCustomerClubDisplayPrice(market); findProduct.GrapeMixList = GetGrapeMixList(); findProduct.Varieties = GrapeMix; findProduct.Vintage = Vintage; findProduct.Taste = Taste; findProduct.Style = Style; findProduct.Country = Country; findProduct.Region = Region; findProduct.Maturity = Maturity; findProduct.Alcohol = Alcohol; findProduct.Closure = Closure; findProduct.Brand = Facet_Brand; return(findProduct); }
public FindProduct GetFindProduct(Mediachase.Commerce.IMarket market) { var language = (Language == null ? string.Empty : Language.Name); var findProduct = new FindProduct(this, language); findProduct.Description = Description; findProduct.Overview = Overview; EPiServer.Commerce.SpecializedProperties.Price defaultPrice = this.GetDefaultPrice(); findProduct.DefaultPrice = this.GetDisplayPrice(market); findProduct.DefaultPriceAmount = this.GetDefaultPriceAmount(market); PriceAndMarket discountPrice = this.GetDiscountPrice(market); findProduct.DiscountedPriceAmount = GetPriceWithCheck(discountPrice); findProduct.DiscountedPrice = GetDisplayPriceWithCheck(discountPrice); PriceAndMarket customerClubPrice = this.GetCustomerClubPrice(market); findProduct.CustomerClubPriceAmount = GetPriceWithCheck(customerClubPrice); findProduct.CustomerClubPrice = GetDisplayPriceWithCheck(customerClubPrice); findProduct.Brand = Facet_Brand; findProduct.Resolution = Resolution; findProduct.LensMount = LensMount; findProduct.CameraFormat = CameraFormat; findProduct.FileFormat = FileFormat; findProduct.Connectivity = Connectivity; findProduct.Battery = Battery; findProduct.MemoryCardType = MemoryCardType; findProduct.Weight = Weight; return(findProduct); }
public FindProduct GetFindProduct(IMarket market) { var language = (Language == null ? string.Empty : Language.Name); var findProduct = new WineFindProduct(this, language); findProduct.Sizes = new List <string>() { this.Size }; findProduct.ShowInList = ShowInList; EPiServer.Commerce.SpecializedProperties.Price defaultPrice = this.GetDefaultPrice(); findProduct.DefaultPrice = this.GetDisplayPrice(market); findProduct.DefaultPriceAmount = this.GetDefaultPriceAmount(market); findProduct.DiscountedPrice = this.GetDiscountDisplayPrice(defaultPrice, market); findProduct.CustomerClubPrice = this.GetCustomerClubDisplayPrice(market); findProduct.GrapeMixList = GetGrapeMixList(); // Wine does not have variations. It is a variation return(findProduct); }
public FindProduct GetFindProduct(IMarket market) { List <VariationContent> productVariants = this.GetVaritions().ToList(); var variations = GetGenericVariants(productVariants, market); var language = (Language == null ? string.Empty : Language.Name); var findProduct = new FindProduct(this, language); findProduct.Description = Description; findProduct.Color = Color != null ? new List <string>() { Color } : new List <string>(); findProduct.Sizes = variations.Select(x => x.Size ?? string.Empty).Distinct().ToList(); findProduct.Brand = this.Facet_Brand; EPiServer.Commerce.SpecializedProperties.Price defaultPrice = productVariants.GetDefaultPrice(market); findProduct.DefaultPrice = productVariants.GetDisplayPrice(market); findProduct.DefaultPriceAmount = productVariants.GetDefaultPriceAmount(market); PriceAndMarket discountPrice = productVariants.GetDiscountPrice(market); findProduct.DiscountedPrice = GetDisplayPriceWithCheck(discountPrice); findProduct.DiscountedPriceAmount = GetPriceWithCheck(discountPrice); PriceAndMarket customerClubPrice = productVariants.GetCustomerClubPrice(market); findProduct.CustomerClubPriceAmount = GetPriceWithCheck(customerClubPrice); findProduct.CustomerClubPrice = GetDisplayPriceWithCheck(customerClubPrice); findProduct.GenericVariants = variations; return(findProduct); }