The ACSD-48627 patch fixes the issue where the out-of-stock configurable product causes an error when sending a GraphQL request to get cart details. This patch is available when the Quality Patches Tool (QPT) 1.1.25 is installed. The patch ID is ACSD-48627. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.6.
The patch is created for Adobe Commerce version:
Compatible with Adobe Commerce versions:
The patch might become applicable to other versions with new 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 Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.
Out-of-stock configurable product causes an error when sending a GraphQL request to get cart details.
Steps to reproduce:
Create a customer account.
Add some products to the cart, including a configurable product.
Go to the admin backend, and edit the configurable product by setting all child products qty to 0.
The configurable product will become out of stock as all the child products are out of stock.
Check the catalog_product_index_price
table. The record with this product is empty.
Make a GraphQL request to get the customer token.
mutation {
generateCustomerToken(
email: "test@example.com"
password: "xxxx"
) {
token
}
}
Make a GraphQL request to get cartId.
Headers: Authentication => Bearer [customer token in step 6]
{
customerCart {
id
items {
id
product {
name
sku
}
quantity
}
}
}
Make a GraphQL request to get the cart details.
Headers: Authentication => Bearer [customer token in step 6]
query GetCartDetails($cartId: String!) {
cart(cart_id: $cartId) {
id
...CartPageFragment
__typename
}
}
fragment CartPageFragment on Cart {
id
total_quantity
...AppliedCouponsFragment
...ProductListingFragment
...PriceSummaryFragment
__typename
}
fragment AppliedCouponsFragment on Cart {
id
applied_coupons {
code
__typename
}
__typename
}
fragment ProductListingFragment on Cart {
id
items {
uid
product {
uid
name
sku
url_key
url_suffix
thumbnail {
url
__typename
}
small_image {
url
__typename
}
stock_status
price_range {
minimum_price {
final_price {
currency
value
__typename
}
regular_price {
currency
value
__typename
}
__typename
}
__typename
}
stock_status
... on ConfigurableProduct {
variants {
attributes {
uid
__typename
}
product {
uid
small_image {
url
__typename
}
stock_status
__typename
}
__typename
}
__typename
}
__typename
}
prices {
price {
currency
value
__typename
}
__typename
}
quantity
... on
ConfigurableCartItem {
configurable_options {
id
configurable_product_option_uid
option_label
configurable_product_option_value_uid
value_label
__typename
}
__typename
}
__typename
}
__typename
}
fragment PriceSummaryFragment on Cart {
id
items {
uid
quantity
__typename
}
...ShippingSummaryFragment
prices {
...TaxSummaryFragment
...DiscountSummaryFragment
...GrandTotalFragment
subtotal_excluding_tax {
currency
value
__typename
}
subtotal_including_tax {
currency
value
__typename
}
__typename
}
__typename
}
fragment DiscountSummaryFragment on
CartPrices {
discounts {
amount {
currency
value
__typename
}
label
__typename
}
__typename
}
fragment GrandTotalFragment on CartPrices {
grand_total {
currency
value
__typename
}
__typename
}
fragment ShippingSummaryFragment on Cart {
id
shipping_addresses {
selected_shipping_method {
amount {
currency
value
__typename
}
__typename
}
street
__typename
}
__typename
}
fragment TaxSummaryFragment on CartPrices {
applied_taxes {
amount {
currency
value
__typename
}
__typename
}
__typename
}
Expected results:
No Internal server error in the response.
Actual results:
There is an Internal server error in the response.
To apply individual patches, use the following links depending on your deployment method:
To learn more about Quality Patches Tool, refer to:
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.