Changing format for specific strike-through pricing

Changing format for specific strike-through pricing

DylanFurmo
Tourist
10 0 5

I am looking to control the color, format, and potentially the text copy for the strike-through pricing showing on our site depending on factors such as collection or date.

 

Here is the liquid code for our "compare-at-details.liquid":

 

 

{% if template contains 'collection' or template contains 'index' %}
{% if on_sale %}
{% assign compare_price = product.compare_at_price %}
{% assign product_price = product.price %}
{% include 'price-sale' %}
{% endif %}
{% endif %}

{% if template contains 'product' %}
<span class="sale-tag medium"> 
{% if product.compare_at_price_max > product.price %}
{% assign compare_price = variant.compare_at_price %}
{% assign product_price = variant.price %}
{% include 'price-sale' %}
{% endif %}
</span>
{% endif %}

 

 

Right now, I can control where this shows up in the "compare-at.liquid" page, with something like this:

 

 

{% comment %}
----------------------------------------------------------------------------------------------------------------------------------------
[Brand] within date range
----------------------------------------------------------------------------------------------------------------------------------------
{% endcomment %}

{% elsif product.vendor == '[Brand]' %}
{% if date >= '11/14/2020' and date <= '12/12/2020' %}
{% include 'compare-at-details' %}
{% endif %}

 

 

Is there a way to change the color of the strike-through pricing and/or instead of having it say "Save XX%", change the copy to say "Save XX% - BFCM Only!" based on conditions?

 

Thewesternco.myshopify.com

 

thanks

Replies 0 (0)