protected virtual PriceModel GetPriceModel(VariationContent currentContent) { PriceModel priceModel = new PriceModel(); priceModel.Price = GetPrice(currentContent); priceModel.DiscountDisplayPrice = currentContent.GetDiscountDisplayPrice(currentContent.GetDefaultPrice()); priceModel.CustomerClubDisplayPrice = currentContent.GetCustomerClubDisplayPrice(); return(priceModel); }
public static PriceModel GetPriceModel(this VariationContent currentContent) { PriceModel priceModel = new PriceModel(); priceModel.Price = GetPrice(currentContent); priceModel.DiscountDisplayPrice = currentContent.GetDiscountDisplayPrice(currentContent.GetDefaultPrice()); priceModel.CustomerClubDisplayPrice = currentContent.GetCustomerClubDisplayPrice(); return(priceModel); }
public static string GetCustomerClubDisplayPrice(this List <VariationContent> variations, IMarket market = null) { if (variations.Any()) { VariationContent variationContent = variations.FirstOrDefault(x => x.GetPricesWithMarket(market) != null); return(variationContent.GetCustomerClubDisplayPrice(market)); } return(string.Empty); }