By default in OpenCart, you have the option “Stock Checkout” that allow customers to still checkout if the products they are ordering are not in stock.
You can disable this to strictly not allow checkout for out-of-stock products.
You will enable this option if you want to allow checkout even when the product quantity has already reached 0 so that the customer can purchase the product. But in special cases, you may not want certain products to be allowed checkout when the quantity 0. For such a scenario, you can use this extension which adds an additional validation for a product that you do not want the customer to place the order when the quantity is 0.
You can enable the disable checkout option for the particular product to restrict customer to place order if the quantity of the product has reached 0.
You can easily enable / disable checkout from Extensions > Modules > Disable Checkout on Selected Products > Edit