All things Shopify and commerce
Hi there, how can I display stock quantities on my website? Dawn version 14.
Hi,
To display stock quantities on your website, follow these steps:
Edit Theme Code:
Modify Code to Display Stock Quantity:
{% if product.available and product.variants.first.inventory_management %}
{% assign total_inventory = 0 %}
{% for variant in product.variants %}
{% assign total_inventory = total_inventory | plus: variant.inventory_quantity %}
{% endfor %}
<p>In stock: {{ total_inventory }} items</p>
{% else %}
<p>Out of stock</p>
{% endif %}
@sonnisaar hey,
please use this code where you want to show on product page :
{% for variant in product.variants %}
<p> {{ variant.inventory_quantity }} in stock.</p>
{% endfor %}
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024