On this page
What this issue is
The cart shows items, each with a price and quantity. Under them is a total. If the line items add up to one number and the total shows another, and the gap is not explained by a visible discount, shipping or tax line, you have this issue.
Typical forms: a total that ignores a quantity change, a discount applied to the total but not shown, tax added to some lines but not others, a cached total from an earlier cart state, or rounding that drifts by a cent or a penny per line.
Why it costs you leads or sales
Shoppers check the sums. A total that looks wrong reads as a mistake or a hidden charge, and people leave rather than ask. If the total is too low, you may sell at a loss. If it's too high, you lose the sale. The cart and checkout can also disagree, which is the moment shoppers are most likely to stop.
- Add to cartItems and prices correct
- Cart pageTotal differs from line items
- CheckoutShopper doubts the price and leaves
- PurchaseOrder and purchase tracking never happen
The mismatch appears in the cart, so the steps after it are at risk.
Example: illustrative numbers showing how a visible total mismatch could reduce progress from cart to checkout.
How to check if your site has it
Build a test cart that exercises each rule you use, then do the sum yourself.
Build a mixed cart
Add two or three products, one with quantity 2 or more, one on sale, and one variant if you sell them.
Write down each line
Note unit price times quantity for every line, then add them up to get your own subtotal.
Compare with the cart
Check the subtotal, discount, shipping, tax and total shown. Each gap should have a visible label.
Change something and recheck
Change a quantity, remove an item, apply a discount code, change the country, then repeat the comparison without reloading, and again after a reload.
Compare with checkout
Proceed to checkout and confirm the order summary total matches the cart. Test on mobile and in a private window as well.
| Cause | Symptom | Where to look |
|---|---|---|
| Cached cart fragment | Total is old until reload | Caching plugin or CDN rules for cart pages |
| Discount rule | Total lower than lines with no discount line | Automatic discounts, cart rules, hidden codes |
| Tax setting | Lines show tax-inclusive, total adds tax again | Tax display and price entry settings |
| Rounding | Off by one cent or penny | Per-line vs per-order rounding |
| Custom code or widget | Total ignores upsell or bundle items | Theme cart template, upsell apps, scripts |
| Currency or market | Lines in one currency, total in another | Multi-currency or market settings |
How to fix it
First find which number is wrong: a line, the subtotal, or the total. Then fix the cause for your platform.
Exclude cart pages from caching
In your caching plugin and CDN, never cache the Cart, Checkout and My Account pages, and the cart cookies. WooCommerce sets these by default, but plugins can override them.
Review tax settings
Go to WooCommerce > Settings > Tax. Check 'Prices entered with tax' and 'Display prices in the shop/cart'. They should match how you enter prices.
Check rounding
In the same Tax settings, test the 'Round tax at subtotal level' option and see whether the drift disappears.
Isolate plugins
On a staging copy, disable discount, bundle, upsell and currency plugins one by one and retest the cart to find the one that changes totals.
Review discounts
Go to Discounts and look for automatic discounts that apply to the items in your test cart. Check combination settings.
Check taxes and duties
In Settings > Taxes and duties, confirm whether prices include tax, and in Markets check currency and rounding settings.
Audit apps and theme
Disable upsell, bundle or cart apps one at a time. If the total is right in the checkout but wrong in the cart, look at the theme cart template or app code that renders the total.
Check for scripts that rewrite the cart
Look in your tags for Custom HTML that edits price or total text on the page. Pause it in Preview mode and retest.
Check Ecommerce settings
In Ecommerce settings, review tax, shipping and discount setup, then retest the cart.
Remove custom scripts
If custom code changes cart text or totals, remove it in Page or Project settings and retest. The native cart is the source of truth.
Check tax and discount settings
In the dashboard, review Settings > Taxes and Marketing > Discounts or coupons, and retest with a mixed cart.
Remove custom Velo code
If you use Velo, check any code that edits cart or price elements.
Review commerce settings
In Commerce, review tax, shipping and discounts, and check any extension or code injection that touches the cart.
Calculate on the server
Compute totals from stored prices and quantities on the server. Treat browser values as display only.
Use integer money
Store amounts in minor units (cents or pence) and round once, with a defined rule, to stop drift.
Use one function
Have the cart, checkout and emails call the same totals function so they cannot disagree.
function cartTotals(lines, discountMinor, shippingMinor, taxMinor) {
const subtotal = lines.reduce(
(sum, l) => sum + l.unitPriceMinor * l.quantity, 0
);
const total = subtotal - discountMinor + shippingMinor + taxMinor;
return { subtotal, total };
}Before
- Lines add up to 80.00
- Total shows 72.00 with no explanation
- Checkout shows 80.00
After
- Lines add up to 80.00
- Discount line of -8.00 shown
- Cart and checkout both show 72.00
How to confirm it's fixed
- Hand-calculated subtotal equals the cart subtotal
- Every difference to the total has a labelled line
- Total updates correctly after changing quantity and removing an item
- Total is the same after a page reload
- Cart and checkout totals match
- Result is the same on mobile and in a private window
- Result is the same for each country or currency you sell in
How to prevent it happening again
Retest the cart after any change to discounts, tax, shipping, themes, caching or cart apps. Keep one fixed test cart and its expected total in your notes, so a quick check takes a minute. Avoid scripts that rewrite prices on the page.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. It runs an order_total_consistent check on the cart and checkout totals, so it can flag when the totals it reads on those pages disagree. It does not add up the individual line items, so a total that is wrong in a way that still looks consistent between cart and checkout will not be caught.
To cover the rest by hand, keep a fixed test cart with a known expected total, and redo the hand calculation from this guide after every pricing, tax, discount or theme change. Checks run on a schedule from the EU or the US, and a failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause. FunnelGuard stops before payment unless your store's test mode is set up. The Free plan covers 1 site and 2 journeys with daily checks and no card, and every paid plan has a 3-day free trial.
Questions people ask
Why does my cart total not match the line items?
The total is usually calculated from something other than the lines you see: a hidden discount, tax or shipping, a cached older cart, rounding, or custom code. Add up the lines by hand, then find which number differs and why.
Why is my cart total different from the checkout total?
The cart and checkout may use different calculations, such as shipping or tax only added at checkout, a cached cart page, or a discount that applies in one place only. Make both use the same totals logic and show every extra charge as its own line.
Why is my WooCommerce cart total wrong?
Common causes are caching of the cart page, tax display and price-entry settings that don't match, rounding settings, and discount or bundle plugins. Exclude cart pages from caching, review WooCommerce > Settings > Tax, and test with plugins disabled on staging.
Why is my Shopify cart total different from the items?
Check automatic discounts, tax and duties settings, market currency rounding, and any cart or upsell app or theme code. If checkout is right but the cart is wrong, the theme or an app is likely rendering the total incorrectly.
How do I fix a rounding difference in the cart total?
Calculate in minor units such as cents or pence and round once with a clear rule. On platforms with a setting, choose whether tax is rounded per line or per order, then retest with your usual product mixes.
Can FunnelGuard detect a cart total that doesn't match line items?
Only partly. It checks that the cart and checkout totals are consistent but does not sum the individual line items. You should still test a known cart by hand after changes.
How often should I test my cart totals?
Test after every change to prices, discounts, tax, shipping, themes, plugins or caching, and regularly in between. A scheduled automated check helps catch problems you didn't expect.
Related issues
- CNV-156Quantity update doesn't recalc totalFix guide
- CNV-157Cart page shows wrong currency symbolFix guide
- CNV-159Free shipping threshold message wrongFix guide
- CNV-162Checkout button in cart brokenFix guide
- CNV-153Cart empties itself between pagesFix guide
- CNV-152Cart count doesn't update after addFix guide