Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

AJAX Cart Update

Security covered Under active development 42 sites

This module makes your Drupal Commerce shopping cart update instantly when you change item quantities or see your order total. It uses AJAX to update these parts of the cart without reloading the whole page, creating a smoother online shopping experience.

AJAX Cart Update enhances the Drupal Commerce cart by enabling real-time quantity and price updates via AJAX, creating a faster and more seamless shopping experience without page reloads.

Features

The AJAX Cart Update module improves the Drupal Commerce cart by providing dynamic AJAX-based updates for item quantities, order totals, and cart summaries without a full page reload. This ensures a faster and smoother shopping experience.

Key features:
- Real-time cart updates using either CSS selectors or a dedicated AJAX endpoint.
- Endpoint mode supports multiple custom endpoints for updating specific cart elements (e.g., prices, summaries, or cart block), with integration for Vue.js/React via the ajaxCartUpdate:endpointUpdated event.
- Supports multilingual sites with language-aware AJAX URLs.
- Flexible settings to choose the update method that best fits your site.
- Improves user experience and reduces page reloads during cart interactions.

Post-Installation

After enabling the module:
1. Go to `/admin/config/ajax-cart-update/settings`.
2. Select your preferred cart update method:
- Use CSS selectors from Views.
- Use AJAX endpoint to retrieve cart summary HTML. : For complex layouts or client-side framework integration.
3. Save the configuration.
The module automatically enhances your Commerce cart page and blocks.

Additional Requirements

- Drupal Commerce module (`commerce_cart`) must be installed and enabled.
- Views module must be installed and enabled.

Important Considerations

The AJAX Cart Update module relies on standard CSS classes and structure generated by the Commerce Cart form through the Views module.
If the Views configuration or rendered cart markup is significantly customized (e.g., changing field names, classes, or structure), it may affect the module's ability to correctly update quantities, prices, and totals.

After modifying the cart view or template, it is recommended to verify that AJAX updates continue to function correctly.

Similar projects

  • Commerce Ajax Add to Cart provides AJAX add-to-cart functionality, but doesn't update the cart form dynamically like this module.
  • Commerce Cart API offers full cart APIs but requires custom front-end work, while AJAX Cart Update works out-of-the-box with Views.

Supporting this Module

If you find this module useful, consider contributing bug reports, feature suggestions, or patches in the Drupal.org issue queue.

Community Documentation

- Complete usage instructions are available in the README file bundled with the project.

Drupal 10–11

Ask your assistant about AJAX Cart Update

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Sep 2025
Latest release
3 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Jun 24, 2026
1.0.0 Stable 10–11 Nov 22, 2025
1.0.x-dev Dev 10–11 Sep 24, 2025