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
M2.3.1: Unable to place order for bundle when child quantity > 1 #22743
Comments
Hi @mystix. 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. @mystix do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento-engcom-team give me 2.3-develop instance |
Hi @mystix. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @mystix, here is your Magento instance. |
|
This bug was introduced in commit 2fb6b3b in the following 2 private methods from app/code/Magento/Sales/Model/Service/InvoiceService.php:
The bug is triggered when the private method ALL existing test cases which call the
To resolve this, the 2 private methods above should also check for a non-zero bundle item id:
|
Hi @AlexWorking. Thank you for working on this issue.
|
✅ Confirmed by @AlexWorking Issue Available: @AlexWorking, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@mystix just wanted to say thank you for the detailed report and suggested fix - we've hit this exact issue on a live site (recently upgraded to 2.3.1) with Stripe also. |
Hi @GovindaSharma. Thank you for working on this issue.
|
I encountered this same issue using Braintree gateway with "Enable PayPal through Braintree" which I believe is a PayPal Flow transaction, slightly different than Express Checkout but still broken without @mystix fix. @mystix thank you for posting the fix. I implemented on and M2.3.1 instance this morning. The InvoiceService.php source code was a bit different than what you posted, however, adding I encountered this same issue with "Enable PayPal through Braintree" which I believe is a PayPal Flow transaction, slightly different that Express Checkout but still broken without @mystix fix.
|
I would like to thank @mystix for providing the fix I needed to solve this issue! Hopefully Magento can come out with a patch or update soon to properly resolve this problem. |
Hi @mystix, @GovindaSharma. Thank you for your report and collaboration! The related internal Jira ticket But if you still run into this problem please update or provide additional information/steps/preconditions in the Description section and reopen this issue. |
I am getting this issue in magento 2.3.2. I assume magento still didn't fix this |
I ran both my test cases, and double-checked my existing codebase just to make sure I'm running the code from M2.3.2 -- I can confirm I no longer see this problem in M2.3.2. Try monkey-patching your codebase with the fix I suggested to see if it helps resolve your issue? |
@mystix Thanks for the reply mate. I am getting a lot of complaints from customers so, definitely, I am getting the error :( |
We are also having this problem on a live site, when will it be fixed? Magento 2.3.2 |
Fixed it for me, too & does not seems to be fixed in 2.3.3 |
same issue here, magento 2.3.2 (cannot upgrade right now because it is production env). patched as @mystix suggested, now works. I hope it will be fixed in future versions, I don't want to keep custom patches in the code. |
When placing an order for a bundle product with child product quantity set to a value greater than 1, the following error message is thrown:
We found an invalid quantity to invoice item "%1".
This happens for any payment method where invoices are automatically created during order creation e.g.
Preconditions (*)
Magento 2.3.1
Test bundle product:
-- General configuration
-- Child product (ensure Ship Bundle Items is set to "Together")
Admin > Stores > Configuration > Sales > Payment Methods configuration:
-- PayPal Express Checkout (note: a sandbox account will work as well)
Enable this solution: Yes
Payment Action: Sale
-- Zero Subtotal Checkout
Enabled: Yes
New Order Status: Processing
Automatically Invoice All Items: Yes
Admin > Stores > Configuration > Sales > Shipping Methods configuration:
-- Free Shipping
Enabled: Yes
Steps to reproduce (as customer) (*)
Expected result (*)
Actual result (*)
We found an invalid quantity to invoice item "%1".
is displayed:Steps to reproduce (as admin) (*)
Expected result (*)
Actual result (*)
We found an invalid quantity to invoice item "Test".
is displayed:The text was updated successfully, but these errors were encountered: