MDVA-33168: API async endpoint unsets special price

The MDVA-33168 patch fixes the issue where using the API async endpoint to update a product attribute unsets a special price.

This patch is available when the Quality Patches Tool (QPT) 1.0.20 is installed. The patch ID is MDVA-33168. Please note that the issue is planned to be fixed in Adobe Commerce version 2.4.3.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce on cloud infrastructure 2.3.3-p1

Compatible with Adobe Commerce versions:

Adobe Commerce on cloud infrastructure and Adobe Commerce on-premises 2.3.3 - 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 Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Steps to reproduce:

  1. Create two websites with stores.

  2. Go to Stores > Configurations > Catalog > Catalog > Price > Catalog and Set Price Scope = Website.

  3. Create a text-type product attribute. Leave all the options to default.

  4. Add the attribute created to the default attribute set.

  5. Create a simple product to use with a bundle product.

  6. Create a bundle product with the following Example options:

    • Enable Product = Yes.
    • Attribute Set = Default.
    • Product Name = bundle-1.
    • SKU = bundle-1.
    • Dynamic SKU = Yes.
    • Price = $100.00.
    • Tax Class = Taxable Goods.
    • Stock Status = In Stock.
  7. Under Bundle Items, set these Example options:

    • Ship Bundle Items = Together.
    • Option Title = test, Input Type = Radio Buttons, Required checkbox = checked.
    • Is Default checkbox = unchecked.
    • Name = simple-100.
    • SKU = simple-100.
    • Price = 100.00.
    • Price Type = Fixed.
    • Default Quantity = 1.
    • User Defined checkbox = unchecked.
  8. Switch the scope to the non-default store, and set the special price. (Example: on the Advanced Pricing page, set Special Price = 4%, and Price View = Price Range.)

  9. Update the new attribute only in the non-default store scope, like this Example:

    code language-php
        PUT {{base_url}}/rest/en_au/async/V1/products/{{sku}}    {        "product": {            "custom_attributes": [                {                    "attribute_code": "text_attr",                    "value": 21                                   }            ]                    }    }
    

Expected results:

Other attribute values remain the same when updating a product attribute using async rest API, as expected.

Actual results:

The special price, that was set using async rest API under the store scope, gets removed.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to the Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a