C# Класс Nop.Services.Orders.OrderTotalCalculationService

Order service
Наследование: IOrderTotalCalculationService
Показать файл Открыть проект

Открытые методы

Метод Описание
AdjustShippingRate ( decimal shippingRate, IList cart, Discount &appliedDiscount ) : decimal

Adjust shipping rate (free shipping, additional charges, discounts)

ConvertAmountToRewardPoints ( decimal amount ) : int

Converts an amount in primary store currency to reward points

ConvertRewardPointsToAmount ( int rewardPoints ) : decimal

Converts reward points to amount primary store currency

GetOrderSubtotalDiscount ( Customer customer, decimal orderSubTotal, Discount &appliedDiscount ) : decimal

Gets an order discount (applied to order subtotal)

GetOrderTotalDiscount ( Customer customer, decimal orderTotal, Discount &appliedDiscount ) : decimal

Gets an order discount (applied to order total)

GetShippingDiscount ( Customer customer, decimal shippingTotal, Discount &appliedDiscount ) : decimal

Gets a shipping discount

GetShoppingCartAdditionalShippingCharge ( IList cart ) : decimal

Gets shopping cart additional shipping charge

GetShoppingCartShippingTotal ( IList cart ) : decimal?

Gets shopping cart shipping total

GetShoppingCartShippingTotal ( IList cart, bool includingTax ) : decimal?

Gets shopping cart shipping total

GetShoppingCartShippingTotal ( IList cart, bool includingTax, decimal &taxRate ) : decimal?

Gets shopping cart shipping total

GetShoppingCartShippingTotal ( IList cart, bool includingTax, decimal &taxRate, Discount &appliedDiscount ) : decimal?

Gets shopping cart shipping total

GetShoppingCartSubTotal ( IList cart, bool includingTax, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount ) : void

Gets shopping cart subtotal

GetShoppingCartSubTotal ( IList cart, bool includingTax, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount, decimal>.SortedDictionary &taxRates ) : void

Gets shopping cart subtotal

GetShoppingCartSubTotal ( IList cart, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount ) : void

Gets shopping cart subtotal

GetShoppingCartTotal ( IList cart, bool ignoreRewardPonts = false, bool usePaymentMethodAdditionalFee = true ) : decimal?

Gets shopping cart total

GetShoppingCartTotal ( IList cart, decimal &discountAmount, Discount &appliedDiscount, List &appliedGiftCards, int &redeemedRewardPoints, decimal &redeemedRewardPointsAmount, bool ignoreRewardPonts = false, bool usePaymentMethodAdditionalFee = true ) : decimal?

Gets shopping cart total

GetTaxTotal ( IList cart, decimal>.SortedDictionary &taxRates, bool usePaymentMethodAdditionalFee = true ) : decimal

Gets tax

GetTaxTotal ( IList cart, bool usePaymentMethodAdditionalFee = true ) : decimal

Gets tax

IsFreeShipping ( IList cart ) : bool

Gets a value indicating whether shipping is free

OrderTotalCalculationService ( IWorkContext workContext, IPriceCalculationService priceCalculationService, ITaxService taxService, IShippingService shippingService, IPaymentService paymentService, ICheckoutAttributeParser checkoutAttributeParser, IDiscountService discountService, IGiftCardService giftCardService, IGenericAttributeService genericAttributeService, Nop.Core.Domain.Tax.TaxSettings taxSettings, Nop.Core.Domain.Customers.RewardPointsSettings rewardPointsSettings, Nop.Core.Domain.Shipping.ShippingSettings shippingSettings, Nop.Core.Domain.Orders.ShoppingCartSettings shoppingCartSettings, Nop.Core.Domain.Catalog.CatalogSettings catalogSettings ) : System

Ctor

Описание методов

AdjustShippingRate() публичный Метод

Adjust shipping rate (free shipping, additional charges, discounts)
public AdjustShippingRate ( decimal shippingRate, IList cart, Discount &appliedDiscount ) : decimal
shippingRate decimal Shipping rate to adjust
cart IList Cart
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
Результат decimal

ConvertAmountToRewardPoints() публичный Метод

Converts an amount in primary store currency to reward points
public ConvertAmountToRewardPoints ( decimal amount ) : int
amount decimal Amount
Результат int

ConvertRewardPointsToAmount() публичный Метод

Converts reward points to amount primary store currency
public ConvertRewardPointsToAmount ( int rewardPoints ) : decimal
rewardPoints int Reward points
Результат decimal

GetOrderSubtotalDiscount() публичный Метод

Gets an order discount (applied to order subtotal)
public GetOrderSubtotalDiscount ( Customer customer, decimal orderSubTotal, Discount &appliedDiscount ) : decimal
customer Nop.Core.Domain.Customers.Customer Customer
orderSubTotal decimal Order subtotal
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
Результат decimal

GetOrderTotalDiscount() публичный Метод

Gets an order discount (applied to order total)
public GetOrderTotalDiscount ( Customer customer, decimal orderTotal, Discount &appliedDiscount ) : decimal
customer Nop.Core.Domain.Customers.Customer Customer
orderTotal decimal Order total
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
Результат decimal

GetShippingDiscount() публичный Метод

Gets a shipping discount
public GetShippingDiscount ( Customer customer, decimal shippingTotal, Discount &appliedDiscount ) : decimal
customer Nop.Core.Domain.Customers.Customer Customer
shippingTotal decimal Shipping total
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
Результат decimal

GetShoppingCartAdditionalShippingCharge() публичный Метод

Gets shopping cart additional shipping charge
public GetShoppingCartAdditionalShippingCharge ( IList cart ) : decimal
cart IList Cart
Результат decimal

GetShoppingCartShippingTotal() публичный Метод

Gets shopping cart shipping total
public GetShoppingCartShippingTotal ( IList cart ) : decimal?
cart IList Cart
Результат decimal?

GetShoppingCartShippingTotal() публичный Метод

Gets shopping cart shipping total
public GetShoppingCartShippingTotal ( IList cart, bool includingTax ) : decimal?
cart IList Cart
includingTax bool A value indicating whether calculated price should include tax
Результат decimal?

GetShoppingCartShippingTotal() публичный Метод

Gets shopping cart shipping total
public GetShoppingCartShippingTotal ( IList cart, bool includingTax, decimal &taxRate ) : decimal?
cart IList Cart
includingTax bool A value indicating whether calculated price should include tax
taxRate decimal Applied tax rate
Результат decimal?

GetShoppingCartShippingTotal() публичный Метод

Gets shopping cart shipping total
public GetShoppingCartShippingTotal ( IList cart, bool includingTax, decimal &taxRate, Discount &appliedDiscount ) : decimal?
cart IList Cart
includingTax bool A value indicating whether calculated price should include tax
taxRate decimal Applied tax rate
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
Результат decimal?

GetShoppingCartSubTotal() публичный Метод

Gets shopping cart subtotal
public GetShoppingCartSubTotal ( IList cart, bool includingTax, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount ) : void
cart IList Cart
includingTax bool A value indicating whether calculated price should include tax
discountAmount decimal Applied discount amount
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
subTotalWithoutDiscount decimal Sub total (without discount)
subTotalWithDiscount decimal Sub total (with discount)
Результат void

GetShoppingCartSubTotal() публичный Метод

Gets shopping cart subtotal
public GetShoppingCartSubTotal ( IList cart, bool includingTax, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount, decimal>.SortedDictionary &taxRates ) : void
cart IList Cart
includingTax bool A value indicating whether calculated price should include tax
discountAmount decimal Applied discount amount
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
subTotalWithoutDiscount decimal Sub total (without discount)
subTotalWithDiscount decimal Sub total (with discount)
taxRates decimal>.SortedDictionary Tax rates (of order sub total)
Результат void

GetShoppingCartSubTotal() публичный Метод

Gets shopping cart subtotal
public GetShoppingCartSubTotal ( IList cart, decimal &discountAmount, Discount &appliedDiscount, decimal &subTotalWithoutDiscount, decimal &subTotalWithDiscount ) : void
cart IList Cart
discountAmount decimal Applied discount amount
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
subTotalWithoutDiscount decimal Sub total (without discount)
subTotalWithDiscount decimal Sub total (with discount)
Результат void

GetShoppingCartTotal() публичный Метод

Gets shopping cart total
public GetShoppingCartTotal ( IList cart, bool ignoreRewardPonts = false, bool usePaymentMethodAdditionalFee = true ) : decimal?
cart IList Cart
ignoreRewardPonts bool A value indicating whether we should ignore reward points (if enabled and a customer is going to use them)
usePaymentMethodAdditionalFee bool A value indicating whether we should use payment method additional fee when calculating order total
Результат decimal?

GetShoppingCartTotal() публичный Метод

Gets shopping cart total
public GetShoppingCartTotal ( IList cart, decimal &discountAmount, Discount &appliedDiscount, List &appliedGiftCards, int &redeemedRewardPoints, decimal &redeemedRewardPointsAmount, bool ignoreRewardPonts = false, bool usePaymentMethodAdditionalFee = true ) : decimal?
cart IList Cart
discountAmount decimal Applied discount amount
appliedDiscount Nop.Core.Domain.Discounts.Discount Applied discount
appliedGiftCards List Applied gift cards
redeemedRewardPoints int Reward points to redeem
redeemedRewardPointsAmount decimal Reward points amount in primary store currency to redeem
ignoreRewardPonts bool A value indicating whether we should ignore reward points (if enabled and a customer is going to use them)
usePaymentMethodAdditionalFee bool A value indicating whether we should use payment method additional fee when calculating order total
Результат decimal?

GetTaxTotal() публичный Метод

Gets tax
public GetTaxTotal ( IList cart, decimal>.SortedDictionary &taxRates, bool usePaymentMethodAdditionalFee = true ) : decimal
cart IList Shopping cart
taxRates decimal>.SortedDictionary Tax rates
usePaymentMethodAdditionalFee bool A value indicating whether we should use payment method additional fee when calculating tax
Результат decimal

GetTaxTotal() публичный Метод

Gets tax
public GetTaxTotal ( IList cart, bool usePaymentMethodAdditionalFee = true ) : decimal
cart IList Shopping cart
usePaymentMethodAdditionalFee bool A value indicating whether we should use payment method additional fee when calculating tax
Результат decimal

IsFreeShipping() публичный Метод

Gets a value indicating whether shipping is free
public IsFreeShipping ( IList cart ) : bool
cart IList Cart
Результат bool

OrderTotalCalculationService() публичный Метод

Ctor
public OrderTotalCalculationService ( IWorkContext workContext, IPriceCalculationService priceCalculationService, ITaxService taxService, IShippingService shippingService, IPaymentService paymentService, ICheckoutAttributeParser checkoutAttributeParser, IDiscountService discountService, IGiftCardService giftCardService, IGenericAttributeService genericAttributeService, Nop.Core.Domain.Tax.TaxSettings taxSettings, Nop.Core.Domain.Customers.RewardPointsSettings rewardPointsSettings, Nop.Core.Domain.Shipping.ShippingSettings shippingSettings, Nop.Core.Domain.Orders.ShoppingCartSettings shoppingCartSettings, Nop.Core.Domain.Catalog.CatalogSettings catalogSettings ) : System
workContext IWorkContext Work context
priceCalculationService IPriceCalculationService Price calculation service
taxService ITaxService Tax service
shippingService IShippingService Shipping service
paymentService IPaymentService Payment service
checkoutAttributeParser ICheckoutAttributeParser Checkout attribute parser
discountService IDiscountService Discount service
giftCardService IGiftCardService Gift card service
genericAttributeService IGenericAttributeService Generic attribute service
taxSettings Nop.Core.Domain.Tax.TaxSettings Tax settings
rewardPointsSettings Nop.Core.Domain.Customers.RewardPointsSettings Reward points settings
shippingSettings Nop.Core.Domain.Shipping.ShippingSettings Shipping settings
shoppingCartSettings Nop.Core.Domain.Orders.ShoppingCartSettings Shopping cart settings
catalogSettings Nop.Core.Domain.Catalog.CatalogSettings Catalog settings
Результат System