During checkout, activity flows check remaining item stock quantities and calculate cart totals. Optimizely Customized Commerce incorporates a check inventory activity into the activity flows. This activity checks the warehouse inventory when adding or changing a cart item.
Classes in this topic are available in the following namespace:
Mediachase.Commerce.Workflow.Activities. Contains CheckInventoryActivity
The CartPrepare activity flow is run prior to rendering the page where the customer confirms the order. This flow performs the following tasks:
Determines if the item is available, based on the Active status and the item's start and end dates. If an item is not available, it is removed from the cart, and an error message appears on the Cart view page.
Determines if cart items are still available based on remaining stock in inventory, reserved inventory stock, and whether backordering is permitted. If the item is not available, it is removed, and an error message appears on the Cart view page.
Calculates the price of each cart item, based on tiered pricing. If pricing has changed, a message regarding the change is returned and can be displayed to the customer.
Calculates a cart item's extended price, for instance multiplying the price by the quantity purchased.
Calculates discounts that apply to cart items.
If multiple shipments are created, splits line items into respective shipping addresses.
Adds shipping costs and applicable taxes to the cart.
The CheckInventoryActivity determines whether cart items are available.
To customize the inventory checking activity, create an activity flow that mirrors the CartPrepareActivityFlow and replace the CheckInventoryActivity activity with your implementation.