Debut theme, all of my products display $19.99 but not actual price.

Solved
New Member
5 0 0

All of my products show $19.99 but not actual product price on home page and in collection pages. Could anyone help me fix it?

I've noticed that product-price.liquid has 

<!-- snippet/product-price.liquid -->
{% if variant.title %}
  {%- assign compare_at_price = variant.compare_at_price -%}
  {%- assign price = variant.price -%}
  {%- assign available = variant.available -%}
{% else %}
  {%- assign compare_at_price = 1999 -%}
  {%- assign price = 1999 -%}
  {%- assign available = true -%}
{% endif %}

When you change 1999 to any other value, products on home page and in collections display that new value but not actual price. 

 

Screenshot 2019-05-12 at 22.26.25.png

 

Heres the website: https://animesforever.com

 

Thank for any help, much appreciated. 

0 Likes
Highlighted

Success.

Shopify Partner
468 85 109

What is this snippet for ? It causes this issue.

Please try to replace it with this.

  {%- assign compare_at_price = variant.compare_at_price -%}
  {%- assign price = variant.price -%}
  {%- assign available = variant.available -%}

If the above is not working, try this one.

 {%- assign compare_at_price = product.compare_at_price -%} 
{%- assign price = product.price -%} 
{%- assign available = product.available -%}

 

Author: Hovhannes Sargsyan (aka sarhov).
An individual web developer focused on Shopify development.
Need more help? Feel free to send me a direct message or drop an email shopify@sarhov.com

Website: https://sarhov.com  
Email: shopify@sarhov.com
Skype: @sarhov
Messenger: @sarhov
Telegram: @sarhov
2 Likes
Highlighted
New Member
5 0 0

The second snippet done the trick!! Thanks a lot! 

 

I dont know why it was happening (i dont remember changing anything in there), but oh well, it worked!

 

Thanks! 

0 Likes
Highlighted
Shopify Partner
468 85 109

@ArtiomP 

You're welcome, if the my answer solved your issue please accept it as solution.

Author: Hovhannes Sargsyan (aka sarhov).
An individual web developer focused on Shopify development.
Need more help? Feel free to send me a direct message or drop an email shopify@sarhov.com

Website: https://sarhov.com  
Email: shopify@sarhov.com
Skype: @sarhov
Messenger: @sarhov
Telegram: @sarhov
0 Likes
Highlighted
New Member
1 0 0

Hi guys,

 

Hope someone can help me too! 

I need my products to display price and discounted price in the collection page. 

We have another website which does this but have no idea what is different from the previous one. 

 

The one that shows prices is: 

https://oldskipper.co/collections/captain

 

the one that doesn't show is: 

https://oldskipper.com.au/collections/captain

 

This is my whole product.price-liquid code: 

<!-- snippet/product-price.liquid -->
{% if variant.title %}
  {%- assign compare_at_price = variant.compare_at_price -%}
  {%- assign price = bold_variant_price -%}
  {%- assign available = variant.available -%}
{% else %}
  {%- assign compare_at_price = 1999 -%}
  {%- assign price = 1999 -%}
  {%- assign available = true -%}
{% endif %}

{%- assign money_price = price | money -%}

<dl class="price{% if compare_at_price > price %} price--on-sale{% endif %}" data-price>

  {% if section.settings.show_vendor %}
    <div class="price__vendor">
      <dt>
        <span class="visually-hidden">{{ 'products.product.vendor' | t }}</span>
      </dt>
      <dd>
        {{ product.vendor }}
      </dd>
    </div>
  {% endif %}

  <div class="price__regular">
    <dt>
      <span class="visually-hidden visually-hidden--inline">{{ 'products.product.regular_price' | t }}</span>
    </dt>
    <dd>
      <span class="price-item price-item--regular" data-regular-price>
        {% if available %}
          {% if compare_at_price > price %}
            {{ compare_at_price | money }}
          {% else %}
            {{ money_price }}
          {% endif %}
        {% else %}
          {{ 'products.product.sold_out' | t }}
        {% endif %}
      </span>
    </dd>
  </div>
  <div class="price__sale">
    <dt>
      <span class="visually-hidden visually-hidden--inline">{{ 'products.product.sale_price' | t }}</span>
    </dt>
    <dd>
      <span class="price-item price-item--sale" data-sale-price>
        {{ money_price }}
      </span>
      <span class="price-item__label" aria-hidden="true">{{ 'products.product.on_sale' | t }}</span>
    </dd>
  </div>
</dl>

Please help, thanks!

0 Likes
Highlighted
Tourist
9 0 1

Hey @sarhov ,

 

I have the same issue as op.

But when I apply your fix to my product-price.liquid then all the products do not show any prices on the categorie page.

When I click on them they show the correct price though (also before the fix).

 

{% if variant.title %}
  {%- assign compare_at_price = variant.compare_at_price -%}
  {%- assign price = variant.price -%}
  {%- assign available = variant.available -%}
{% else %}
  {%- assign compare_at_price = product.compare_at_price -%} 
  {%- assign price = product.price -%} 
  {%- assign available = product.available -%}
{% endif %}

Would appreciate any suggestions.

 

Thomas

0 Likes