This page has moved to Adobe Experience League and will be redirected soon.
ACSD-49574: Can't update gift card product in shopping cart via GraphQL
The ACSD-49574 patch fixes the issue where a gift card product cannot be updated in the shopping cart via GraphQL. This patch is available when the [!DNL Quality Patches Tool (QPT)] 1.1.28 is installed. The patch ID is ACSD-49574. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
Adobe Commerce (all deployment methods) 2.4.5-p1
Compatible with Adobe Commerce versions:
Adobe Commerce (all deployment methods) 2.4.4 - 2.4.6
NOTE
The patch might become applicable to other versions with new [!DNL Quality Patches Tool] releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches
package to the latest version and check the compatibility on the QPT landing page . Use the patch ID as a search keyword to locate the patch.
Issue
A gift card product cannot be updated in the shopping cart via GraphQL.
Steps to reproduce :
Create a gift card product.
Add the gift card product to the cart via GraphQL.
Try to update gift card product fields in the cart via GraphQL using updateCartItems
mutation.
Example of GraphQL usage:
mutation ($cartId: String!, $cartItems: [CartItemUpdateInput!]!){
updateCartItems(
input: {
cart_id: $cartId,
cart_items: $cartItems
}
) {
cart {
id
items {
uid
quantity
product {
sku
}
... on GiftCardCartItem {
sender_name
sender_email
recipient_name
recipient_email
message
amount {
value
currency
}
}
}
}
}
}
variables
{
"cartId": "sDrOu06VYlGejhDivQMcnmcNPSxTMUDd",
"cartItems": [
{
"cart_item_id": 113,
"quantity": 1,
"customizable_options": [{
"uid": "Z2lmdGNhcmQvZ2lmdGNhcmRfc2VuZGVyX25hbWU=",
"value_string": "sender_name"
},
{
"uid": "Z2lmdGNhcmQvZ2lmdGNhcmRfc2VuZGVyX2VtYWls",
"value_string": "sender_email"
},
{
"uid": "Z2lmdGNhcmQvZ2lmdGNhcmRfcmVjaXBpZW50X25hbWU=",
"value_string": "recipient name"
},
{
"uid": "Z2lmdGNhcmQvZ2lmdGNhcmRfcmVjaXBpZW50X2VtYWls",
"value_string": "recipient_email"
},
{
"uid": "Z2lmdGNhcmQvZ2lmdGNhcmRfbWVzc2FnZQ==",
"value_string": "message"
},
{
"uid": "Z2lmdGNhcmQvY3VzdG9tX2dpZnRjYXJkX2Ftb3VudA==",
"value_string": "10"
}
]
}]
}
Expected results :
All the gift card product fields (sender_name, sender_email, recipient_name, recipient_email, message, amount) are updated using updateCartItems
mutation.
Actual results :
Only the amount is updated.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
To learn more about [!DNL Quality Patches Tool], refer to:
For info about other patches available in QPT, refer to [!DNL Quality Patches Tool]: Search for patches in the [!DNL Quality Patches Tool] guide.
Was this article helpful?
Yes
No
0 out of 0 found this helpful