RequiredShippingCy, RequiredShipping
Use these components to verify that the shipping total has been set.
The RequiredShipping component is for backward compatibility only. The RequiredShippingCy component operates in both Site Server 3.0 Commerce Edition compatibility mode and in Commerce Server 2000 mode pipelines. For more information, see Currency Enhancements.
Intended use: Order Processing pipeline, Shipping stage.
Configuration Values
None.
Values Read
The RequiredShippingCy component reads the following values from the indicated dictionaries. The RequiredShipping component reads the same key but without cy_
.
Key | Dictionary | Description |
_cy_shipping_total |
Order | The total shipping cost for the order. |
MessageManager |
Context | A reference to a MessageManager object that is used to retrieve the bad-shipping total constant (pur _badshipping ) in case of an error. |
Values Written
The RequiredShippingCy and RequiredShipping components write the following value to the Order dictionary.
Key | Description |
_Purchase_Errors |
Error messages are written to this SimpleList object. |
Errors
The RequiredShippingCy and RequiredShipping components return error level 2 (OPPERRORLEV_WARN) when the handling total is not in the order form. Other errors return error level 3 (OPPERRORLEV_FAIL).
The components also write an error message to the _Purchase
_Errors
collection. The components use a MessageManager object to retrieve error message text.
Constant | Condition |
pur_badshipping |
The shipping total key does not exist in the order. |
Remarks
The RequiredShippingCy and RequiredShipping components perform the same actions although on different dictionary keys. The following discussion uses the keys for the RequiredShippingCy component.
The RequiredShippingCy component verifies that the _cy
_shipping
_total
key exists in the order form. If the value does not exist, it uses the pur
_badshipping
constant to retrieve error message text from the MessageManager object and stores this message in the _Purchase_Errors
collection of the OrderForm object.