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 -%}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024