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
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:
-
Create two websites with stores.
-
Go to Stores > Configurations > Catalog > Catalog > Price > Catalog and Set Price Scope = Website.
-
Create a text-type product attribute. Leave all the options to default.
-
Add the attribute created to the default attribute set.
-
Create a simple product to use with a bundle product.
-
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.
-
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.
-
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.)
-
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:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to the Patches available in QPT in our developer documentation.