Displaying Compare Price on Collections page or lowest price from discounting app

Highlighted
New Member
4 0 0

Hi

I believe I need to update my product-price.liquid to see the right changes on the Avone theme I am using. I am also using an App called Wholesale Quantity Breaks to offer Tier prices.

On my collections page, I wanted to display the either the lowest price from the Tiers in the App or if that is not possible that to be able to display the Compare at price which I can populate with the cheapest price and then show on the Collections page As low as "Compare_at_price" and not display the regular price.

The code on my product-price.liquid is as follows and any help in what I need to change on this would be helpful:

{% if product.title %}
  {%- assign compare_at_price = product.compare_at_price -%}
  {%- assign price = product.price -%}
  {%- assign price_varies = product.price_varies -%}
  {%- assign available = product.available -%}
 
  <!-- Show min to max price -->
  {%- assign min_price = product.price_min | money -%}
  {%- assign max_price = product.price_max | money -%}
{% else %}
  {%- assign compare_at_price = 1999 -%}
  {%- assign price = 1999 -%}
  {%- assign price_varies = false -%}
  {%- assign available = true -%}
{% endif %}
 
{%- assign money_price = price | money -%}
 
 
{% if compare_at_price < price %}
  {% if price_varies %}
    <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
    <s class="product-price__price regular">{{ compare_at_price | money }}</s>
<span class="product-price__price product-price__sale"> 
       {% if settings.price_lbl %}{{settings.price_lbl_txt }}{% endif %}
       {% if settings.price_style == 'default' %}{{ money_price }}{% else %}{{ min_price }} - {{ max_price }}{% endif %}
</span>
  {% else %}
    <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
    <s class="product-price__price regular">{{ compare_at_price | money }}</s>
<!--     <span class="product-price__price product-price__sale">{{ money_price }}</span> -->
  {% endif %}
{% else %}
  {% if price_varies %}
        <span class="product-price__price">
          {% if settings.price_lbl %}{{settings.price_lbl_txt }}{% endif %}
          {% if settings.price_style == 'default' %}{{ money_price }}{% else %}{{ min_price }} - {{ max_price }}{% endif %}
</span>
    {% else %}
    <span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
    <span class="product-price__price">{{ money_price }}</span>
  {% endif %}
{% endif %}
0 Likes