Display Inventory Quantity “X items available in stock” On Shopify Product Page

Shopify product page is not so friendly about exceeding the number of quantity in stock. The notification pops up, but users won’t know how much they can actually add more. you-cant-add-more

Display Inventory Quantity on Shopify Product Page

Tested on “Dawn Theme”

<div class="quantity_available">{% if product.variants.first.inventory_management == "shopify" and product.variants.first.inventory_quantity > 0 %}
{{ product.variants.first.inventory_quantity }} items available in stock.
{% endif %}</div>

Add this code right above this code from main-product.liquid file.

{%- when 'popup' -%}

items-available

The “8 items available in stock.” is now displayed above the Add to cart button.

Leave a Reply

Your email address will not be published. Required fields are marked *