Hi community,
I’ll be thankful is someone can advise on the following, I’m not tracking inventory because I have a rental business model with recurring payments therefore I don’t want Shopify to update inventory quantities. But it would be grate if I can still show the out-of-stock products in the collection pages with the “Out of stock” tag probably based on an attribute of the product, I wonder if this is possible via liquid code.
Thank you very much in advance,
Mike.
Hi @Mike5241 this is very possible, implements just depends on the logic needed and theme as they vary wildly.
The main catch of course can be where is the inventory/stock amount value stored if not in the product data, as a tag or as a metafield etc?
Unless the backoffice amount is irrelevant and you just want a switch either per product or per variant.
If you need this customization or consultation then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Hi Mike,
We (Supercycle) have this on our roadmap. There are lots of nuances of rental/product-as-a-service models that we are addressing, including serialised inventory and more.
Hi community,
Sorry that I didn’t provide more details. I’m using the Dawn theme and I have a product metafield called InOutStock whose values can be InStock or OutOfStock, how can I code in liquid the use of this metafiled to show the “Out of stock” tag/label as when tracking inventory?
Thank you very much,
Mike
@Mike5241 use a custom-liquid block
IF a product has a single variant, or multiple variants that share inventory.
{{ product.metafields.custom.InOutStock }}
, *or
{{ product.metafields.custom.InOutStock.value }}
*
Otherwise the display wont update automatically if variants have unique inventory when changing variants in a lot of themes.
That would be an advanced theme customization.
This also doesn’t address making sure SEO features like JSON+LD schema are updated to use that info.
If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Hi Paul,
In my case I don’t have variants. In which liquid file I should add the code and in which part of the file?
This code will display the Out Of Stock tag on the collection page and on the product page?
Thank you very much,
Mike.
Hi Paul,
I wonder if you had a chance to see my last message.
Thank you very much,
Mike