GetFinalPrice() public static method

Gets the final price of the specified product price in the current shopping context.
public static GetFinalPrice ( int productId, int variantId, decimal originalPrice, ShoppingContext shoppingContext ) : decimal
productId int
variantId int
originalPrice decimal
shoppingContext Kooboo.Commerce.Carts.ShoppingContext
return decimal
Ejemplo n.º 1
0
        public decimal GetFinalUnitPrice(int productId, int productPriceId, decimal originalPrice)
        {
            var customerId      = Customer == null ? null : (int?)Customer.Id;
            var shoppingContext = new ShoppingContext(customerId, Culture);

            return(PriceCalculationContext.GetFinalPrice(productId, productPriceId, originalPrice, shoppingContext));
        }