- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Price not getting set
I am using the products REST api (rest/V1/products) to create a new product in my catalog.
I am specifying the price as per the sample request below:
{"product":{"attributeSetId":4,"extensionAttributes":{"stockItem":{"isInStock":true,"qty":10}},"name":"Air filter - FIAT - Uno Turbo","price":50,"sku":"A0000201"}}
However, the price is not set in Magento when I view the product that gets created.
If I make the same request again, then the price does get set. Is it not possible to set the price for newly created products?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Price not getting set
The prices on the frontend are updated only after refreshing the cache and reindexing.
- How to reindex Magento 2 data from the command line? https://mage2.pro/t/163
- How to delete the cache and autogenerated content: https://mage2.pro/t/33
- What are the «Update on Save» («realtime») and «Update by Schedule» («schedule») indexers modes? https://mage2.pro/t/1225
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Price not getting set
The problem is in the back end as well as the front end, caching is not the issue, the price is not actually getting set in the database.