Skip to main content
The Horizon cart provides a responsive, feature-rich shopping cart experience with real-time updates, summary sidebar, and customizable blocks.

Key Features

  • Dynamic Updates: Real-time cart updates without page reload
  • Responsive Layout: Two-column desktop, single-column mobile
  • Cart Summary Sidebar: Sticky summary with totals and checkout button
  • Empty State: Custom empty cart display
  • View Transitions: Smooth animations for cart changes
  • Flexible Blocks: Add custom content blocks to cart page

Cart Structure

The cart uses a component-based architecture:

Cart Components

Cart Title

Displays the cart heading (e.g., “Your Cart”).

Cart Items

Features:
  • Product thumbnails
  • Variant information
  • Quantity selectors
  • Remove buttons
  • Line item properties
  • Real-time price updates

Cart Summary

Includes:
  • Subtotal
  • Shipping estimate
  • Tax information
  • Discount codes
  • Total price
  • Checkout button
  • Payment icons (optional)

Additional Blocks

Supports custom blocks:
  • Text
  • Images
  • Icons
  • Buttons
  • Videos
  • Groups
  • Spacers

Layout System

Desktop Layout

Two-column layout with sidebar on medium+ screens:
Grid Areas:
  • Column 1: Title + Items
  • Column 2: Summary (spans all rows)

Mobile Layout

Single-column stacked layout:

Extended Summary

For page-width layouts, summary can extend to viewport edge:
This creates a bleed effect where the summary extends to the edge of the viewport while content stays within page width.

Empty Cart State

Custom template for when cart is empty:
Empty State Styling:

Dynamic Cart Updates

The cart automatically updates without page reload:

Quantity Changes

Remove Items

Cart API

Uses Shopify Cart API for updates:

View Transitions

Smooth animations when cart becomes empty:

Supported Block Types

Access to all theme blocks like product cards, collection lists, etc.

Settings

Section Width

Color Scheme

Padding

Spacing Between Sections

Responsive Breakpoints

< 750px
  • Single column layout
  • Summary below items
  • Full-width elements
  • Touch-optimized quantity selectors

Performance Optimizations

Debounced Updates

Quantity changes are debounced to prevent excessive API calls:

Section Rendering

Cart uses section rendering for partial updates:

Accessibility

Announces cart updates to screen readers.
  • Tab through all interactive elements
  • Enter/Space to activate buttons
  • Arrow keys for quantity steppers
  • Focus visible on all controls

Schema Configuration

Cart Summary Blocks

The _cart-summary block renders:
  1. Subtotal Display
  2. Shipping Calculator (optional)
  3. Discount Code Input
  4. Total Price
  5. Checkout Button

Notes API Integration

Cart supports order notes:

Attributes API

Support for cart attributes: