The ShoppingCart component is responsible for storing and managing a customer’s shopping carts. It maintains the customer’s current shopping cart that is used during the purchase process, and it stores any other shopping carts that have been persisted by that customer. These shopping carts are represented as atg.commerce.order.Order objects in the Oracle ATG Web Commerce object model, and represented as order items in the Order Repository.

By default, the /atg/commerce/ShoppingCart component is a session-scoped instance of atg.commerce.order.OrderHolder. The following table describes its important properties:

Property Name

Property Type

Description

current

Order

The current Order object. If null, then a new Order is automatically created.

currentEmpty

boolean

True indicates the current Order is null or includes no CommerceItems.

currentExists

boolean

True indicates the current Order exists.

currentTransient

boolean

True indicates the current Order is null or transient.

empty

boolean

True indicates both the current order and the collection of saved orders are empty.

failoverRecoveryPricingOperation

String

The operation to perform in case of failover. The default setting is ORDER_TOTAL.

handlerOrderId

String

Identifies the Order.

last

Order

The last completed Order. When an Order is submitted for checkout, the Order in ShoppingCart.current is moved to ShoppingCart.last, and the ShoppingCart.current property is reinitialized.

orderType

String

The type of order to create when constructing a new Order.

By default, this property is set to /atg/commerce/order/OrderTools.defaultOrderType.

persistOrders

boolean

True indicates the Order is persisted.

repriceAfterFailoverRecovery

boolean

True indicates that an Order will be repriced after failover recovery.

restorableOrders

RestorableOrders

The set of orders that can be restored through session backup.

saved

Collection

A Collection of the user’s saved shopping carts.

Applications should use the handle methods provided in atg.commerce.order.OrderHolder to move any cart from ShoppingCart.saved to ShoppingCart.current. See the ATG Platform API Reference for more information.

savedEmpty

boolean

True indicates the Collection of saved shopping carts is null or empty.