Why isn't my compare at price changing with variants on the product page?

I need help, My compare at price not showing on the product page, I somehow edited a little and it is showing the compare at price but It is not changing with variants until I refresh the page. Any help would be appreciated


    

      
         current_variant.price %} class="main-sale-1"{% endif %}>
          {{ current_variant.price | money }}
        
      
      
              
                {% if current_variant.compare_at_price > current_variant.price %}
          {{ current_variant.compare_at_price | money }}
                {% endif %}
        

      

      
        {{ 'products.product.sale' | t }}
        *•*
        {{ 'products.product.save' | t }}
        
      

      
      {% liquid
        assign units = product.variants | map: 'unit_price'
        if units[0]
          assign has_units = true
        else
          assign has_units = false
        endif 
      %}
      {% if has_units %}
        {% capture show_units %}
          {%- unless current_variant.unit_price -%}style="display: none;"{%- endunless -%}
        {% endcapture %}
        {% capture unit_price_separator %}
          /{{ 'general.accessibility.unit_price_separator' | t }} 
        {% endcapture %}
        {% capture unit_price_base_unit %}
          
            {% if current_variant.unit_price_measurement %}
              {% if current_variant.unit_price_measurement.reference_value != 1 %}
                {{ current_variant.unit_price_measurement.reference_value }}
              {%- endif -%}
              {{ current_variant.unit_price_measurement.reference_unit }}
            {% endif %}
          
      

        {% endcapture %}
        

          
            {{ 'products.product.unit_price_label' | t }}
            {{ current_variant.unit_price | money }}
            {{ unit_price_separator }}
            {{ unit_price_base_unit }}
          
            {{ current_variant.compare_at_price | money }}

          
            {{ 'products.product.each' | t }}
            
          
        

      {% endif %}
    

  

Hello @SubhSandhu !

I won’t be able to assist you with code related issues myself, but I had a look and I found the developer website of the theme developers for Pipeline. Here, you will be able to get in touch with them regarding this issue directly, and this is recommended as they know their own theme code best and may be able to help you out with this quicker.

If you find that you’re unable to get the support from them, the alternative is to contact a Shopify Expert. Experts are people who work externally to Shopify and charge their rates based on the work that they do. They can help you out even with third party theme related issues such as Pipeline.

On another note, since you mentioned that this issue in particular is with compare at price, I wanted to ask you if this is something you’re displaying for BFCM 2021. Is this your first season, or have you been through BFCM with your store already? Either way, I have a fantastic Shopify Blog article for you on our BFCM 2021 Preparation Tips - do be sure to check this out and let me know if you have any other questions.

Hi there,

I’m a developer working for a Shopify Partner (not affiliated with the theme developer though so if you already contacted GroupThought, it’s best to take their advise instead!) and recently stumbled upon this thread while also working on slightly tweaking Pipeline for a client.

The code you are looking for that you need to add in this file is:


  {{ current_variant.price | money }}

However, for that to work, you would also need to add this:


Note that these are just the bare minimum code that you need to add in order for the product’s compare at price to show up – no styling, conditions, etc. was added. Depending on what you want to do, you may need help with someone who knows more about HTML, CSS, Javascript and Liquid.

Hope this helps! :slightly_smiling_face: