I am putting together a proposal for an eCommerce site - one of the (obvious) requirements is inventory management. I do not see anything specific in the Commerce 2 docs. Basically, want to enter stock levels for each product and then have that number change as orders are placed. Is that possible or does it require a plug-in?



Commerce (as at V2) has basic stock handling that will do exactly what you mention - for each product you can set a stock level (alternatively, you can set it to unlimited stock if you wish). When orders are completed stock is debited by the amount sold (note stock is not debited when items are added to carts - which is good, because it means you don't have to deal with not being able to sell things that are locked up in stale carts).

Commerce will not let you sell out of stock items, and there are template tests you can use to display the stock state in any way you choose (be careful with caching in this area!).

Note that the stock handling is fairly simplistic - e.g. I am pretty sure that there is no automatic return handling (so if you e.g. cancel/refund an order, it won't automatically add the stock back).

If you need stock handling beyond this then you would need to look at building a plugin specific for you needs (or one that integrates a sophisticated inventory handling system).

  • Thanks, Jeremy. I could not find anything in the docs, so appreciate your response!
    – Roi Agneta
    Oct 3 '19 at 23:36
  • Thanks, perhaps accept the answer then? Oct 8 '19 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.