Open ioweb-gr opened 1 year ago
Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. @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://0f66e63d1b4388498e63ec7f917d5fa9.instances-prod.magento-community.engineering Admin access: https://0f66e63d1b4388498e63ec7f917d5fa9.instances-prod.magento-community.engineering/admin_09da Login: 129d5179 Password: f64f8a4e43d7
Hi @ioweb-gr,
Thank you for reporting and collaboration.
Verified the Scenario on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
We have created Prod1,Prod2,Prod3,Prod4,Prod5 and Prod2,Prod3 we have make it as Out Of Stock.
First Request: Attempt to add 5 products
Second Request: Remove prod2, and retry with 4 products.
Third Request: Remove prod4, and retry with 3 products.
We are agree with your proposed solutions In the first request itself we can skip the out of stock products and it can add other products to the cart User didn't go for additional requests.
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9459 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
The tricky part with that is how to post back the skus that weren't added with the errors encountered. In other systems the response would include some message array listing those
@magento I am working on this
Summary
Currently it seems that when using the addProductsToCart mutations in GraphQL if one product is out of stock, it will reject the whole request. Based on our developers' feedback this makes them resort to adding items to the cart one by one instead of using the mass endpoint because:
Examples
Think of the reorder case. I would like to reorder my previously purchased items. What's expected is that we can add them all in one sweep if possible for every single product type.
For example
Problem Statement
When attempting to add multiple products to the shopping cart in a single request, there's a chance that some products may not be available (out-of-stock, for instance). For every failed product, the entire request needs to be retried with one fewer product. This leads to extra requests, increasing server load and reducing performance.
Example Scenario
Let's consider you want to add 5 products: [prod1, prod2, prod3, prod4, prod5]. Two of them, prod2 and prod4, are not in stock.
First Request: Attempt to add 5 products.
Second Request: Remove prod2, and retry with 4 products.
Third Request: Remove prod4, and retry with 3 products.
Proposed solution
Solution 1
List all problematic products in one response. Then the user only needs one additional request to add the products to cart
Solution 2
Add the correct products, notify about the failed ones. The user doesn't need additional requests.
Release note
No response
Triage and priority