Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
19.36 KB
MD5: f830c5a0793563143d508cee3ec71d72
SHA-1: 76a2fd3c15c31fade99fb6b5c37de19c69e764f9
SHA-256: 1b3a7163c78df48b2b07014ab94b957abe48fe9d5af7dd712d58f038e2a9b82c
Download zip
27.35 KB
MD5: 41f0c9dbc6472aaacfeb5773cc6c602c
SHA-1: e5b442df34ca44dc72cf426abab2b0f7d1a8e6cd
SHA-256: 30d4fd7899b3d0d094a2b9c11e0e33f95e4b46bb537d9ae25af49c10dfcc5d3d
Release notes
Release Notes: AJAX Cart Update 1.0.1
This patch release resolves critical compatibility issues with Drupal 11, addresses a bug with disappearing order adjustments, and improves user experience on desktop.
Bug Fixes:
- Fixed duplicate hook registrations on Drupal 11: Resolved
LogicExceptionissues caused by duplicate hook definitions (such aspreprocess_views_viewandpreprocess_page). Added#[LegacyHook]attributes to procedural wrappers to ensure safe registration on Drupal 11 while preserving backwards compatibility with Drupal 10.3. - Fixed jQuery 4 compatibility: Replaced the deprecated and removed
$.isNumeric()utility with standard vanilla JavaScript checks (isNaN(parseFloat())andisFinite()), preventing script errors on Drupal 11 sites. - Fixed disappearing order adjustments (taxes, shipping, promotions): Injected the
commerce_order.order_total_summaryservice intoAjaxCartUpdateController. Replaced the manual construction of the#totalsarray with$this->order_total_summary->buildTotals($cart), ensuring all order adjustments (tax lines, shipping, promotions) are preserved and dynamically recalculated upon AJAX quantity updates.
User Experience Improvements:
- Immediate quantity updates: Added the
inputevent alongside thechangeevent in JavaScript. The AJAX cart update now triggers dynamically 500ms after typing/changing a quantity, without requiring the user to press Enter, click elsewhere, or tab away.