Change how inventory level shows on site

Hello @magikartcards

Steps to Display Inventory Count Only When Stock is 10 or Less

  1. Go to your Shopify Admin
  2. Navigate to Online Store > Themes
  3. Click on Customize for your active theme
  4. Click on Edit Code
  5. Find and open the file: main-product.liquid
  6. Look for the existing inventory display code, usually within {% if product.variants.first.inventory_quantity > 0 %}
  7. Replace or modify it with the following:
{% if current_variant.inventory_quantity <= 10 and current_variant.inventory_quantity > 0 %}

Hurry! Only {{ current_variant.inventory_quantity }} left in stock.

{% endif %}
1 Like