Next Commerce
Cart Summary

Cart Summary

The Cart Summary renders a reactive price breakdown block that stays in sync with the cart automatically. Drop in a single element for a built-in totals layout, or write your own template with token substitution, conditional CSS classes, and repeating list containers for per-item and discount breakdowns.

How It Works

  1. Add data-next-cart-summary to any container element — no further configuration required
  2. The block subscribes to the cart and re-renders whenever totals change
  3. Use a <template> child to control the layout; omit it to use the built-in rows
  4. Apply CSS rules against state classes (next-has-discounts, next-free-shipping, etc.) to show or hide rows without JavaScript

On this page