Skip to content

Cart v2

Displays the WooCommerce cart page as editable Filled cart and Empty cart states.

Cart page. The element only appears in the Elements panel while you edit the page that WooCommerce uses as its cart page.

  • State (radio) - Switches the builder preview between Filled cart and Empty cart.
  • Filled cart - Used when the cart contains products.
  • Empty cart - Used when the cart has no products.

The generated Cart v2 structure keeps both states as internal child elements, so you can edit each state from the Structure panel. The top of the Structure panel shows the state you are editing. Click Switch there to change the previewed state.

Each state can generate starter content from Insert a structure:

  • Complete cart block
  • Complete empty cart block

Generated structures are appended to the current state content and do not overwrite existing content.

For a step-by-step setup, see Cart v2 workflow.

The complete cart block contains a cart loop with one row per product (image, title, price, excerpt, item data, Cart quantity and a remove icon), a cross-sells section, a free shipping progress bar, summary rows for subtotal, coupons, fees, taxes, shipping and total, a checkout button and the Cart coupon element.

While you edit the Filled cart state, the builder previews a sample cart with sample notices. Loops without data, such as coupons or fees, show their dynamic tags on the canvas. Check the real values on the frontend.

On the frontend, the Cart quantity element updates the cart via AJAX (a quantity of zero removes the product), the Cart coupon element applies coupons via AJAX, and each applied coupon gets its own summary row with a remove icon.

The Coupon total row below the applied coupons shows the total of all coupons. If your store only allows one coupon at a time, it repeats the coupon amount, so you can delete it.

Use the Cart contents query loop for custom cart item rows. Cart v2 layouts can also use cart total tags such as {woo_cart_items_count}, {woo_cart_order_subtotal}, {woo_cart_order_total}, {woo_cart_shipping_method}, {woo_free_shipping_remaining}, and {woo_free_shipping_progress}.

See WooCommerce v2 query loops and dynamic tags for the complete reference.