Shopify Tutorials

Show inventory quantities on product pages

By Inventory quantities on product pages customers what inventory quantities on pages you have available for a product or variant of a Shopify inventory on product pages product you can increase your conversion potential and order size by creating urgency and inventory on product pages need. We can set this up for you to show an in-stock message when you have a lot, and the only X left
a message when you have a few or only 1 left message when you have just the single.

You can add a message on the product page or featured product section that shows the number of items you have in stock when inventory runs low on a product variant. For this message to show, you need to enable inventory tracking for the product. Add an inventory block on the product page and featured product section to display the inventory quantity on variant selection. Display low stock inventory countdown bar on product pages to create the Fear of Missing Out and customers to checkout faster.

From your Shopify admin go to Online store and choose themes. Next to the live theme click on Actions and choose Duplicate. Showing the number of products left in stock on your product page keeps
you and your customers informed of how fast your products are moving or if they aren’t at all.

Editing your theme code to add Shopify inventory on product pages feature

  • In the Section directory, find the product-template.liquidfile or which file responsible for product template, and add the following code where you want to show the quantity, in this example we’ve added this after the product title:
        {% comment %} Inventory tracking on product page {% endcomment %}
            <div id="variant-inventory" class="{% unless current_variant.available %} hide {% endunless %}">
              {% if current_variant.inventory_management == "shopify" and current_variant.inventory_policy != "continue" %}
              We have {{ current_variant.inventory_quantity }} in stock.
              {% else %}
              This product is available.
              {% endif %}
            </div>
  • Congrats, You’ve completed the coding parts. Now it’s available in the Show inventory quantities on product pages. It’ll show the number of products available in the product pages. If product pages is not tracked then it’ll show “This product is available”.

Enjoy this feature, Contact Us for more help 🙂

Shopify Developer

Recent Posts

How to Link eBay to Shopify Store

Imagine! Seamlessly connecting the vast customer base of eBay with the robust features of your…

4 weeks ago

Unlock the Power of Shopify Flow: Automation Strategies for eCommerce

Let’s face it. Running an online store requires unwavering discipline. Juggling multiple tasks simultaneously is…

1 month ago

Everything You Need to Know About Shopify Liquid

There’s no denying that Shopify has taken over the world. The ecommerce platform contributes to…

2 months ago

Maximizing Revenue: 7 Best Shopify Themes for Conversion Rates that Soar

It’s true. Every marketing strategy has one common objective: to drive maximum conversion rates. If…

2 months ago

Terrific Dropshipping Business Ideas for 2024

*Sigh*. Are you tired of trying out different methods of making money online? Hear it…

2 months ago

Shopify SEO Checklist for Continued Success in 2023

When driving traffic to your Shopify store, Search Engine Optimization (SEO) is the most affordable…

2 months ago