Posted on 26/10/2015 10:43:05
Hi Anders
If your list shows the variants, you add the active and stock levels to the search on your index, see dump.
If your list shows only main products, it is the main products stock that counts, and all the variants that it comes in.
To work around it if using method 2 above, there are 2 options. 1st option is to generate a 2nd search that searches variant documents (and not main documents) and use that for loading variant option facets/counts for the variant facets (i.e. color and sizes) - and take stock into consideration. When setting this up, parameter names should match in the 2 searches.
2nd option is to change the indexer to only include variant options on the main product for variants that are in stock. This requires a change to the indexer.
Both versions requires that the index is rebuild every time the stock changes. Using option 1 the variant document needs an update, using option 2, the main product document requires an update.
BR Nicolai