Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I am using the below code
<strong>{{ product_qty }}</strong> units left in stock.</p> </div>
for showing quantities of a product on the product page but this is when a variant gets selected i want to display the variants quantity for that I also have the code
<div class="inventoryWrapper">
{% if current_variant.inventory_quantity > 0 and current_variant.inventory_management == 'shopify' %}
<p>Stock: {{ current_variant.inventory_quantity }}</p>
{% endif %}
</div>
Now I want that if someone opens my product then the total first code will run which will show the total quantity and if then someone selects any variant then it will run the second code But in this case, I want to hide the total quantity ( first code ).
I am open to any suggestions please let me know.
Thanks
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025