-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
\Magento\Quote\Model\QuoteManagement::createEmptyCartForCustomer return not Empty Cart #5913
Comments
Sorry Yuriy, that expected result is wrong in case of Magento. Our user has only one active cart, if admin resets that cart from API, user will see empty cart on frontend. |
To create order not impacting current user's cart you may utilize Sales module service: |
Created internal issue MAGETWO-58190 for updating annotation for createEmptyCartForCustomer() and creating new service supporting old behavior: create new cart for customer and leave it inactive. |
@SerhiyShkolyarenko , I believe Yurii to be correct. The intent of this method is to return a quote from the "quote" table with the column "is_active" boolean set to "0". Preparing a quote object for conversion to a transaction via API or other external methods should be able to bypass the current active session. This is a feature of Magento 1, and all Magento 1 features were to be included with Magento 2 this is not an annotation issue, this is missing / not completed functionality. @benmarks, I'd like to involve you in this issue / broken / missing feature. This is a major issue for any customers who want to be able to create an order for a customer, without deleting their existing cart, I'm hoping you can see that this major Enterprise feature is not lost in Magento 2. |
@SerhiyShkolyarenko, I am aware of the |
@duffner thank you for explanation. In Magento 1 that was undocumented feature and in services we lost it. Now we promoted priority of MAGETWO-58190 in order to restore that lost feature and fix our docs. |
@SerhiyShkolyarenko thank you!! |
@ytorbyk, thank you for your report. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions. |
Team, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
What activity is required here? Please, work on it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
Just because I'm thinking about a 7-year-old issue, maybe I should see if it can get some love :). This is still a valid issue "createEmptyCartForCustomer" does not return an empty cart, nor does it always create. |
There is expected to receive an empty Cart (or Quote) due calling "createEmptyCartForCustomer" method. It says the method name. But it's not always true.
Preconditions (*)
Magento 2.4-develop
Steps to reproduce (*)
<route url="/V1/customers/:customerId/carts" method="POST"> <service class="Magento\Quote\Api\CartManagementInterface" method="createEmptyCartForCustomer"/> <resources> <resource ref="Magento_Cart::manage" /> </resources> </route>
Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: