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(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; findProduct.SetPriceData(this, market); findProduct.Brand = this.Facet_Brand; return(findProduct); }
public ProductListViewModel Populate(Mediachase.Commerce.IMarket currentMarket) { ProductListViewModel productListViewModel = new ProductListViewModel(this, currentMarket, CustomerContext.Current.CurrentContact); return(productListViewModel); }