Shopify themes, liquid, logos, and UX
Hello, I want to use the new dawn theme. I want to keep the sold-out tag and also the cross out the price but i don't want to have a sale tag. Any idea how i can get rid of this?
thank you so much
Solved! Go to the solution
Those instructions remove both badges also. I would like to keep the SOLD OUT badge, keep the discounted cut price (if there is a discount applied). I would like to remove only the SALE badge
Same thought process is still there.
Here is a modified use case for price.liquid
{%- if show_badges -%}
{% comment %}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>
{% endcomment %}
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>
{%- endif -%}
And for Card-Product.liquid
{%- if card_product.available == false -%}
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}">{{ 'products.product.sold_out' | t }}</span>
{% comment %}
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}</span>
{% endcomment %}
{%- endif -%}
I would like to point out the part that says {{ 'products.product.on_sale' | t }} or {{ 'products.product.sold_out' | t }}. You can remove this and make it say something else. Instead of Sold out, you can change it to Not in Stock or Returning Soon.
Thank you.
Did exactly what I was needing it to do.
Thanks for update do want any other changes?
You're a star KetanKumar!
I'd wasted so much time thumping around trying other solutions. Your solution was super simple and very clearly explained, and worked perfectly.
I'm very grateful to you. 🙏
@VuongTuanAnh
`You don't have to remove CSS Badge code. If you just put display:none; in the code, it will do the same thing. Also, code on the bottom will override anything on top. You never want to remove original code. You might want to go back to it.
User | RANK |
---|---|
180 | |
154 | |
72 | |
35 | |
34 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023