Search by

ecomhouse / breezequantityswitch

Breeze storefront quantity switch for Magento 2 by ecomhouse

Maintainers

Package info

github.com/ecomhouse/breezequantityswitch

Language:HTML

Type:magento2-module

pkg:composer/ecomhouse/breezequantityswitch

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.6 2026-08-19 16:36 UTC

This package is auto-updated.

Last update: 2026-08-19 16:38:23 UTC


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-specific product/view/addtocart.phtml (same markup as the parent module's template, minus its inline <script> block) and adds an init block that boots the EcomHouse_QuantitySwitch/js/product/qtyswitch widget against .box-tocart. Both the template swap and the init block carry ifconfig.
  • Cart — no template override; js/cart/qtychange.js is 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 attach ifconfig to, a dedicated breeze_checkout_cart_index.xml handle adds an ifconfig-guarded block (cart/enabled.phtml) that sets window.ecomhouseBreezeQuantitySwitchEnabled; the widget's auto-init checks that flag before touching the DOM.
  • Minicart (breeze_default.xml) — overrides Breeze's own breeze.Magento_Checkout_minicart_item_default Knockout template with minicart/item/default.html, which renders the +/− buttons inline with onclick="qtyChange(event)". js/minicart/qtychange.js exposes that handler on window. The template override carries ifconfig.
  • All three JS files are registered into Breeze's own breeze.js bundle (breeze_default.xml) unconditionally — Magento's bundle-registration layout element has no ifconfig support — 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