We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Different costs on variants. Pricing only shows lowest variant.

Different costs on variants. Pricing only shows lowest variant.

chase1717
Tourist
3 0 4

We want the price of all variants to show on the collection page. As of right now, it only shows the lowest price and does not indicate there are any other variants until you click on the product page. We would like it to show the lowest to highest price on the collections page. Thank you for your help. 

Replies 3 (3)

LitCommerce
Astronaut
2860 684 761

Hi @chase1717,

Please go to the file containing the code to display the price, 'price' can be found in the snippets.

example with Dawn themeexample with Dawn theme

Then add the code:

{% if product.price_varies %}
{{ product.price_min | money }} - {{ product.price_max | money }}
{% else %}
{{ product.price | money }}
{% endif %}

Hope it helps!

 

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
Beehive37
Visitor
1 0 0

Hello,

I tried adding the code to the 'product-price.liquid', and it did show the range of prices but also displayed the lowest price above that, along with all other products that do not have a range of prices (so there were two of the same prices on top of each other). Should I have made a new snippet to add the code to? Thank you!

LitCommerce
Astronaut
2860 684 761

Hi @chase1717,

It helps to display max and min prices, if you want to list all prices, please change the code:

{%- if product.price_varies -%}
  {%- assign variants = product.variants | sort: 'price' -%}
  {%- assign check = -1 -%}
  {%- for variant in variants -%}
	{%- if check != variant.price -%}
	  {{ variant.price | money }}
	  {%- assign check = variant.price -%}
	{%- endif -%}
  {%- endfor -%}
{%- else -%}
  {{ product.price | money }}
{%- endif -%}

Hope it helps!

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!