Skip to content

[Confirmed] REST API - Bundle products have empty prices when updating in multiple storeviews #35595

Open
@NickvdMeij

Description

@NickvdMeij

Preconditions and environment

  • Magento version 2.4.3-p1, 2.4.4, 2.4-develop
  • Multistore Setup (3 different Websites assigned to 3 stores up and running)
  • REST API access

Steps to reproduce

  1. Create 2 or 3 Virtual products - assign to all websites and save.
  2. Stores - Settings - Configuration - Catalog - Catalog - Price scope - set to website and save
  3. Reindex and clear cache
  4. Create Bundle Product using POST Rest API request: /rest/all/V1/products with virtual products assigned to bundle options using below sample payload:
    {
    "product": {
    "sku": "bunelee",
    "name": "bundlee",
    "attribute_set_id": 4,
    "price": 0,
    "status": 1,
    "visibility": 4,
    "type_id": "bundle",
    "extension_attributes": {
    "stock_item": {
    "qty": 100,
    "is_in_stock":true
    },
    "website_ids": [
    1,2,3
    ],
    "category_links": [
    {
    "position": 0,
    "category_id": "32"
    }
    ],
    "bundle_product_options": [
    {
    "option_id": 0,
    "position": 1,
    "sku": "virtual1",
    "title": "virtual1",
    "type": "checkbox",
    "required": true,
    "product_links": [
    {
    "sku": "virtual1",
    "option_id": 1,
    "qty": 1,
    "position": 1,
    "is_default": false,
    "price": 450,
    "price_type": 1,
    "can_change_quantity": 0
    }
    ]
    },
    {
    "option_id": 1,
    "position": 2,
    "sku": "virtual2",
    "title": "virtual2",
    "type": "checkbox",
    "required": true,
    "product_links": [
    {
    "sku": "virtual2",
    "option_id": 2,
    "qty": 1,
    "position": 1,
    "is_default": false,
    "price": 850,
    "price_type": 1,
    "can_change_quantity": 0
    }
    ]
    },
    {
    "option_id": 2,
    "position": 3,
    "sku": "virtual3",
    "title": "virtual3",
    "type": "checkbox",
    "required": true,
    "product_links": [
    {
    "sku": "virtual3",
    "option_id": 3,
    "qty": 1,
    "position": 1,
    "is_default": false,
    "price": 340,
    "price_type": 1,
    "can_change_quantity": 0
    }
    ]
    }
    ]
    },
    "custom_attributes": [
    {
    "attribute_code": "price_view",
    "value": "1"
    },
    {
    "attribute_code": "price_type",
    "value": "1"
    }
    ]
    },
    "saveOptions": true
    }

No issue: Bundle product is created and assigned to all websites.
5. Update with different prices for bundle options for only one store view using same API request by passing specific store code in URL /rest/<Store_code>/V1/products
6. Verify Admin UI - Product edit page for all Store view scopes

Expected result

All store view scope - Old price should be displayed.
other store view scope - New price set should be displayed
Note: There is no issue when this operation is performed from UI - User is able to set different price for bundle options in different store views. Behavior should be consistent when this is done from API as well.

Actual result

Only the last store has their prices set correctly. All other stores have their option prices set to 0

Additional information

No response

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”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: APIsArea: ProductComponent: ApiUse with concrete module component label E.g. "Component: Api" + "Catalog"Component: BundleIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for groomingReported on 2.4.3-p1Indicates 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