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 -%}
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024