Closed
Description
Preconditions (*)
- Magento 2.4.x (reproduced on latest dev at time of writing)
Steps to reproduce (*)
- Create a configurable product with a sku "test-config-1" with a single configurable attribute (e.g. size) and at least 2 options (e.g. S, M, L)
- Set the price of one variant to be $40, and the others to be $50
- Disable the variant with the lower price
- Execute the following query:
query {
products(
filter: {
sku: {
eq: "test-config-1"
}
}
) {
items {
sku
price_range {
minimum_price {
discount {
amount_off
percent_off
}
final_price {
value
currency
}
regular_price {
value
currency
}
}
}
...on ConfigurableProduct {
configurable_options {
values {
label
}
}
variants {
attributes {
label
}
product {
sku
}
}
}
}
}
}
Expected result (*)
price_range
values are unaffected by disabled variants:
{
"data": {
"products": {
"items": [
{
"sku": "test-config-1",
"price_range": {
"minimum_price": {
"discount": {
"amount_off": 0,
"percent_off": 0
},
"final_price": {
"value": 50,
"currency": "USD"
},
"regular_price": {
"value": 50,
"currency": "USD"
}
}
},
"configurable_options": [
{
"values": [
{
"label": "S"
},
{
"label": "M"
},
{
"label": "L"
}
]
}
],
"variants": [
{
"attributes": [
{
"label": "L"
}
],
"product": {
"sku": "test-config-1-L"
}
},
{
"attributes": [
{
"label": "M"
}
],
"product": {
"sku": "test-config-1-M"
}
}
]
}
]
}
}
}
Actual result (*)
- Price of disabled sku affects
price_range
values of configurable:
{
"data": {
"products": {
"items": [
{
"sku": "test-config-1",
"price_range": {
"minimum_price": {
"discount": {
"amount_off": 10,
"percent_off": 20
},
"final_price": {
"value": 40,
"currency": "USD"
},
"regular_price": {
"value": 50,
"currency": "USD"
}
}
},
"configurable_options": [
{
"values": [
{
"label": "S"
},
{
"label": "M"
},
{
"label": "L"
}
]
}
],
"variants": [
{
"attributes": [
{
"label": "L"
}
],
"product": {
"sku": "test-config-1-L"
}
},
{
"attributes": [
{
"label": "M"
}
],
"product": {
"sku": "test-config-1-M"
}
}
]
}
]
}
}
}
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
I consider this to be critical data, as incorrect pricing is provided to the customer. A work-around would be to change the price of the disabled product, but this is not a good solution.
Note - the variants
field being returned does not show the disabled product, so I believe the solution would involve applying the same logic used by its collection to the collection used for calculating pricing.
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedOnce P0 defects have been fixed, a defect having this priority is the next candidate for fixing.The issue has been reproduced on latest 2.4-develop branchAffects critical data or functionality and forces users to employ a workaround.
Type
Projects
Status
Done