-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Grouped product] Can´t add simple products to cart if one other is out of stock #22304
Comments
Hi @hamplr. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @hamplr do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @larsroettig. Thank you for working on this issue.
|
@magento-engcom-team give me 2.2-develop instance |
@magento-engcom-team give me 2.3-develop instance |
Hi @hamplr. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @larsroettig. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @larsroettig. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @hamplr, here is your Magento instance. |
Having the same issue in 2.2.8 |
Hi @nickpiro, Index: project/src/vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php
+++ vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php
@@ -338,9 +338,6 @@
}
foreach ($associatedProducts as $subProduct) {
if (!isset($productsInfo[$subProduct->getId()])) {
- if ($isStrictProcessMode && !$subProduct->getQty()) {
- return __('Please specify the quantity of product(s).')->render();
- }
$productsInfo[$subProduct->getId()] = $subProduct->isSalable() ? (float)$subProduct->getQty() : 0;
}
} |
I have the same problem here in 2.2.8 @larsroettig there is a commit for this patch? |
No, there´s currently no commit for this patch, but we have the patch in use in our project to solve the problem. |
Hi @mallikaverma. Thank you for working on this issue.
|
@magento-engcom-team give me 2.3-develop instance |
I am working on it |
#imagine2019 |
The fix from @larsroettig works for me, i created a preference for that class and then overrode the getProductInfo method: In your module di.xml:
New class Vendor\Module\Model\Grouped:
` |
@joekersh preference is not the best way to solve this issue patching is a better way yesterday @mallikaverma creating a pr this look backwards compatible. |
Hi @dmytro-ch. Thank you for working on this issue.
|
✅ Confirmed by @dmytro-ch Issue Available: @dmytro-ch, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
I can confirm that @larsroettig 's solution is working. Thanks ! |
Hi @hamplr. Thank you for your report.
The fix will be available with the upcoming 2.4.0 release. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: