Shopping cart

On this page 7

A shopping cart is the component of an online store that holds the products a customer has selected, keeps track of quantities and variants, calculates prices, discounts, taxes and shipping estimates, and hands the resulting order over to checkout and payment. In e-commerce, the term also refers more broadly to the cart software or platform that powers this function, which is why online store systems are sometimes called shopping cart software.

The cart is a temporary, editable order draft. It separates browsing from buying, allowing customers to collect items over several visits, compare costs and decide later. Its design and reliability directly affect conversion rate, average order value and the share of abandoned purchases.

How a shopping cart works

Technically, a shopping cart is a data object linked to a session or customer account. Each line item stores a product identifier, the selected variant such as size or color, quantity and the price applicable at the moment of addition. The cart recalculates totals whenever items, quantities, coupons or the delivery address change.

Carts are persisted in different ways. Guest carts are typically tied to a browser cookie or a token stored in the browser, while account carts are stored on the server and can follow a logged-in customer across devices. Many platforms merge a guest cart into the account cart when the customer signs in, which requires rules for duplicate items.

The cart also interacts with inventory and pricing systems. Most stores do not reserve stock when an item is added, because abandoned carts would block inventory; instead, availability is checked again at checkout. High-demand sales sometimes use short reservation timers, often between 10 and 20 minutes, to guarantee items during payment.

Core cart functions and parameters

A well-designed cart performs several functions beyond storing items. The table below summarizes the core functions and the parameters merchants configure.

FunctionConfigurable parametersCustomer effect
Line item managementQuantity limits, variant editing, removalControl over the order before paying
Price calculationPrice lists, tiered pricing, currencyCorrect subtotal in the buyer’s currency
Discounts and couponsCode rules, stacking, minimum order valueVisible savings that encourage purchase
Tax calculationTax inclusive or exclusive display, regional ratesTransparent final cost
Shipping estimateRates by zone, weight, free-shipping thresholdFewer surprises at checkout
Cart persistenceCookie lifetime, server storage durationSaved selections across visits
Cross-sell and upsellRecommended items, bundlesHigher average order value
Shopping cart functions

Unexpected extra costs revealed late in the process are one of the most frequently cited reasons for abandoning a purchase. Showing a reliable shipping and tax estimate in the cart, or a progress message toward a free-shipping threshold, reduces this risk.

Cart designs and their use

Stores implement the cart in several interface patterns, each suited to different catalogs and buying behaviors.

DesignDescriptionBest suited to
Full cart pageSeparate page listing all items and totalsLarge orders and business buyers
Slide-out cart drawerPanel that opens without leaving the pageFashion and lifestyle stores with browsing
Mini cart iconHeader icon with item count and previewAll stores as a persistent indicator
Direct buy buttonSkips the cart and starts express checkoutSingle-product purchases and mobile
Saved for later listMoves items out of the active cartConsidered or high-value purchases
Common shopping cart designs

Many stores combine patterns: a cart drawer for quick confirmation, a full cart page for review and express payment buttons for fast buyers. The choice should follow how customers typically buy, whether one item at a time or many items in one basket.

The shopping cart is often confused with neighboring parts of the purchase flow. The comparison below clarifies their roles within an online store, a marketplace or an omnichannel setup.

ConceptRoleKey difference from the cart
Shopping cartCollects and prices selected itemsEditable, no commitment
CheckoutCollects address, shipping choice and paymentConverts the cart into an order
OrderConfirmed purchase recordFixed and legally binding after confirmation
Wish listSaves items of interest for laterNo price calculation or checkout path
Marketplace multi-seller cartOne cart with items from several sellersSplits into several orders and shipments
Shopping cart and neighboring concepts

In omnichannel retail, a cart may be shared between web, app and in-store systems, for example when a sales associate builds a cart on a tablet that the customer completes online. This requires a central cart service rather than a cart stored only in one browser.

Cart abandonment and common mistakes

Cart abandonment occurs when a customer adds items but leaves without completing the purchase. Industry estimates commonly place average abandonment rates around two thirds or more of carts, with considerable variation by sector, device and measurement method. Part of this is normal behavior, because many shoppers use the cart to compare prices or save items.

  • Hiding shipping costs and taxes until the final checkout step.
  • Forcing account creation before purchase instead of offering guest checkout.
  • Losing cart contents when a session expires or the customer changes device.
  • Slow cart updates after each quantity change, especially on mobile connections.
  • Coupon fields that invite searching for codes, which sends buyers away from the store.
  • Recommendations that clutter the cart and distract from completing the order.

Recovery tactics include abandoned cart emails sent to known customers who consented to receive them, typically within hours of abandonment, as well as saved carts and clear trust signals. Recovery messages work best when they remind rather than pressure, and steep automatic discounts can train customers to abandon carts deliberately.

The short version

An online shopping cart works just like a basket in a supermarket. While you browse, you drop products into it, take some out again and see how much everything costs together. Nothing is bought until you go to the checkout and pay.

A good cart shows you the full price clearly, including delivery, remembers your items if you come back later and lets you change your mind easily. When a cart is confusing or hides costs, many people simply leave the store without buying.

Where it makes a difference

An online pet supply store notices that most customers add items to the cart but only a small share complete checkout. Analysis shows that shipping costs appear only on the last checkout page and that mobile carts are lost when customers switch from phone to laptop.

The store adds a shipping estimate directly in the cart, a progress bar showing how much more is needed for free shipping and server-stored carts for logged-in customers. It also introduces a reminder email for consenting customers three hours after abandonment. Over the following months, checkout completion improves noticeably and average order value rises, because many customers add a small item to reach the free-shipping threshold.