I created the configurable product and sample product and linked them together using REST API. I can see the config product and the sample products and also the links correctly done in Admin mode. But when I view it as a user, I don't see the product. However, if I go into the configurable product (in admin mode) or one of the simple products and simply open it and save it (without making any changes), it appears. So what am I doing wrong?
Also I noticed that if I hard code the URL I can access the product, for example if I use the URL below I can access the product "test" and able to add it to the cart, but it does not appear in any of the categories and search results.
http://localhost:81/magento235/test.html
Also after running reindexing command, the product also appears as well. So the issue is in relation to index not being updated when the configurable product is created via REST API.
Solved! Go to Solution.
Tried the same in v2.3.4 and it works so that means there is an issue in v2.3.5 where creating a configurable product via REST API doesn't update indexes.
Hello @sasankaathbf70
Nice question !!!
There are two types of indexer mode
1) on schedule
2) on save
If it is on save then it will do flush cache and do reindex of product on the sport so it will show on frotend on the sport when you change via API call
if you are work with on schedule then you must need to make sure cron is running on sever.
if cron is running on sever changes will reflect with in 1 min.
hope it will help you.
If works then mark as a solution
All the indexes are already set as Update on Save in Index Management. This is my behaviour:
- Create a configurable product from REST API and it doesnt appear in the catalogue
- Create a simple product from REST API and it appears in catalogue
- If I run re-indexing command or go to the configurable product and simply press save (without making any changes) it appears
So does this mean that the REST API is not updating the indexes when it creates/updates a configurable product?