Skip to content

Shopping Cart

A shopping cart temporarily stores the products, variants, quantities, and other purchasing information a customer intends to take into checkout.

A shopping cart is the part of an e-commerce system that stores the products a customer intends to purchase before checkout.

It represents a temporary collection of selected items and their purchasing details.

What It Can Contain

A cart may contain:

  • Products
  • Product variants
  • Quantities
  • Prices
  • Discounts
  • Estimated taxes
  • Shipping estimates
  • Customer selections
  • Subscription choices

The cart usually changes as the customer adds, removes, or updates items.

Cart vs. Checkout

The shopping cart answers:

What do you intend to buy?

Checkout answers:

How will this order actually be completed?

The cart generally precedes checkout, although some commerce experiences skip a traditional cart and allow immediate purchase.

How It Works

The cart needs some way to maintain state while the customer continues browsing.

Depending on the platform, this may involve:

  • Browser storage
  • Cookies
  • Server-side sessions
  • Customer accounts
  • Database records

Stripe's payment documentation notes that a payment object may correspond to a shopping cart or customer session, illustrating how the cart and payment lifecycle can become connected during checkout. Stripe's Payment Intents documentation

Why It Matters

The cart is where product selection becomes an intended order.

Problems here can affect:

  • Prices
  • Inventory
  • Discounts
  • Variant selection
  • Quantities
  • Shipping calculations
  • Analytics events

The cart is also an important point in a purchase funnel.

Common Problems

Common problems include:

  • Cart contents disappearing
  • Incorrect product variants
  • Prices changing unexpectedly
  • Discount rules being unclear
  • Mobile cart controls being difficult to use
  • Cart pages loading unnecessary third-party code
  • Add-to-cart actions not providing clear feedback
  • Analytics firing duplicate events

How to Improve

Keep the cart state clear.

Show:

  • Exactly what was selected
  • Quantities
  • Prices
  • Variant information
  • Meaningful fees where known
  • Clear paths to update or remove items

Then make the transition into Checkout predictable.