Drupal is a registered trademark of Dries Buytaert

ajax_cart_update

13 sites Security covered
View on drupal.org

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.

Activity

Total releases
2
First release
Sep 2025
Latest release
3 months ago
Release cadence
59 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Nov 22, 2025
1.0.x-dev Dev Sep 24, 2025