Shopify themes, liquid, logos, and UX
Hello all!
I am attempting to get the sale price to display on the collection pages, it only shows currently on the product page. https://www.chocolatedispensary.com/collections/sale
I've attempted to modify the product-block.liquid file with the following, but nothing changed.
<div class="price"> {% if product.price_varies %}{{ 'products.listing.from' | t }}{% endif %} {% if on_sale %} <span class="was-price theme-money"> {%- render "price", price: cheapest_variant.compare_at_price -%} </span> <span class="theme-money sale-price"> {%- render "price", price: cheapest_variant.price -%} </span> {% else %} <span class="theme-money"> {%- render "price", price: cheapest_variant.price -%} </span> {% endif %} {% render 'unit-price', variant: cheapest_variant %} </div>
Am I editing the incorrect file or is there something missing in the code?
Thanks in advance!
Hi, @Charlooney
I can help you with it. So I need to access your store as a collaborator if possible.
Hello @AnneLuo !
Thanks so much for offering to help! Unfortunately, I cannot provide access, but am happy to provide information that you need.
Thanks!
Hi. Maybe the problem is here. How does this variable take its value?
Hello @AnneLuo
I'm not quite sure what you mean. The products are registering as on-sale, are showing the on-sale banners, and are showing up in the sale collection. The issue is that only the sale price shows, not the compare at price, which it seems that code has indicated it would, but I am relatively new to Liquid coding.
Warm Regards,
Charlene
So If you are not familiar with code editing, consider seeking a developer assistance for guidance.
Hello @AnneLuo
Sorry? That's why I came to the forum, to seek assistance and to learn more about Liquid -- it's been a great resource for me thus far. I didn't expect to be rudely told to go elsewhere. Everyone has to start somewhere.
Regards,
Charlene
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025