Set up a simple inventory control with Drupal Commerce 2
If we do not have (yet) a contributed module (commerce_stock should be available soon), Drupal Commerce 2 already has an API to set up an simple inventory control, with the Availability Manager service. Let's look at how to set up a very simple stock control, based on a field (for example field_stock) that has been added on a product.