Class IOrderFormExtensions

Extension methods for IOrderForm.

Inheritance
System.Object
IOrderFormExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Order
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public static class IOrderFormExtensions

Methods

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

true if the gift item is added inside promotion system; otherwise, false.

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

true if the line item is the gift which was added to order form inside promotion system; otherwise, false.

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.

GetOrderDiscountTotal(IOrderForm, Currency)

Gets the order form discount price.

Declaration
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
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 total 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 sub total for the order form.

GetSubTotal(IOrderForm, Currency, IOrderFormCalculator)

Gets the total 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 sub total 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.