Shopify themes, liquid, logos, and UX
Hi All,
I would like to create a 'Final Sale' tag ( in the highlighted area below ) similar to how the tag 'Save 30%' is displayed on product pages.
This tag would need to be variant specific as some sizes or colors might not be on sale or be final sale.
Would the best way to go about this be a variant metafield that can be added to the specific variants? Just exploring ideas to try and figure out the best way to go about this display issue.
Any and all ideas welcome. Running Warehouse .
Hello @Kenton2
Yes, as per your requirement going with variant meta field will be a best idea. As you also have to hide show the badge based on variant.
Thanks
Do you have any suggestions on where to input the code?
I was unable to figure out which section contains the sale trigger to have that 30% off appear.
I had assumed it was this snippet
{%- endif -%}
{%- capture product_labels -%}
{%- for tag in product.tags -%}
{%- if tag contains '__label:' -%}
<span class="product-label product-label--custom1">{{ tag | split: '__label:' | last }}</span>
{%- endif -%}
{%- if tag contains '__label1:' -%}
<span class="product-label product-label--custom1">{{ tag | split: '__label1:' | last }}</span>
{%- endif -%}
{%- if tag contains '__label2:' -%}
<span class="product-label product-label--custom2">{{ tag | split: '__label2:' | last }}</span>
{%- endif -%}
{%- endfor -%}
{%- if settings.show_discount -%}
{%- assign savings = 0 -%}
{%- if settings.discount_mode == 'percentage' -%}
{%- assign savings = selected_variant.compare_at_price | minus: selected_variant.price | times: 100.0 | divided_by: selected_variant.compare_at_price | round | append: '%' -%}
{%- else -%}
{%- capture savings -%}<span>{{ selected_variant.compare_at_price | minus: selected_variant.price | money }}</span>{%- endcapture -%}
{%- endif -%}
<span class="product-label product-label--on-sale" {% unless selected_variant.price < selected_variant.compare_at_price %}style="display: none"{% endunless %}>{{ 'collection.product.discount_html' | t: savings: savings }}</span>
{%- endif -%}
{%- endcapture -%}
{%- if product_labels != blank -%}
<div class="product-meta__label-list">
{{- product_labels -}}
</div>
{%- endif -%}
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024