Class IOrderFormExtensions
Extension methods for IOrderForm.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Order
Assembly: Mediachase.Commerce.dll
Version: 13.30.0Syntax
public static class IOrderFormExtensions
Methods
AddManualDiscounts(IOrderForm, String, Decimal, String)
Adds manual discount promotion information for the order form.
Declaration
public static void AddManualDiscounts(this IOrderForm orderForm, string lineItemCode, decimal discountValue, string discountName)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
System.String | lineItemCode | The line item code. |
System.Decimal | discountValue | The discount value. |
System.String | discountName | The discount name. |
AddManualDiscounts(IOrderForm, String, Decimal, String, String)
Adds manual discount promotion information for the order form.
Declaration
public static void AddManualDiscounts(this IOrderForm orderForm, string lineItemCode, decimal discountValue, string discountName, string discountDescription)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
System.String | lineItemCode | The line item code. |
System.Decimal | discountValue | The discount value. |
System.String | discountName | The discount name. |
System.String | discountDescription | The discount description. |
ContainGiftItemAddedByPromotionSystem(IOrderForm, String)
Check if a specific gift item was added to the order form by the promotion system or not.
Declaration
public static bool ContainGiftItemAddedByPromotionSystem(this IOrderForm orderForm, string giftItemCode)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
System.String | giftItemCode | The gift item code. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ContainPromotionGiftItem(IOrderForm, ILineItem)
Checks if the order form contain a line item is the gift which was added by the promotion system.
Declaration
public static bool ContainPromotionGiftItem(this IOrderForm orderForm, ILineItem lineItem)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
ILineItem | lineItem | The line item. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetAllLineItems(IOrderForm)
Gets all line items for the IOrderForm.
Declaration
public static IEnumerable<ILineItem> GetAllLineItems(this IOrderForm orderForm)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ILineItem> | An System.Collections.Generic.IEnumerable<T>. |
GetHandlingTotal(IOrderForm, Currency)
Gets the handling total for the order form.
Declaration
public static Money GetHandlingTotal(this IOrderForm orderForm, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency to be used in the calculation. |
Returns
Type | Description |
---|---|
Money | The handling total for the order form. |
GetHandlingTotal(IOrderForm, Currency, IOrderFormCalculator)
Gets the handling total for the order form.
Declaration
public static Money GetHandlingTotal(this IOrderForm orderForm, Currency currency, IOrderFormCalculator orderFormCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency to be used in the calculation. |
IOrderFormCalculator | orderFormCalculator | The order form calculator. |
Returns
Type | Description |
---|---|
Money | The handling total for the order form. |
GetManualDiscount(IOrderForm, String)
Gets manual discount promotion information of line item.
Declaration
public static PromotionInformation GetManualDiscount(this IOrderForm orderForm, string lineItemCode)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
System.String | lineItemCode | The line item code. |
Returns
Type | Description |
---|---|
PromotionInformation | The manual discount promotion information. |
GetOrderDiscountTotal(IOrderForm, Currency)
Gets the order form discount price.
Declaration
[Obsolete("This method is no longer used. Will remain at least until May 2019.")]
public static Money GetOrderDiscountTotal(this IOrderForm orderForm, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency. |
Returns
Type | Description |
---|---|
Money | The order form discount price |
GetOrderDiscountTotal(IOrderForm, Currency, IOrderFormCalculator)
Gets the order form discount price.
Declaration
[Obsolete("This method is no longer used. Will remain at least until May 2019.")]
public static Money GetOrderDiscountTotal(this IOrderForm orderForm, Currency currency, IOrderFormCalculator orderFormCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency. |
IOrderFormCalculator | orderFormCalculator | The order form calculator. |
Returns
Type | Description |
---|---|
Money | The order form discount price |
GetPaymentsByTransactionType(IOrderForm, IEnumerable<IPayment>, TransactionType)
Gets payments by given transaction type.
Declaration
public static IEnumerable<IPayment> GetPaymentsByTransactionType(this IOrderForm orderForm, IEnumerable<IPayment> payments, TransactionType transactionType)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
System.Collections.Generic.IEnumerable<IPayment> | payments | The payments collection of the order form. |
TransactionType | transactionType | The transaction type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPayment> | Collection of IPayment of the order form which have given transaction type. |
GetSubTotal(IOrderForm, Currency)
Gets the subtotal of extended prices for all line items in the order form.
Declaration
public static Money GetSubTotal(this IOrderForm orderForm, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency to be used in the calculation. |
Returns
Type | Description |
---|---|
Money | The subtotal for the order form. |
GetSubTotal(IOrderForm, Currency, IOrderFormCalculator)
Gets the subtotal of extended prices for all line items in the order form.
Declaration
public static Money GetSubTotal(this IOrderForm orderForm, Currency currency, IOrderFormCalculator orderFormCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
Currency | currency | The currency to be used in the calculation. |
IOrderFormCalculator | orderFormCalculator | The order form calculator. |
Returns
Type | Description |
---|---|
Money | The subtotal for the order form. |
GetTotal(IOrderForm, IMarket, Currency)
Gets the total for the order form.
Declaration
public static Money GetTotal(this IOrderForm orderForm, IMarket market, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
IMarket | market | The market to be used in the calculation. |
Currency | currency | The currency to be used in the calculation. |
Returns
Type | Description |
---|---|
Money | The total for the order form. |
GetTotal(IOrderForm, IMarket, Currency, IOrderFormCalculator)
Gets the total for the order form.
Declaration
public static Money GetTotal(this IOrderForm orderForm, IMarket market, Currency currency, IOrderFormCalculator orderFormCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |
IMarket | market | The market to be used in the calculation. |
Currency | currency | The currency to be used in the calculation. |
IOrderFormCalculator | orderFormCalculator | The order form calculator. |
Returns
Type | Description |
---|---|
Money | The total for the order form. |
UpdatePaymentTotals(IOrderForm)
Updates the payment totals for the order form.
Declaration
public static void UpdatePaymentTotals(this IOrderForm orderForm)
Parameters
Type | Name | Description |
---|---|---|
IOrderForm | orderForm | The order form. |