CXML Stock Overview
Overview
This extension integrates with an interface which returns CXML-styled data to control how users purchase stocked items.
Implementation
When a user tries to add an item to their shopping cart which is out of stock or orders a larger quantity than is available, the extension can be configured to behave in 4 different ways in the product metadata:
- Default: Defaults to the settings in the extension’s configuration page.
- Ignore: Allow the user to proceed as normal.
- Warn: Displays a warning message to the user, but allows the user to proceed as normal anyway
- Refuse: Prevents the user from adding the item to their shopping cart and displays a warning message to them.
In addition, the product also requires a SKU to be set. When the user tries to add an item to the cart the extension attempts a HTTP Post to the web service with the SKU. The extension should then receive CXML data back in the following format:
<StockStatus">
<Status>
<StockCode>EN10</StockCode>
<AvailableQuantity>146800</AvailableQuantity>
</Status>
</StockStatus>