How to display stock availability (in stock, out of stock, pre order)

Hello All

I am using the prestige theme currently I’m trying to display with each product Availablity : in stock, Availabilty : On-Order (x) weeks, Availbility: Pre Order

something like this or similar, Ive been digging around trying new apps. Does anyone have any suggestions?

Thanks

1 Like

@braga

can you please try this


{% 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 %}

Hi Ketan

thank you for the response, where exactly would i input this line of code

thanks

@braga

can you please add this code product page below price code

Hey thank you Ketan, happy holidays, do you mind telling me which category and which line to go into to input this code

thanks

@braga

Hey @braga ,

You can display stock availability automatically in your store without the need for coding with ModeMagic App on Shopify. You can set up simple automation rules which display a out of stock or a few left badge based on your inventory level.

Here’s a video of how it works: ModeMagic - Product Labels | Loom

Leaving the link for you to check out the app: LINK (It comes with a 14-Day free trial)

Let me know if this helped?

Hi,

Here is the app that does it all. It displays labels with stock qty on collection pages and stock info on the product pages as well as:

  • coming soon,

  • pre-order,

  • out of stock,

  • only x items left in stock messages.

Text can be customized in the app admin panel.

Please let us know if you have any questions.

Kind regards,

Gravity Software team