OxxCommerceStarterKit.Web.Models.ViewModels.ProductListViewModel.PopulatePrices C# (CSharp) Method

PopulatePrices() protected method

protected PopulatePrices ( VariationContent content, IMarket currentMarket ) : void
content VariationContent
currentMarket IMarket
return void
        protected void PopulatePrices(VariationContent content, IMarket currentMarket)
        {
            PriceString = content.GetDisplayPrice(currentMarket);
            PriceAmount = content.GetDefaultPriceAmount(currentMarket);

            var discountPriceAmount = content.GetDiscountPrice();
            DiscountPriceAmount = GetPriceWithCheck(discountPriceAmount);
            DiscountPriceString = GetDisplayPriceWithCheck(discountPriceAmount);

            DiscountPriceAvailable = DiscountPriceAmount > 0;

            var customerClubPriceAmount = content.GetCustomerClubPrice();
            CustomerClubMemberPriceAmount = GetPriceWithCheck(customerClubPriceAmount);
            CustomerClubMemberPriceString = GetDisplayPriceWithCheck(customerClubPriceAmount);

            CustomerPriceAvailable = CustomerClubMemberPriceAmount > 0;
        }