Problem/Motivation

Hi everyone,
I had this figured out at one point, then had to reinstall the Stock module for some reason and then, when I reinstalled it, found out that I lost all the hard work I'd put in developing some views that showed me my stock levels. I was getting frustrated and finally figured out how to recreate everything, so I thought I'd write up a guide on how to create a View that displays stock levels.

  1. First, create a view of Product Variations.
  2. You may want to add a Relationship for the Product. I don't think this is required, but I have it in my view.
  3. Next, I added the fields: Product Variation: SKU, Product Variation: Title, and Local Stock Location Level: Quantity. This last field is key for being able to filter and sort your view by the stock level. If you choose to display the field you created in each product variation type (field type: General > Stock Level), this will render a value, but Views can't use it to sort and filter by. The Quantity field is what you're looking for.
  4. Add any other fields as needed (edit links, locations, etc)
  5. You should have a view that shows you the Variation and its stock level. I chose to create a table and then duplicate it as an attachment twice. I then turned the attachments into charts. One that showed products with Quantity above 0 and the other showing products below 0. This gives our product manager a quick view of what might need to be reprinted/refilled.

Comments

rex.barkdoll created an issue.