Hi there,
on my product page, I’d like the stock level to only show when the stock is 10 or less, what can I add to below code to achieve this?
password: waiheke
{%- when 'inventory' -%}
{%- if product.selected_or_first_available_variant.inventory_management == 'shopify' -%}
{%- if product.selected_or_first_available_variant.inventory_quantity > 0 -%}
{%- if product.selected_or_first_available_variant.inventory_quantity
<= block.settings.inventory_threshold
-%}
{{- 'icon-inventory-status.svg' | inline_asset_content -}}
{%- if block.settings.show_inventory_quantity -%}
{{-
'products.product.inventory_low_stock_show_count'
| t: quantity: product.selected_or_first_available_variant.inventory_quantity
-}}
{%- else -%}
{{- 'products.product.inventory_low_stock' | t -}}
{%- endif -%}
{%- else -%}
{{- 'icon-inventory-status.svg' | inline_asset_content -}}
{%- if block.settings.show_inventory_quantity -%}
{{-
'products.product.inventory_in_stock_show_count'
| t: quantity: product.selected_or_first_available_variant.inventory_quantity
-}}
{%- else -%}
{{- 'products.product.inventory_in_stock' | t -}}
{%- endif -%}
{%- endif -%}
{%- else -%}
{%- if product.selected_or_first_available_variant.inventory_policy == 'continue' -%}
{{- 'icon-inventory-status.svg' | inline_asset_content -}}
{{- 'products.product.inventory_out_of_stock_continue_selling' | t -}}
{%- else -%}
{{- 'icon-inventory-status.svg' | inline_asset_content -}}
{{- 'products.product.inventory_out_of_stock' | t -}}
{%- endif -%}
{%- endif -%}
{%- endif -%}
thanks!
