ShoppingCartServiceApplyDiscountProgramVouchers(InvoiceDetailCartItem, IEnumerableString) Method

Applies discount program vouchers matching the supplied codes, to the specified item. Vouchers specified must meet a number of criteria, see remarks for more information.

Definition

Namespace: Ignition.Commerce.Shopping
Assembly: CatalystFire.Ignition (in CatalystFire.Ignition.dll) Version: 12.0.3454
C#
public void ApplyDiscountProgramVouchers(
	InvoiceDetailCartItem invoiceDetail,
	IEnumerable<string> codes
)

Parameters

invoiceDetail  InvoiceDetailCartItem
Cart item to which vouchers should be applied
codes  IEnumerableString
Voucher codes of the vouchers to apply

Remarks

Vouchers are applied in an arbitrary order, without regard to the ordering of codes. Vouchers specified must: - All belong to the same discount program (though they do not need to have been purchased at the same time). - All belong to the Bill-To customer of the cart. - In total, be valued at enough credits to cover the credit-cost of the item being purchased. - For single-use vouchers, not already be applied to another cart item.

Exceptions

IgnitionUserInputException One or more codes are either invalid, or were unable to be applied to specified invoiceDetail. See exception message for more details.

See Also