Inventory tracking on some product pages but not all

Hello,

My current_variant.inventory_quantity which reads as “We have 00X in stock.” is appearing on some but not all of my product pages.

The mixer is not showing stock while the tap handles are.

I’ve tried and failed to troubleshoot in the following ways:

  1. Product page: I don’t see any options to update this
  2. Debut theme product-template.liquid: I have found the “inventory tracking on product page” comment, but it does not seem to be presenting for every page
{% comment %} Inventory tracking on product page {% endcomment %}
            
              {% 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 %}
            

Furthermore, as I thought that I had made an adjustment after which new collections were not having their inventory tracking appear. This is also false as a new collection’s inventory is most not showing their inventory tracking while some products are showing it.

Thank you,

Hey mate

This is a bit hard to figure out since I don’t have the files to look at but here are some suggestions. (I assume you have a coding background)

  1. Use this and try and debug the problem, replace variable_name with different variables/conditions and apply it to its parents, grandparents, etc elements to see if it reaches.

  2. There could be a condition that’s stopping it from executing it before the comment, try commenting those conditions out and see if it prints it

Hope it helps.

Regards,

Martin

G’day Martin,

I do not have a coding background. I’m open to other explanations if you have them.

Alright post me your link to your shopify store and password if it’s private so I can help you further.

Thanks, Martin

Here’s the info:

https://canarchy.myshopify.com/

PW: CraftCollective

You’ll see that 27QT DEEP ELLUM DALLAS BLONDE COOLER does have live inventory while 16OZ DEEP ELLUM DALLAS BLONDE MIXER does not. These were uploaded at the exact same time.

Beers,

Ah yeap It looks like it only shows when there’s more than one image for that product. You can add more images to the beers and it’ll show the stock quantities (live inventory), the same goes to your shelf display unit. But if that’s something you dont want I can have a look for you if you give me permission to your website since it’s out of my reach.

I figure it out.

You did notice, and I did not, that only products with >1 picture were showing the inventory. I found that the code snippet was within an if statement when products have >1 image.

I copied and pasted it outside the statement, as seen below, and it seems to be working now.

Thanks for the help

1 Like