Hi,
The default implementation of inventory system does not fire events when inventories are updated. You might need to create your own implementation based on that and fires events when you want.
But if you can wait then in next couple of weeks, we'll release a version of Commerce (possibly 8.15) which has the events for inventory AND price by default.
Regards.
/Q
Hi,
Thank you, I will certainly look at that when it is released.
For now I am looking at using the SearchManager.Update(...) function, I will call this from within our Scheduled Job that updates the inventory. The issue with this at this moment is that only one Lucene 'writer' is allowed at any given time and sometimes our inventory job interferes with the other index jobs and one will fail. So I just have to make sure that this is handled correctly.
Hi,
Stay tuned for Commerce 8.15, will be released in a couple of days. It will have new API:s to listen and fire events when prices and inventories are updated.
More information can be found here: http://world.episerver.com/blogs/Quan-Mai/Dates/2015/7/new-events-for-price-and-inventory-updates/
Regards,
/Q
The default Lucene Search Provider does not seem add the inventory to the lucene search index (only PreOrder is added).
For our implementation it is required that we can filter and sort on warehouse inventory and total inventory. Using a Custom CatalogIndexer I am able to add custom fields to the search index, making this filtering and sorting possible. For each product I get the total inventory and each warehouse inventory and write these as separate fields in the Lucene Index.
The problem is this only works correctly when doing a full rebuild, but not on a normal build (only changed products are indexed).
Does anyone know a way to let the CatalogIndexer know what Inventory records have changed since the last build?
Some more information, our inventory is updated using a scheduled Task that is run every hour to update the stock from our backend software.