Cart Quantity Buttons with Automatic Total Updates for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
Description / Cart Quantity Buttons with Automatic Total Updates for Magento 2
MAGENTO 2 · CART · PRODUCT QUANTITY · AJAX
Change quantity with buttons and refresh the cart without reloading.
Kowal Plus/Minus Quantity Buttons
Add plus and minus buttons next to the quantity fields in the standard cart. After a change, refresh the form, mini cart, and totals summary using Magento AJAX mechanisms.
Plus and minus · Totals refresh · Button reinitialization
HOW IT WORKS IN PRACTICE
01 · The customer changes the quantity
They use the buttons or edit the qty field.
02 · The cart sends an update
A short delay combines quick changes into one request.
03 · The data refreshes
The form, mini cart, and summary show the new values.
What does your store gain?
Explore the module features, use cases, and settings.
Discover the module
This module extends the standard Magento 2 cart with intuitive product quantity controls:
+ / − buttons next to qty – the user does not have to click a small field and enter the number manually.
Automatic AJAX recalculations after the quantity changes:
cart form refresh,
mini cart refresh (customerData),
summary / totals refresh (getTotalsAction),
all without a page reload.
Stability after DOM refresh – after the cart HTML is replaced, the buttons are initialized again.
Modern pill-style appearance – the control looks like one cohesive element (minus | quantity | plus) and fits most themes.
Goal: easier quantity changes and cart refreshes without manually reloading the page. The impact on checkout completion depends on the implementation and requires measurement.
Enabling and updating cart data
In Stores → Configuration → Kowal → Update Cart After Qty Change → Settings, set Enable. The mechanism starts on the standard cart page and covers both the buttons and manual changes to the quantity field.
The update uses the form-validate form, the customerData cart section, and getTotalsAction. After the form is replaced, the buttons are initialized again without duplicating controls.
Quantity step and product restrictions
The buttons change the quantity by 1. The script reads the min and max fields, uses a default minimum of 1, and rounds the result to an integer. Selling fractional quantities or using a custom step requires customization.
A short 150 ms debounce reduces the number of requests during rapid changes. Stock status, allowed quantities, and other order conditions are still verified by Magento.
Theme and scope of use
The module is based on RequireJS, jQuery, and the standard cart HTML. Check the control appearance and form selectors in your theme. The repository does not include a separate Hyvä adapter for this package.
The buttons apply to standard cart fields; refreshing the mini cart does not mean the same control is added there. Recalculation time depends on the store and network response.
Installation via Composer
Package kowal/module-updatecartafterqtychange, module Kowal_UpdateCartAfterQtyChange. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to your store process.
From configuration to result
1. The customer changes the quantity
They use the buttons or edit the qty field.
2. The cart sends an update
A short delay combines quick changes into one request.
3. The data refreshes
The form, mini cart, and summary show the new values.
Two units instead of one
The customer clicks plus next to a product. The module increases the quantity and starts a cart update, after which it refreshes the totals and mini cart.
They do not have to reload the page manually. Final quantity approval and product availability still depend on Magento rules.
Make changing quantities in the cart easier
Want to tailor the module to your store? Ask about implementing Kowal Plus/Minus Quantity Buttons and discuss configuration or any needed extensions.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Questions and Answers
Does it recalculate totals and the mini-cart?
Will it work after refreshing the cart HTML via AJAX?
Can the appearance be changed to a “pill” style or to match my theme?
Will quickly clicking +/- make many requests?
Change Log
Module Installation Instructions
Installation via Composer
You will receive the Composer repository access details (customer email address and license token) by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.
composer config repositories.kowal composer https://repo.kowal.storecomposer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'composer require kowal/module-updatecartafterqtychangeCompleting the installation
After installing the package, update Magento and clear the cache:
php bin/magento setup:upgradephp bin/magento cache:flushIn a production environment, also run DI compilation and deploy static files according to your store deployment process.
Customer Reviews
For toursport.pl, we implemented a + / − quantity control in the cart because users often changed quantities (e.g., apparel/sizes, accessories, sets), and manually entering values slowed down the process.
Problem:
customers edited quantities in multiple steps,
some mobile users had difficulty precisely tapping the qty field,
after changing quantities, they expected totals and the mini-cart to update immediately.
Solution:
we added intuitive pill-shaped +/− buttons,
we enabled AJAX recalculations without refreshing the page (totals + mini-cart),
we matched the style to the cart layout so the control looked like a native part of the theme.
Business impact (practical):
faster cart editing,
less frustration on mobile,
a more “app-like” cart → a better shopping experience.