Description
Preconditions and environment
- Magento 2.4.7-p2
- Multistore (multiple websites with different currencies)
- Price attribute set to 'website' scope
Steps to reproduce
Steps with example screenshots:
- Switch to ALL STORE VIEWS
- Create new bundle product. Set 'dynamic price' to OFF (set price to fixed). Proceed with normal product creation (fill prices etc):
- Add new bundle option. Fill required fields and set fixed price:
- Switch scope to different website, edit product option and set different fixed price:
- Check product data via GraphQl
Summary of my example:
ALL STORE VIEWS:
Product price: 1000
Product option price: 111
XXX STORE VIEW:
Product price: Inherit from ALL STORE VIEWS - 1000
Product option price: 333
GraphQL query used to test:
products(filter: { sku: { eq: "test_bundle_product_sku" } }) {
items {
... on BundleProduct{
dynamic_price
price_range {
minimum_price {
final_price {
value
}
}
maximum_price {
final_price {
value
}
}
}
price_details {
discount_percentage
main_final_price
main_price
__typename
}
items {
uid
required
title
options {
uid
is_default
price
price_type
quantity
__typename
}
__typename
}
}
__typename
}
__typename
}
}
Expected result
GraphQl query should provide correct prices for both product and its item options.
{
"data": {
"products": {
"items": [
{
"dynamic_price": false,
"price_range": {
"minimum_price": {
"final_price": {
"value": 1333
}
},
"maximum_price": {
"final_price": {
"value": 1333
}
}
},
"price_details": {
"discount_percentage": 0,
"main_final_price": 1000,
"main_price": 1000,
"__typename": "PriceDetails"
},
"items": [
{
"uid": "YnVuZGxlLzQ=",
"required": true,
"title": "bbb",
"options": [
{
"uid": "YnVuZGxlLzQvNC8x",
"is_default": false,
"price": 333,
"price_type": "FIXED",
"quantity": 1,
"__typename": "BundleItemOption"
}
],
"__typename": "BundleItem"
}
],
"__typename": "BundleProduct"
}
],
"__typename": "Products"
}
}
}
Actual result
Product price is calculated correctly (BASE 1000 + OPTION 333 = minimum and maximum final price is 1333)
Product item option price is incorrectly returned 111 instead of 333. This breaks all frontend calculations for this configuration
{
"data": {
"products": {
"items": [
{
"dynamic_price": false,
"price_range": {
"minimum_price": {
"final_price": {
"value": 1333
}
},
"maximum_price": {
"final_price": {
"value": 1333
}
}
},
"price_details": {
"discount_percentage": 0,
"main_final_price": 1000,
"main_price": 1000,
"__typename": "PriceDetails"
},
"items": [
{
"uid": "YnVuZGxlLzQ=",
"required": true,
"title": "bbb",
"options": [
{
"uid": "YnVuZGxlLzQvNC8x",
"is_default": false,
"price": 111,
"price_type": "FIXED",
"quantity": 1,
"__typename": "BundleItemOption"
}
],
"__typename": "BundleItem"
}
],
"__typename": "BundleProduct"
}
],
"__typename": "Products"
}
}
}
Additional information
This happens because implementation in \Magento\BundleGraphQl\Model\Resolver\Links\Collection::fetch. Link collection does not join "catalog_product_bundle_selection_price" table in any way, only providing base (all store views) data from "catalog_product_bundle_selection" table.
Release note
No response
Triage and priority
- 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”.