ShippingDiscountAdjust
Use this component to apply shipping discounts to an order.
Intended use: Order Processing pipeline, Shipping stage.
Configuration Values
None.
Values Read
The ShippingDiscountAdjust component reads the following values from the indicated dictionaries.
Key | Dictionary | Description |
_cy_shipping_total |
Order | The total shipping charges for the order before the discount is applied. |
_shipping_discount_type |
Order | The type of discount. The options are:
1 Discount by an amount 2 Percentage discount |
_cy_shipping_discount_value |
Order | The amount of the discount, either in a monetary value or a percentage value. Percentages are written as percentages rather than decimal fractions — a forty-percent discount would be represented by 40. Free shipping would be represented by 100. |
Values Written
The ShippingDiscountAdjust component writes the following values to the Order dictionary.
Key | Description |
_cy_shipping_total |
The total shipping charges for the order with the discounts (if any) applied. |
Remarks
The ShippingDiscountAdjust component examines the _shipping
_discount
_type
key and adjusts the total shipping for the order. If the discount is blank, the component does nothing. If the discount type is 1 or 2, the component applies the discount. If the discount is none of these, the component returns an error.
The _shipping_discount_type
key value is determined by the OrderDiscount object.
In Commerce Server 2000 pipelines, the ShippingDiscountAdjust component is used to provide free shipping by writing zero (0) for the _cy_shipping_total
key.