Vote up!
Vote down!

Stock and search api filters

Hope someone can help,

I work in ecommerce and wanned to change of ecommerce platform for several brands.

Drupal commerce looks great but i'm facing major issues with the stock management and product overviews which prevent me to switch of platform.

I can't figure how to take the stock into account for the faceted filters.

So what i've done so far is:

- Installed commerce stock
- Add new field stock indexed
- Modified the view (product display) to take only the products with stock > 0

So now my products overview is only displaying the products with stock.

My probleme here is that I have a product with size (small[stock:5], medium[stock:5], large[stock:0]) and in the filters instead of having only small and medium all sizes are displayed. Same for colors...

I also tried to make an index of product commerce entity but there i'm facing another issue which is that I cannot group variation.

Any idea how can I fix this ? Is it the right way to do it ? Is commerce stock the right way to do this or is there another module for the stock management ?

Other issue: I also have an issue when I have a product variation blue and yellow in different sizes. The yellow one is large and out of stock and still can be purchased.

Looks like the stock management is not yet mature, is there any news on adding this to the drupalcommerce core ?

Any ideas would great.

Asked by: brunoR
on November 24, 2012

1 Answer

Vote up!
Vote down!

What you need is a custom module that can make search_api stock-aware.

Josh Miller
Answer by: Josh Miller
Posted: Mar 11, 2013