Automatically adjust quantity based on stock level

Here is a snippet I created that can be placed on the cart / checkout pages to automatically adjust the selected quantities based on the current stock level (if you are concerned about product stock levels.) Feel free to customize to your liking.

1 Like

Thanks for sharing!

As an aside, Commerce has that built-in to its EnforceStock module, in case someone ever googles their way to this page looking for the same thing in Commerce :wink: