Skip to content

Instantly share code, notes, and snippets.

@ijy
Last active December 18, 2015 20:48
Show Gist options
  • Save ijy/5842854 to your computer and use it in GitHub Desktop.
Save ijy/5842854 to your computer and use it in GitHub Desktop.
ExpressionEngine: How to conditionally hide modifier options depending on inventory count in Expresso Store 1.6+. {option_stock_level} can be used inside the {modifier_options} tag pair to output the current stock level for that modifier option. It can also be used (as in this example) to conditionally hide modifier options if out of stock.
{modifier_options}
{if option_stock_level > 0}
<option value="{option_id}">
{option_name} {if price_mod_val} ({price_mod}) {/if}
</option>
{/if}
{/modifier_options}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment