Hello,
I’m showing an available qty on my product page. We have ‘buy with prime’ items connected to our store. So when I use this variable ‘variant.inventory_quantity’, it shows the total inventory qty of both our warehouse and FBA items. Is there any way that I can only show the inventory level of our location?
F.Y.I. the code I put into my theme’s custom liquid section is,
{% assign totalProductsQuantity = 0 %}
{% for variant in product.variants %}
{% assign totalProductsQuantity = totalProductsQuantity | plus: variant.inventory_quantity %}
{% endfor %}
{% unless product.tags contains ‘bwp’ %}
{% if product.has_only_default_variant %}
{% if totalProductsQuantity > 0 %}
{{ totalProductsQuantity }} In Stock
{% endif %} {% endif %} {% endunless %}Thank you!