RequiredItemAdjustPriceCy, RequiredItemAdjustPrice

Use these components to ensure that the current price for each item in the order is set and that it has not been changed.

The RequiredItemAdjustPrice component is for backward compatibility only. The RequiredItemAdjustPriceCy 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, Item Adjust Price stage.

Configuration Values

None.

Values Read

The RequiredItemAdjustPriceCy component reads the following values from the indicated dictionaries. The RequiredItemAdjustPrice component reads the same key but without cy_.

Key Dictionary Description
item._cy_iadjust_currentprice Order Reads the current price of each item in the items collection in the OrderForm object.
item._cy_iadjust_regularprice Order Reads the regular price of each item in the items collection in the OrderForm object.
item.cy_placed_price Order Reads the placed price of each item in the items collection in the OrderForm object. For more information, see the Remarks section.
MessageManager Order A reference to a MessageManager object. This key is used to retrieve the bad-handling total constant (pur_badplacedprice) in case of an error.

Values Written

The RequiredItemAdjustPriceCy component writes the following values to the Order dictionary. The RequiredItemAdjustPrice component writes the same keys but without cy_.

Key Description
item.cy_placed_price Writes the placed price of an item in the items collection in the OrderForm object. For more information, see the Remarks section.
item._cy_iadjust_currentprice Writes the adjusted current price of an item in the items collection in the OrderForm object.
_Basket_Errors Error messages are written to this SimpleList object.

Errors

The RequiredItemAdjustPriceCy and RequiredItemAdjustPrice components return error level 2 (OPPERRORLEV_WARN) when the placed price is not equal to the current price. Other errors return error level 3 (OPPERRORLEV_FAIL).

These components write error messages to the _Basket_Errors collection. These components use a MessageManager object to retrieve user warning message text.

Constant Condition
pur_badplacedprice The placed price is not equal to the current price — the current price has changed since the item was added to the basket.

Remarks

The RequiredItemAdjustPriceCy and RequiredItemAdjustPrice components perform the same actions although on different dictionary keys. The following discussion uses the keys for the RequiredItemAdjustPriceCy component.

The RequiredItemAdjustPriceCy component verifies that the current price (_cy_iadjust_currentprice) exists for each item in the items list. If this value does not exist, the component creates it and initializes it to the regular price (_cy_iadjust_regularprice).

In addition, the component checks the placed price (cy_placed_price) against the current price (cy_iadjust_currentprice) to see if the current price has changed since the user placed the item in the basket. If the placed price does not exist, the component creates it and sets it to the current price (cy_iadjust_currentprice). If the placed price exists, but is not equal to the current price, the RequiredItemAdjustPriceCy component retrieves the warning message text for a bad placed price from the MessageManager object, and writes this message to the _Basket_Errors collection of the order form.


All rights reserved.