MDVA-40961: An additional item can't be added to the cart when the minimum quantity of the item…
An additional item can't be added to the cart when the minimum quantity of the item is already in the cart. Quality patch MDVA-40961 for magento/module-bundle applies to Magento Open Source and Adobe Commerce 2.4.3 to 2.4.3-p3.
- Categories
- Inventory, Shopping Cart
- Components
- magento/module-bundle, magento/module-catalog-inventory, magento/module-wishlist, magento/module-bundle-requisition-list
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.15
Issue
An additional item can't be added to the cart when the minimum quantity of the item is already in the cart.
Steps to reproduce
1. Set a simple product to have more than one Minimum Qty Allowed in Shopping Cart (for example, two). 1. Open the product on the Storefront and add two of them to the cart. 1. Stay on the product page and add one more of this product to the cart.
Adobe's page lists 2.4.3 - 2.4.3-p2 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.5.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply MDVA-40961. On Cloud, add MDVA-40961 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-40961/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.3 <2.4.4
- Patch file
- patches/os/MDVA-40961_2.4.3.patch
- vendor/magento/module-bundle/ViewModel/ValidateQuantity.php (added)
- vendor/magento/module-bundle/view/base/web/js/price-bundle.js
- vendor/magento/module-bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
- vendor/magento/module-bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml
- vendor/magento/module-bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml
- vendor/magento/module-catalog-inventory/Block/Plugin/ProductView.php
- vendor/magento/module-wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml
magento/magento2-b2b-base >=1.3.2 <1.3.3
- Magento Open Source
- —
- Patch file
- patches/commerce/MDVA-40961_1.3.2.patch
- vendor/magento/module-bundle-requisition-list/view/frontend/layout/requisition_list_item_configure_type_bundle.xml
