change coming soon to out of stock https://swawe.store/
Hi @attackon ,
To change the “Coming Soon” label to “Out of Stock” on your Shopify homepage using code, you’ll need to edit the theme’s Liquid files. Here’s how you can do it:
1. Log into Shopify Admin:
- Go to your Shopify dashboard.
2. Navigate to Online Store > Themes:
- In the left-hand menu, click Online Store, then Themes.
3. Edit Code:
- Under your current theme, click on Actions > Edit code.
4. Locate the Relevant Template:
- Find the template file that controls the homepage product display. This is often found in
Sections,Snippets, or sometimesTemplates. Common files might includeproduct-card.liquid,product-grid.liquid, orfeatured-product.liquid.
5. Find the Code for the “Coming Soon” Label:
- Search the file for the text “Coming Soon” using
Ctrl + F(Windows) orCmd + F(Mac). The code might look like this:
{% if product.available == false %}
<span class="coming-soon">Coming Soon</span>
{% endif %}
6. Change “Coming Soon” to “Out of Stock”:
- Replace
"Coming Soon"with"Out of Stock", like this:
{% if product.available == false %}
<span class="out-of-stock">Out of Stock</span>
{% endif %}
7. Optional: Update CSS (if needed):
- If your label’s styling is controlled by a class like
.coming-soon, update your CSS file to reflect the new class.out-of-stock. This is typically found inAssets > theme.scss.liquidor a similar file.
.out-of-stock {
/* Add your styling here */
}
8. Save and Preview:
- Save the changes and preview your homepage to ensure the label now reads “Out of Stock.”
9. Test:
- Check different products to ensure the “Out of Stock” label displays correctly when inventory is 0.
If it resolves your issue, please mark my answer as a solution or if you still need assistance, let me know. Thank you.
or if you give me access, I can do it for you, DM
