MDVA-37288: Wrong tier prices returned after GraphQL request
The MDVA-37288 quality patch for Adobe Commerce solves the issue where the wrong tier prices are returned after GraphQL request. This patch is available when the Quality Patches Tool (QPT) v.1.0.23 is installed. Please note that the issue is scheduled to be fixed in Adobe Commerce version 2.4.3.
Affected products and versions
- The patch was designed for Adobe Commerce on cloud infrastructure 2.4.2
- The patch is also compatible with Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.4.2
NOTE
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 [!DNL Quality Patches Tool]: Search for patches page. Use the patch ID as a search keyword to locate the patch.
Issue
Steps to reproduce:
- Add tier pricing to any item (for this example tier prices were added to items with id=1 and id=2).
- Run GraphQL query with search that will include the items with tier prices and items without tier prices.
{
products(pageSize: 20, currentPage: 1, search: "24-MB0") {
items {
id
price_tiers {
quantity
final_price {
value
}
}
}
}
}
Expected results:
Only items with tier prices should return proper tier prices:
{
"data": {
"products": {
"items": [
{
"id": 17,
"price_tiers": []
},
{
"id": 1,
"price_tiers": [
{
"quantity": 1,
"final_price": {
"value": 34
}
},
{
"quantity": 5,
"final_price": {
"value": 32
}
}
]
},
{
"id": 23,
"price_tiers": []
},
{
"id": 19,
"price_tiers": []
}
]
}
}
}
Actual results:
- All items coming after an item with tier pricing have tier pricing in the response.
- The tier pricing data that it's returning is from the last item in the loop that had tier pricing.
response example:
{
"data": {
"products": {
"items": [
{
"id": 17,
"price_tiers": []
},
{
"id": 1,
"price_tiers": [
{
"quantity": 1,
"final_price": {
"value": 34
}
},
{
"quantity": 5,
"final_price": {
"value": 32
}
}
]
},
{
"id": 23,
"price_tiers": [
{
"quantity": 1,
"final_price": {
"value": 34
}
},
{
"quantity": 5,
"final_price": {
"value": 32
}
}
]
},
{
"id": 19,
"price_tiers": [
{
"quantity": 1,
"final_price": {
"value": 34
}
},
{
"quantity": 5,
"final_price": {
"value": 32
}
}
]
}
]
}
}
}
Apply the patch
To apply individual patches, use the following links in our developer documentation, depending on your Adobe Commerce product:
To learn more about Quality Patches Tool in our support knowledge base, refer to:
For info about other patches available in QPT tool, refer to the Patches available in QPT tool section in our support knowledge base.