sale prices not showing - helllpp!!




  • Avatar
    Zetya Support

    Hi Jo,

    To show a "was" price, use the "compare at price" field for the variant, then replace the code in gallery.liquid with this:

    {% for product in collection.products %}

    <div class="product {% cycle 'first\_col', '', '', 'last\_col' %}">

        <div class="image">

            <a href="{{ product.url | within: collection }}" title="{{ product.title | escape }}">

                <img src="{{ product.images.first | product\_img\_url: 'compact' }}" alt="{{ product.title | escape }}"/>



        <div class="info">

            <div class="ellipsis title"><a href="{{ product.url  | within: collection }}">{{ product.title | escape }}</a></div>

            <!-- <div class="price">{{ product.price | money }}</div> -->

            <div><span class="price">{{ product.price_min | money }}</span>{% if product.price_min < product.compare_at_price_max %} <span class="price"><del>{{ product.compare_at_price_max | money }}</del></span>{% endif %}</div>



    {% endfor %}

    To get the previous and next articles is actually a little tricky, but I'll see if I can figure something out. If I do I'll post it here.

    Cheers, Gavin.

  • Avatar

    hey gavin


    thanks for your help - although I tried to post this code into gallery theme and it threw this back: Error updating gallery.liquid: Tag '{%' was not properly terminated with regexp: /\%}/

    I don't want to edit it incase I make a mistake - do you mind having a little look please?


    thanks so much



  • Avatar
    Zetya Support

    Hi Jo,

    Sorry, there was a cut and paste problem with the code I posted. I've fixed it, so please try again.

    Thanks, Gavin.

  • Avatar
    Zetya Support

    Someone asked in support how to show the compare-at prices on the product page.

    1. Open product.liquid and scroll to the bottom. Look for this line:

    jQuery('#product-price').html(Shopify.formatMoney(variant.price, "{{shop.money_with_currency_format}}"));  // update price field

    1. Replace that line with these 3 lines:

    var price = Shopify.formatMoney(variant.price, "{{shop.money_format}}");
    var compare = variant.compare_at_price == null ? "" : " <del>" + Shopify.formatMoney(variant.compare_at_price, "{{ shop.money_format }}") + "</del>";
    jQuery('#product-price').html(price + compare);  // update price field

  • Avatar
    Alice Yoon

    Hello, I also have the same problem with sale price not showing.

    I first replace the code (you gave above) in the product.liquid

    Then I copy and pasted the code for gallery.liquid, all the photos went shrink :(

    see the attached file

    Please help!

    Thanks!! :)

  • Avatar
    Zetya Support

    Hi Alice,

    It is very unlikely that code would change the image image. Please create a ticket and I'll investigate for you.


  • Avatar
    Pamela Buffone

    Hi Gavin, I just applied this code to my site and it works great to show the before/after price, but I've noticed my images in the collection pages are no longer centered in the grey boxes. Is there an update to this code for gallery.liquid that I should be using? 


  • Avatar
    Zetya Support

    Hi Pam,

    Try adding "wraptocenter" to the image div:

        <div class="image wraptocenter">

    Thanks, Gavin.

Please sign in to leave a comment.