- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[Grouped product] Can´t add simple products to cart if one other is out of stock
I have turned my theme and all extensions off and it seems to be a magento fault.
I only notice this happening when one or more of my simple product qty is 0 and other simple products under the group product are in stock.
I cannot add an in-stock simple product to cart if any of the simples in the group are out of stock. It keeps repeating the message: Please specify the quantity of product(s).
I believe this is a known issue reported in January 2019 here: https://github.com/magento/magento2/issues/22304
It has been fixed for Magento 2.4 release but how can I get the fix now for my Magento 2.3.4 instance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
Please check the code and update file code same as given MR file changes:
https://github.com/magento/magento2/pull/24955/files
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
Thankyou.
Since it has been developed for magento 2.4 are these fixes backwards compatible with magento 2.3.4 do you know? If they are I'll grab the 2 files under the Files Changed tab.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
@JadeArtistry Yes, It will be compatible for sure.
Try with updating the code file changes the same as MR changes.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
@JadeArtistry You can try with first one file changes then cover unit test changes
https://github.com/magento/magento2/commit/f27f74950a0fb961834bd4909015718e228a8ddf
First file changes:
app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
Second file Cover unit test changes:
app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Type/GroupedTest.php
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
@JadeArtistry Hope this solution helps you!
If Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
So I can get this absolutely right. You've been very patient with me so far.
Do I need to create the Magento folder under app/code? I do not currently have one there.
And what is the second file used for? Is it required?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
@JadeArtistry you can find this on
Vendor/magento/ directory.
vendor/magento/module_groupedproduct/Model/Product/Type/Grouped.php directory.
you can override the model GroupedProduct/Model/Product/Type/Grouped.php with creating a custom module.
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
Hope this solution helps you!
If Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: [Grouped product] Can´t add simple products to cart if one other is out of stock
I have created this path:
http/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
and updated the Grouped.php file same as https://github.com/magento/magento2/pull/24955/files only 1 line change at 347 it seems.
My file can be seen here: https://drive.google.com/file/d/1ivXAK6nwX5Ss7iugvwK9LF-3RJH0hqfD/view?usp=sharing
Its not working on my version magento 2.3.4, likely I've missed something.