The problem is that stocks are linked to SKUs, and SKUs are not always matched directly to the modifier. For example, if the product “Shirt” has a size and color, then you can’t say conclusively whether “Big” is in stock because it also depends on the color.
However, if your products have only one modifier, then there is a 1-1 display. You must have access to the stock level using {option_stock_level} inside the loop {modifier_options} , for example:
{modifiers} <select name="{modifier_input_name}"> {modifier_options} <option value="{option_id}"> {option_name} ({option_stock_level} remaining) </option> {/modifier_options} </select> {/modifiers}
source share