Shopify themes, liquid, logos, and UX
I am trying to show inventory quantities on the product page. I'm using the Icon Dolce Theme. is this an easy fix? I have no experience with liquid or modifying Shopify themes.
Hi Brad,
let you know how to add that inventory show on product detail:
In order to enable the inventory tracking option, navigate to your HTML/CSS editor and select the product-template.liquid. Scroll to line 111 and paste the following code:
{% 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>
If your product does not have inventory tracking enabled, it will simply read as, "This product is available."
If you have any more query or help then you can sent mail me at jaygandhi0692@gmail.com
go to the bottom of your store, to "theme actions" or something like that, i have it in spanish jajaja.
then cick on the 3 dots and on the top
Hi,
I am wanting to show the sizes available on the bottom of the page. Attached is an example of what I am wanting.
Can you please tell me what code to use for this as I am new to it?
I want to show the sizes and available sizes at the bottom of the item so they do not have to click the item to find it, they will already know if their size is available for them.
Thank you so much,
Paige
Hello Paige,
I am not a code expert lol 😂, but when you add your products there is an
option to add a variant, there you will be able to add sizes, colors or
styles to the item you want to sale.
I do hope that helps. If not please contact Shopify Support team. 😃😊
Hi Jay
Hoping that you or anyone else is able to help me show the available qty of each size on the product / collection pages in my online clothing store (like a hover over display)
We use a theme called ICON MASTER
As most stocks are now very low customers have to keep clicking in then coming back out and so on till they can fund something available in their size.
Thank you
Momin
Hi,
It is not working in Supply theme, can some one please help.
Hi Jai1
I have theme "Craft" one of the new shopify free themes, and I don't have "product-template.liquid" in my edit/code pages.. which page/line I should add the code to it? Thank you for your help in advance.
Hi,
I used that code on my shop to show inventory on a product page, but it is not working as I expected. The problem is when a product has variants, for example, if variant 1 has 10 items in stock and variant 2 has 8, it doesn`t update the quantity when I change from variant 1 to 2 (variant 2 is showing 10 instead of 8), only if I refresh the page. Is there a way to fix this?
For Display or Update inventory quantity on product page based on the variant, dropdown changed then we need to write custom javascript code in your theme files.
You can check at our client website we already did for them.
Client Website 1:
https://rheemprogear.com/products/metal-key-tag-w-bottle-opener
Client Website 2:
https://ruudprogear.com/collections/frontpage/products/triton-intelligent-tee
Hi,
Im looking for Display Inventory Quantity on the Product Page solution. On my shopify store.
Same here, also looking for a solution to this
Add this code to your product-template.liquid file. I'm using the Simple theme, and it goes immediately after line 112 (after "<div class="product-single__policies rte">") and that works for me:
{% 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>
More details are here: https://community.shopify.com/c/Shopify-Design/How-do-I-Show-inventory-quantities-on-product-pages-u...
What I now want to do is show the inventory at the various locations. Anyone know how to do that?
This works on the Supply theme, but not in the Venture theme, can anyone tell me how to add this to the venture theme?
<div id="variant-inventory"> {% if product.variants.first.inventory_management == "shopify" %} {% if product.variants.first.inventory_quantity > 0 %} We currently have {{ product.variants.first.inventory_quantity }} in stock. {% else %} The product is out of stock {% endif %} {% else %} This product is available {% endif %} </div>
Can seem to make it work on the supply theme
I have variants for my products as well and was not able to get that code to work. Any suggestions?
is there a way to do this with the spolight theme?
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025