kowal.info

Update Cart After Qty Change

Composer kowal/module-updatecartafterqtychange · Version 1.0.5

Product page

Update Cart After Qty Change — kowal.co

Description

Recalculates the shopping cart after a quantity change and adds plus and minus buttons beside the quantity field.

For whom

For stores where customers frequently adjust unit quantities on the cart page.

Features

  • Change quantities with the buttons or by editing the field.
  • Refresh the cart form through AJAX.
  • Reload order totals and minicart data.

Installation

From the Magento root, with Composer access to the Kowal package, run

composer require kowal/module-updatecartafterqtychange
bin/magento module:enable Kowal_UpdateCartAfterQtyChange
bin/magento setup:upgrade
bin/magento cache:clean

Configuration

  1. Select the appropriate store scope in Magento configuration.
  2. Open Update Cart After Qty Change → Settings and set Enable. The feature is enabled by default.
  3. Save and refresh the configuration cache.

Requirements / notes

The package requires kowal/base. Its script uses RequireJS, jQuery and the standard Magento cart form. The buttons round quantities to whole units.

FAQ

Why do several quick clicks produce a single update?

Each change restarts a 150 ms timer. The script submits the update after the last change in the sequence.

Verify the installation

bin/magento module:status Kowal_UpdateCartAfterQtyChange

Add one unit of a product, open the cart and click plus. Check for quantity 2, the updated line subtotal and refreshed minicart data. Reload the page and confirm the saved quantity.