CyberStore Ecommerce 2023 Documentation
Shopping Cart Logic
In This Topic

The CyberStore shopping cart plays an integral part in the shopper's e-commerce journey. In this topic the capabilities and logic used in the cart are explained.

The Persistent Cart

First introduced in CyberStore 2023, the Persistent Cart is a feature of the CyberStore that ties the shopper to the contents of a single cart while persisting the items in the cart between logins so that returning shoppers will find items previously selected still awaiting purchase. This feature removes the dependency of a session as one of the unique associations of a shopping cart. In order for a cart to persist the shopper must have a registered Account. Anonymous shopper's will not have their cart selections maintained when their session ends.

The Persistent Cart allows a shopper to maintain multiple active sessions while ensuring that any changes to the cart in one session carry over to all active sessions.

When a logged-in shopper is not actively browsing the site, their cart becomes an $$Abandoned Cart$$ and its contents are no longer taken into accout for any inventory calculations.

Restoring Abandoned Carts

Whenever a previously abandoned cart is restored to a new session, the cart lines will be recalculated to ensure that pricing accurately reflects the now current pricing, and all availability and view list rules for the cart will be applied.

During recalculation, lines will be removed from the cart whenever any of the following occurs to the Item since the last time the cart was active.

Locking Carts when Checking Out

Once a Shopper begins to checkout, the Shopping Cart for the Account becomes locked and cannot be changed in any session tied to the Shopper's account. The message "The cart is currently unavailable while your account is in the process of checking out. Please complete or cancel the in progress order and try again later."will be shown to the shopper whether attempting to add an item to cart, restore a saved cart, submit items via Quick Order Entry, continue a checkout step from another session, removing items or modifying item quantities in the cart.
The lock will remain in place until either the order is complete, the order in progress is cancelled by the Shopper, or the amount of time specified in the Session Timeout setting expires starting with the time the lock was enabled. The order can be cancelled by the shopper in any of their logged-in sessions. During the same session that began the checkout process, this is done by clicking the cancel button on any checkout step, or on the Shopping Cart page. When in a different session than the one that started checkout, the Shopper can only cancel the order in progress from the Shopping Cart.

When an in progress order is cancelled prior to the completion of the order, all pending checkout information will be deleted, the items in the cart at the time that checkout began will be in the cart, and the lock will be remove resulting in re-enabling the add to cart and edit functions to the shopper. 

Calculating Shopping Cart Item Count

The shopping cart item count is the total number of items in the cart at a given point of time. This is calculated by adding up all quantites of all lines in the cart.

Recalculating Items in the Shopping Cart

The shopping cart automatically recalculates whenever a cart is released from being abandoned, or a line is added, updated or deleted. This is true whether the changes are made interactively in the ShoppingCartDisplayControl, the ShoppingCartQuickEntryControl or programatically using any of the CyberStore Cart Web Service or CyberStore Inventory Web Service methods.

Recalculation performs the following checks:

See Also

Inventory