Hi there everyone,
I need to add the sold out badge on top of products which are sold out.
I removed the coding a few months ago that was pre built on the website.
Need to add it back lol.
Thank you
Hi there everyone,
I need to add the sold out badge on top of products which are sold out.
I removed the coding a few months ago that was pre built on the website.
Need to add it back lol.
Thank you
South Africa
All I need is coding to plug onto my website. Never had to message over DM?
Hi @AI_CR7
Add this code and add the Sold out badge.
From your Shopify admin dashboard, click on “Online Store” and then “Themes”
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “theme. Liquid” file. Find the tag and paste the code below before the tag.
.card__media .card__badge.bottom.left {
display: flex !important;
}
And save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
As you can see the button does appear but it doesnt say sold out’
Hi @AI_CR7
You also need to change the theme settings, under a badge block, a “Sold out badge color scheme” to not be white.
Currently, that is a white background and white text.
Check this this code is available in your card-product.liquid.
{%- if card_product.available == false -%}
{{- 'products.product.sold_out' | t -}}
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
{{- 'products.product.on_sale' | t -}}
{%- endif -%}
If not you need to add this code.
Okay, I am in the exact same boat. I removed the badge with code a few months back and didn’t make note of how or where I did this, and now I would love to have the “sold out” badge back on my site. Can anyone help me?