Skip to content

Catalog price rules are not included in CartItemPrices #26738

Closed
@ghost

Description

Preconditions (*)

  1. v2.3.4

Steps to reproduce (*)

  1. Create a catalog price rule (e.g. 20% off of gear)
  2. Add an applicable item to cart
  3. Do a graphql query
query {
  cart(cart_id: "...") {
    items {
        prices {
          discounts {
            amount {
              value
            }
            label
          }
          price {
            value
          }
          row_total {
            value
          }
          row_total_including_tax {
            value
          }
          total_item_discount {
            value
          }
        }
    }
  }
}

Expected result (*)

  1. Receive price values that include catalog price discount

Actual result (*)

  1. Receive price values that don't include discount

Additional info from engcom

We have created a product with a price of 100 and applied a discount of 20%
From the Storefront, the added products price is 80 + 5 shipping, correct 👍

The cart query displays the wrong ❌ price: 100 discount: null

{
  "data": {
    "cart": {
      "items": [
        {
          "prices": {
            "discounts": null,   #<-----
            "price": {
              "value": 100   #<-----
            },
            "row_total": {
              "value": 100
            },
            "row_total_including_tax": {
              "value": 100
            },
            "total_item_discount": {
              "value": 0
            }
          }
        }
      ]
    }
  }
}

Metadata

Metadata

Labels

Component: GraphQLGraphQLFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions