Hide inventory quantities until logged in

Hello,

Is there a way hide inventory quantities until the customer logs in?

{% if customer %}

Customer is logged in. Show the product inventory quantities

{% endif %}

(Add code to inventory location on product-template.liquid?)

Inventory:
Loading..

First time on the forum. If I’m not posting in the correct place please let me know.

Thank you,

Max

Hi @Maxfield

Welcome to the forums!

You’re on the right track, where is the code that displays this inventory section? You would just need to wrap it around the first customer condition you wrote.

1 Like

Thanks for the help! Works like a charm!

{% if customer %}

Inventory:
Loading..

{% endif %}