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.
| Function | Configurable parameters | Customer effect |
|---|---|---|
| Line item management | Quantity limits, variant editing, removal | Control over the order before paying |
| Price calculation | Price lists, tiered pricing, currency | Correct subtotal in the buyer’s currency |
| Discounts and coupons | Code rules, stacking, minimum order value | Visible savings that encourage purchase |
| Tax calculation | Tax inclusive or exclusive display, regional rates | Transparent final cost |
| Shipping estimate | Rates by zone, weight, free-shipping threshold | Fewer surprises at checkout |
| Cart persistence | Cookie lifetime, server storage duration | Saved selections across visits |
| Cross-sell and upsell | Recommended items, bundles | Higher average order value |
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.
| Design | Description | Best suited to |
|---|---|---|
| Full cart page | Separate page listing all items and totals | Large orders and business buyers |
| Slide-out cart drawer | Panel that opens without leaving the page | Fashion and lifestyle stores with browsing |
| Mini cart icon | Header icon with item count and preview | All stores as a persistent indicator |
| Direct buy button | Skips the cart and starts express checkout | Single-product purchases and mobile |
| Saved for later list | Moves items out of the active cart | Considered or high-value purchases |
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.
Shopping cart compared with related e-commerce concepts
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.
| Concept | Role | Key difference from the cart |
|---|---|---|
| Shopping cart | Collects and prices selected items | Editable, no commitment |
| Checkout | Collects address, shipping choice and payment | Converts the cart into an order |
| Order | Confirmed purchase record | Fixed and legally binding after confirmation |
| Wish list | Saves items of interest for later | No price calculation or checkout path |
| Marketplace multi-seller cart | One cart with items from several sellers | Splits into several orders and shipments |
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.