FROM CACHE - en_header

Sale tag

Solved
Letsa
New Member
2 0 0

Hello. I am using Dawn Theme in the online store. While trying the app for discount tags, I accidentally deleted the app I liked. I can't find the app and the discount I entered to try is still in the online store. Can I delete the discount tag and find the app causing it?

Screenshot_20220425-153301_Chrome.jpg

SC
Accepted Solution (1)

Accepted Solutions
AlohaAkahai
Excursionist
25 1 3

This is an accepted solution.

You can change it. It uses the Accent-2 color in Theme Settings. Beyond that, you need to add bit of CSS code and add the css identifier to badge. I have done this already myself. I use the sale badge as a way show Discount Percentage between Compare and Price. 

View solution in original post

Replies 3 (3)
AlohaAkahai
Excursionist
25 1 3

You will need to edit the code for the Dawn template. 

 

Look in Card-Product.liquid under Snippets for this code

 

 

 

{%- if card_product.available == false -%}
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}">{{ 'products.product.sold_out' | t }}</span>
{%- 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>
 {%- endif -%}

 

 

 

 

And add {% comment %} to beginning and at end{% endcomment %}. You can remove these later if you decide you want it back.

 

 

 

 

{% comment %}
{%- if card_product.available == false -%}
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}">{{ 'products.product.sold_out' | t }}</span>
{%- 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>
{%- endif -%}
{% endcomment %}

 

 

 

 

 

Next step is goto price.liquid under snippets; 

 

 

 

 

{%- if show_badges -%}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>

 

 

 

And add {% comment %} to beginning and at end{% endcomment %}. 

 

 

 

{% comment %}
{%- if show_badges -%}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>
{%- endif -%}
{% endcomment %}

 

 

 

Furthermore, Sale Tag is default behavior of Shopify when you use Compare Price and Price fields together.  Whenever the Compare Price is Greater, Shopify treats Price as a Sale Price.  

 

Letsa
New Member
2 0 0

Thank you very much.

Can I change color Sale tags?

SC
AlohaAkahai
Excursionist
25 1 3

This is an accepted solution.

You can change it. It uses the Accent-2 color in Theme Settings. Beyond that, you need to add bit of CSS code and add the css identifier to badge. I have done this already myself. I use the sale badge as a way show Discount Percentage between Compare and Price.