[仅限PaaS]{class="badge informative" title="仅适用于云项目(Adobe管理的PaaS基础架构)和内部部署项目上的Adobe Commerce 。"}

ACSD-61195:购物车GraphQL请求无法返回最终页面上的项目

ACSD-61195修补程序修复了在购物车GraphQL请求的最后一页未返回购物车项目的问题。 安装Quality Patches Tool (QPT) 1.1.51时,此修补程序可用。 修补程序ID为ACSD-61195。 请注意,该问题计划在Adobe Commerce 2.4.8中修复。

受影响的产品和版本

为Adobe Commerce版本创建了修补程序:

  • Adobe Commerce(所有部署方法) 2.4.7-p1

与Adobe Commerce版本兼容:

  • Adobe Commerce(所有部署方法) 2.4.7-p1 - 2.4.7-p2
NOTE
该修补程序可能适用于具有新Quality Patches Tool发行版本的其他版本。 要检查修补程序是否与您的Adobe Commerce版本兼容,请将magento/quality-patches包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。

问题

购物车GraphQL请求无法在最终页面上返回项目。

重现步骤

  1. 创建新购物车:

    code language-none
    mutation createEmptyCart($input: createEmptyCartInput) {
        createEmptyCart(input: $input)
    }
    
  2. 将五个以上的产品添加到购物车:

    code language-none
    addProductsToCart(
        cartId: "{{cartId}}"
        cartItems: [
          {
            quantity: 1
            sku: "test"
          }
        ]
      ) {
        cart {
           itemsV2 {
           items {
            product {
             name
             sku
            }
            quantity
        }
        total_count
        page_info {
          page_size
          current_page
          total_pages
        }
      }
    }
    user_errors {
      code
      message
    }
    }
    }
    
  3. 运行以下查询:

    code language-none
    cart(cart_id: $cartId) {
    email
    itemsV2(pageSize: 2, currentPage: 3) {
        total_count
        page_info {
           page_size
           current_page
           total_pages
        }
      items {
        id
        product {
          name
          sku
        }
        quantity
        }
    }
    }
    

预期的结果

查询返回最后一页上的项目。

实际结果

  {
    "data": {
        "cart": {
            "email": "roni_cost@example.com",
            "itemsV2": {
                "total_count": 5,
                "page_info": {
                    "page_size": 2,
                    "current_page": 3,
                    "total_pages": 3
                },
                "items": []
            }
        }
    }
    }

应用修补程序

要应用单独的修补程序,请根据您的部署方法使用以下链接:

相关阅读

要了解有关Quality Patches Tool的更多信息,请参阅:

有关QPT中其他可用修补程序的信息,请参阅Quality Patches Tool指南中的:搜索修补程序Quality Patches Tool。

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3