Debut Theme Not showing Sale Price

New Member
3 0 0

Hello Shopify Wizards! I need some help!!!

 

I've been looking through pages upon pages and cannot figure how to do this. 

 

I am using the Debut theme on my shopify shop. On all the collections and product pages, the price does not show the sale or discount price. The price only shows once in the checkout. I tried changing the template code in product.liquid, product.price and product-template snippets. None of it worked, but the closest I got was all the products apparently had a sale price. 

 

Please help...

 

Can anyone help?

0 Likes
Highlighted
Pathfinder
111 3 18

Hello and welcome to Shopify!

Are you sure that the problem didn't started to happen after you made some sort of change to the liquid files?

0 Likes
Highlighted
New Member
3 0 0

I reset all the liquid files back to the default. I am using some apps that allow for variants that I think might be the issue. I've tried doing the following solutions, but none of them seem to work.

 

https://community.shopify.com/c/Shopify-Discussion/how-to-show-discount-on-a-product-using-debut-the...

https://community.shopify.com/c/Shopify-Design/How-to-edit-the-way-sale-prices-display-debut/td-p/51...

https://community.shopify.com/c/Shopify-Design/Debut-theme-Change-the-position-of-the-Sale-price-and...

and a couple others...

 

Thanks for the fast reaction!

 

Here is my product.price code now:

 

<!-- snippet/product-price.liquid -->
{% 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 -%}
{% 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 %}

  <span class="visually-hidden visually-hidden--relative-inline-block">{{ 'products.product.regular_price' | t }}</span>
  <s class="product-price__price">{{ compare_at_price | money }}</s>
  <span class="visually-hidden visually-hidden--relative-inline-block">{{ 'products.product.sale_price' | t }}</span>
  {% if available %}
    <span class="product-price__price product-price__sale">
      {{ money_price }}
      <span class="product-price__sale-label" aria-hidden="true">{{ 'products.product.on_sale' | t }}</span>
    </span>
  {% else %}
    <s class="product-price__price product-price__sale">
      {{ money_price }}
      <s class="product-price__sale-label" aria-hidden="true">{{ 'products.product.on_sale' | t }}</s>
    </s>
    <span class="product-price__sold-out">{{ 'products.product.sold_out' | t }}</span>
  {% endif %}

{% else %}

  {% if available %}
    <span class="product-price__price">{{ money_price }}</span>
  {% else %}
    <s class="product-price__price">{{ money_price }}</s>
    <span class="product-price__sold-out">{{ 'products.product.sold_out' | t }}</span>
  {% endif %}

{% endif %}

My product.liquid is this:

 

{% comment %}
  The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}

<script>
  // Override default values of shop.strings for each template.
  // Alternate product templates can change values of
  // add to cart button, sold out, and unavailable states here.
  theme.productStrings = {
    addToCart: {{ 'products.product.add_to_cart' | t | json }},
    soldOut: {{ 'products.product.sold_out' | t | json }},
    unavailable: {{ 'products.product.unavailable' | t | json }}
  }
</script>

{% assign current_variant = product.selected_or_first_available_variant %}

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "{{ product.title }}",
  "url": "{{ shop.url }}{{ product.url }}",
  {% if product.featured_image %}
    {% assign image_size = product.featured_image.width | append: 'x' %}
    "image": [
      "https:{{ product.featured_image.src | img_url: image_size }}"
    ],
  {% endif %}
  "description": "{{ product.description | strip_html }}",
  {% if current_variant.sku != blank %}
    "sku": "{{ current_variant.sku }}",
  {% endif %}
  "brand": {
    "@type": "Thing",
    "name": "{{ product.vendor }}"
  },
  {% if product.variants %}
    "offers": [
      {% for variant in product.variants %}
        {
          "@type" : "Offer",
          "availability" : "http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
          "price" : "{{ variant.price | divided_by: 100.00 }}",
          "priceCurrency" : "{{ shop.currency }}",
          "url" : "{{ shop.url }}{{ variant.url }}",
          "itemOffered" :
          {
              "@type" : "Product",
              {% if variant.image %}
                {% assign variant_image_size = variant.image.width | append: 'x' %}
                "image": "http:{{ variant.image.src | img_url: variant_image_size }}",
              {% endif %}
              {% if variant.title != blank %}
                "name" : "{{ variant.title }}",
              {% endif %}
              {% if variant.sku != blank %}
                "sku": "{{ variant.sku }}",
              {% endif %}
              {% if variant.weight != blank %}
                "weight": {
                  "@type": "QuantitativeValue",
                  {% if variant.weight_unit != blank %}
                    "unitCode": "{{ variant.weight_unit }}",
                  {% endif %}
                  "value": "{{ variant.weight | weight_with_unit: variant.weight_unit }}"
                },
              {% endif %}
              "url": "{{ shop.url }}{{ variant.url }}"
          }
        }{% unless forloop.last %},{% endunless %}
      {% endfor %}
    ]
  {% endif %}
}
</script>
0 Likes
Highlighted
Shopify Expert
1345 111 181

Please Share a Store url to better assist.

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Shopify Expert Page: https://experts.shopify.com/perennialsolution
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Highlighted
New Member
3 0 0

Thanks for the help, here is the site: 

https://fairbow.myshopify.com/

0 Likes
Highlighted
New Member
1 0 0

Hi, do you know how to add the before price to the cart page. Now it's only showing the sale price as a normal price. Hope someone know how to add the before price to the cart page....

 

Kind regards,

 

0 Likes