What Is a Shopping Cart?
What Shopping Cart Software Does in an Online Store
Shopping cart software is the part of an online store that holds the items a shopper has chosen before paying. It keeps a running list of products, quantities and options, and updates the totals as the shopper changes that list.
Think of it as a digital version of a supermarket trolley. The shopper can add items, remove them, change quantities or pick a size and colour. The cart then carries that selection through the rest of the purchase, from product pages to checkout.
A cart is separate from the catalogue. The catalogue lists everything the shop sells, while the cart holds only what one shopper intends to buy. This separation lets many shoppers build different carts from the same product data. The cart is one of the core parts of an ecommerce platform.
Calculations and Rules Inside the Cart
Most of the work in a cart is calculation. The software must keep totals correct as items change, and apply the rules the shop has set.
- Line totals and subtotal: the price of each item multiplied by its quantity, added together.
- Tax: the amount due, depending on the shopper's location, the product type and the shop's tax settings.
- Shipping: an estimate based on destination, weight or order value, often shown before checkout.
- Discounts and coupons: codes or automatic offers that reduce the subtotal, sometimes with conditions such as a minimum spend.
- Stock checks: a warning when an item is out of stock or the requested quantity exceeds what is available.
These figures depend on each other, so a change to one line can affect tax and shipping too. Good cart software recalculates everything together, so the shopper sees the same total that will be charged. The step after the cart is described in checkout types, and how the cart keeps its items between visits is covered in how carts remember items.
Frequently asked questions
Is a Shopping Cart the Same as Checkout?
No. The cart is where the shopper reviews and changes the selection, and it usually shows estimated totals. Checkout is the stage where the shopper enters delivery and payment details and confirms the order. Many platforms treat the cart as the first page of the checkout flow, so the two can feel like one step.
Do Shopping Carts Need a Database?
Not always. A cart can be kept in the browser, in the server's session, or in a database. A database copy survives a closed browser and can follow a logged-in customer to another device, which is why many platforms use one. The choice affects how well the cart copes with busy periods.