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
Graphql - issue adding multiple configurable products to cart #30948
Graphql - issue adding multiple configurable products to cart #30948
Comments
Hi @cdiacon-img. 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. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
I have the same issue. The problem is that in magento2/app/code/Magento/ConfigurableProductGraphQl/Model/Options/Collection.php Line 100 in 445b0f1
the !empty($this->attributeMap) does not take into account the case of more then one Configurable Product's super attribute needs to be resolved.
|
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hello @cdiacon-img Thank you for your report. Can you please clarify, are you trying to add multiple Products with options using one mutation, or you are trying to add one single configurable product with multiple options? Thank you in advance |
As I remember it was adding multiple products(cart items) with this mutation
|
@cdiacon-img Thank you for the quick response. This actually was the mutation we have tried to reproduce with. {
"errors": [
{
"message": "Could not add the product with SKU Configurable2 to the shopping cart: Could not find specified product.",
"extensions": {
"category": "graphql-input" This happens when we try to add two products. The Configurable2 itself is added to the Cart successfully. |
I am not sure why you are getting product not found but I guess you are hitting the condition of this test
But in my case it was getting attribute data from wrong product This is how we patched at the moment, I hope this helps :
|
This is the same thing that @nige-one pointed out above. |
Hello @cdiacon-img I'm still getting a different error than the reported. mutation {
addConfigurableProductsToCart(
input: {
cart_id: "nUdFfPMkIyC3vJS8I6K56Tk0zdPDUpco"
cart_items: [
{ parent_sku: "Conf1", data: { quantity: 1, sku: "Conf1-white" } }
{ parent_sku: "Conf2", data: { quantity: 1, sku: "Conf2-s" } }
]
}
) {
cart {
items {
uid
quantity
product {
name
sku
}
... on ConfigurableCartItem {
configurable_options {
option_label
}
}
}
}
}
} returns {
"errors": [
{
"message": "Could not add the product with SKU Conf2 to the shopping cart: The product with SKU Conf2 is out of stock.",
"extensions": {
"category": "graphql-input"
},
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"addConfigurableProductsToCart"
]
}
],
"data": {
"addConfigurableProductsToCart": null
}
} It might be that on 2.4-develop the behavior is different. I noticed that you are reporting the issue on 2.3.4. Can you please verify if the issue is reproducible on 2.4-develop for you? Thank you |
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Once all required labels are present, please add |
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Once all required labels are present, please add |
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Once all required labels are present, please add |
✅ Jira issue https://jira.corp.magento.com/browse/AC-959 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Alfa. Thank you for verifying the issue. |
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-959 |
1 similar comment
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-959 |
Hi @cdiacon-img. Thank you for your report.
The fix will be available with the upcoming 2.4.3 release. |
Thanks everyone for a quick fix. Also, 2.4.3 was released and I can't find the fix?! |
Preconditions (*)
Steps to reproduce (*)
create a mutation for addConfigurableProductsToCart with multiple configurable products
Expected result (*)
Actual result (*)
{
"errors": [
{
"message": "You need to choose options for your item.",
"extensions": {
"category": "graphql-input"
},
"locations": [
{
"line": 25,
"column": 3
}
],
"path": [
"addConfigurableProductsToCart"
]
}
],
"data": {
"addConfigurableProductsToCart": null
}
}
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: