Active2 years, 8 months ago
Indexing is how Magento transforms data such as products and categories, to improve the performance of your storefront. As data changes, the transformed data must be updated or reindexed. As data changes, the transformed data must be updated or reindexed. The default value for the type is BACKGROUNDPREFFERED. (info) For JIRA DC a better approach than background indexing is to take one.
Using Magento2.1.0-rc1 Branch With Sample Data
Using REST API catalogProductRepositoryV1 REF: http://devdocs.magento.com/swagger/index.htmlGet Key from Admin token API and use that key in
POST /V1/products
&
PUT /V1/products/{sku}
with parameter tried with both parameter one by one
- store_id=0
- storeId=0 using following JSON
Does not support store_id / storeId field , but the information in product does not save to store it save to default Store ID
GET /V1/products has parameter storeId same i had tried with PUT & POST but not working with PUT & POST
Emizen TechEmizen Tech
3 Answers
I've encountered a similar scenario where I want to update prices per website. So to update the price, I've used
This worked fine.
So I assume you can use this to update product data per store.
Krt_MaltaKrt_Malta4,3031717 gold badges4444 silver badges8686 bronze badges
/rest/<store_code>/V1/products/<sku>
This one works, you can use
- all
- default
for store codes
StVakisStVakis
after debugging a lot on Magento2, Found that Magento2 does not have any functionality to Store Data from REST API as per StoreID getStore function in StoreManager just check if store is exist in session else return default , that is why all REST API Calls are stored in default store ID
![Magento2 Magento2](/uploads/1/2/5/6/125657824/511914221.jpg)
I have Over Rided MagentoStoreModelStoreManager as below :
etc/di.xml
vim Model/EmizenStoreManager.php
in this file i have check that if Request type is PUT and URL Paramater storeId exist than Set that Store else call parent::getStore()
and in REST API PUT Call, I have added storeId in all request in which I need to set information to be stored as per StoreID & it works like a charm :) for store values in admin i am using storeID=0 ByDefault for all PUT Requests.
Emizen TechEmizen Tech