Top

Compare at Price isn't Showing when Running a Discount

If you aren't seeing a "compare at price" when running a discount, follow these steps to fix the problem:

  1. From "Shopify Admin", select Products.

    select products 

  2. Select a discounted product.

    select a discounted product 

  3. Under "Pricing", ensure there is a Compare at price. If not, enter one.

    ensure there is a compare at price 

  4. Select Save.

    select save 

  5. Select Online Store.

    select online store 

  6. Select Actions.

    select actions 

  7. Select Edit HTML / CSS.

    select edit html / css 

  8. Under "Templates", select product.liquid.

    Note: If your theme contains sections you may find this code within product-template.liquid under "Sections" instead.

    select product.liquid 

  9. Ensure there is code containing compare_at_price

    Note: If this code doesn't exist you can add it. The legend below will help you build the code.

    look for compare_at_price 

  10. Select Save.

    select save 

The code may look something like this or you may have to add it yourself

<h2 id="price"><span>{{ product.price | money }}</span>{% if product.compare_at_price_max > product.price %} <del>{{ product.compare_at_price_max | money }}</del>{% endif %}</h2>

Here is the breakdown of the elements:

  • {{ product.price | money}}: This shows the regular selling price of the product.
  • {% if product.compare_at_price_max | money > product.price %}: Logic statement that will run the next lines of code if the highest (max) compare at price is higher than the product price. The {% endif %} closes the logic statement.
  • <del> ... </del>: The content between these tags will be stroked out.
  • {{ product.compare_at_price_max }}: The highest compare at price. This can also be modified as {{ product.compare_at_price_min }}, for the lowest (minimum) compare at, or simply {{ product.compare_at_price }}
Have more questions? Submit a request