Out-of-Stock Messaging During Checkout
An out-of-stock error message shows up on the review page if your customer orders more of an item than you have in stock. Your customer can go back and change their order to ask for a smaller quantity.
The following example shows an out-of-stock error message:

The message lists the items that don't have enough stock and shows how many are left. You can choose whether to show the quantity.
To display the quantity of items available in stock:
-
Go to Commerce > Websites > Configuration.
-
Select your website and domain, and click Configure.
-
Go to the Checkout subtab and then the Quantity Stock Message subtab.
-
Check the Show Quantity Available on the Out-of-Stock Error Message box to include the quantity of items that are available in the message.
Clear this box if you don't want to show the quantity in the out-of-stock message.
-
Click Save to finish.
The out-of-stock error message only shows up if there's at least one item left. If there's no stock, your customers can't add the item to their cart, so they won't get to checkout with it.
To learn about out-of-stock behavior and settings outside the checkout flow, see Out-of-Stock Behavior.