ecomhouse / breezequantityswitch
Breeze storefront quantity switch for Magento 2 by ecomhouse
Package info
github.com/ecomhouse/breezequantityswitch
Language:HTML
Type:magento2-module
pkg:composer/ecomhouse/breezequantityswitch
Requires
- php: >=8.2
- ecomhouse/quantityswitch: ^1.0.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Breeze (Swissup) storefront companion for ecomhouse/quantityswitch. Re-implements the same +/− quantity
controls — product page, cart, minicart — for Magento themes built on Swissup Breeze, whose
lightweight JS stack the Luma-targeted parent module doesn't reach on its own.
Polska wersja dokumentacji: docs/jak-uzywac.md
Table of Contents
Requirements
| Requirement | Version |
|---|---|
| Magento Open Source | 2.4.x |
| PHP | >= 8.2 |
ecomhouse/quantityswitch |
^1.0 |
| Swissup Breeze theme | required (sequenced in etc/module.xml, not a Composer dependency) |
How it works
Every override lives in a Breeze-scoped layout handle, so it never reaches Luma. Every
override is also gated by the parent module's ecomhouse_quantity_switch/general/enable
config flag, so disabling that one setting turns the +/− controls off on both frontends:
- Product page (
breeze_catalog_product_view.xml) — swaps in a Breeze-specificproduct/view/addtocart.phtml(same markup as the parent module's template, minus its inline<script>block) and adds an init block that boots theEcomHouse_QuantitySwitch/js/product/qtyswitchwidget against.box-tocart. Both the template swap and the init block carryifconfig. - Cart — no template override;
js/cart/qtychange.jsis a jQuery widget that injects the +/− buttons around each cart-item quantity input at runtime (idempotent — safe to re-run after an AJAX reload), then debounces changes into an AJAX cart-update call compatible with Breeze's own reload cycle. Since there's no template to attachifconfigto, a dedicatedbreeze_checkout_cart_index.xmlhandle adds anifconfig-guarded block (cart/enabled.phtml) that setswindow.ecomhouseBreezeQuantitySwitchEnabled; the widget's auto-init checks that flag before touching the DOM. - Minicart (
breeze_default.xml) — overrides Breeze's ownbreeze.Magento_Checkout_minicart_item_defaultKnockout template withminicart/item/default.html, which renders the +/− buttons inline withonclick="qtyChange(event)".js/minicart/qtychange.jsexposes that handler onwindow. The template override carriesifconfig. - All three JS files are registered into Breeze's own
breeze.jsbundle (breeze_default.xml) unconditionally — Magento's bundle-registration layout element has noifconfigsupport — but with the config off none of the markup they target exists, so they're inert.
See docs/how-to-use.md for a longer walkthrough and troubleshooting.
Installation
Composer
composer require ecomhouse/breezequantityswitch bin/magento module:enable EcomHouse_BreezeQuantitySwitch bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy -f bin/magento cache:flush
Manual
cd app/code mkdir -p EcomHouse/BreezeQuantitySwitch # Extract the module files into the directory created above bin/magento module:enable EcomHouse_BreezeQuantitySwitch bin/magento setup:upgrade bin/magento cache:flush
Verify
bin/magento module:status EcomHouse_BreezeQuantitySwitch
Expected: Module is enabled.
Configuration
None of its own — this module reads the parent module's setting:
Path: Stores > Configuration > EcomHouse Extensions > Product Quantity Switch > General
| Field | Type | Description |
|---|---|---|
| Enable module | Yes/No | Master switch for the +/− buttons, on both Luma and Breeze storefronts. |
Turning it off hides the +/− controls on every surface this module touches (product page, cart, minicart) in addition to Luma's. See docs/how-to-use.md for details on how each surface is gated.
How to use
See docs/how-to-use.md for the customer-facing walkthrough and troubleshooting. Polish version: docs/jak-uzywac.md.
Uninstalling
bin/magento module:disable EcomHouse_BreezeQuantitySwitch composer remove ecomhouse/breezequantityswitch bin/magento setup:upgrade bin/magento cache:flush bin/magento setup:static-content:deploy -f
The module stores no data of its own — uninstalling leaves no trace in the database. The storefront falls back to Breeze's native quantity field.
Support
- Email: opensource@ecom.house
- Website: https://ecom.house/
- Changelog: CHANGELOG.md
- License: OSL-3.0