-
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
Order is not complete when mixing virtual, refunded and shipped items #38547
Comments
Hi @digitalpianism. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
@magento give me 2.4-develop instance |
Hi @digitalpianism. Thank you for your request. I'm working on Magento instance for you. |
Hi @digitalpianism, here is your Magento Instance: https://6fc1486a44c08bdcd128df01c88544ca.instances-prod.magento-community.engineering |
Hi @engcom-Bravo. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://6fc1486a44c08bdcd128df01c88544ca.instances-prod.magento-community.engineering |
Hi @digitalpianism, Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots. Steps to reproduce
The order is still in Processing because we have one more quantity for the physical product to ship. Could you please let us know if we are missing anything. Thanks. |
@engcom-Bravo it's not consistent with the rest of Magento behavior then. Let's take the case below:
In that case, the order becomes Complete: On top of that if you create another order like this:
The order is complete as well. Knowing that, combination of both should be complete too. |
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://6fc1486a44c08bdcd128df01c88544ca.instances-prod.magento-community.engineering |
Hi @digitalpianism, Thanks for your update. Verified the issue on Magento 2.4-develop instance and the issue is reproducible. The Order is still in Processing state when we have combination of both physical products and virtual products. Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11691 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-11691 |
@magento I am working on this |
@magento run all tests |
I have started to have some feedbacks for this issue and I will put a report on where we are at this point.
As a consequence, when a product has been refunded, it can overlap with the shipment data (in which case, using the tests to reproduce the issue, the order is expected to remain to processing) --> the conclusion of this finding is that unless we can flag is a refund is for a shipped item or not, then we can't change the order status to complete. |
Preconditions and environment
Steps to reproduce
Expected result
Order state should be complete.
Actual result
Order state is still processing.
Additional information
Problem comes from
magento/module-sales/Model/ResourceModel/Order/Handler/State.php
In the
isPartiallyRefundedOrderShipped
, the code compares the total qty ordered with the sum of total qty shipped and total qty refunded.However, virtual items are not considered when retrieving the total qty shipped, preventing the method from returning true.
Here's the fix that I have used to resolve the issue:
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: