cancel
Showing results for 
Search instead for 
Did you mean: 

How to add to Elasticsearch stock status from simple products for configurable?

How to add to Elasticsearch stock status from simple products for configurable?

Hello,

 

I want to add to Elasticsearch a custom value that contains stock status for all simple products. In this way I can filter in layer navigation based on simple product stock and show configurable products.

 

For example: I have a configurable product called Shoe and that shoe has 10 sizes. I want to be able to filter based on stock or when I chose the size to give me all the shoes with that specific size but in stock.

 

I am using Elasticsearch as a search engine (from Amasty).

 

How can I do this? 

2 REPLIES 2

Re: How to add to Elasticsearch stock status from simple products for configurable?


@capoan wrote:

Hello,

 

I want to add to Elasticsearch a custom value that contains stock status for all simple products. In this way I can filter in layer navigation based on simple product stock and show configurable products.

 

For example: I have a configurable product called Shoe and that shoe has 10 sizes. I want to be able to filter based on stock or when I chose the size to give me all the shoes with that specific size but in stock.

 

I am using Elasticsearch as a search engine (from Amasty).

 

How can I do this? 


which kind of products are visible in list ? Are they simple or composite (configurable, bundle, etc..) ?

Re: How to add to Elasticsearch stock status from simple products for configurable?

Hello,

 

I have configurable products in one category (list with shoes) => for this one I need this

I have simple products in other categories and for those everything is ok.

I do not have simple and configurable products in a list.