Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have two variant types to sell for each of my products. The Main variant is the one my customers care about, and I'd like its price to display in product grids. However, when I add the Secondary, lower-priced variant, its price usurps the Main price, and the grid reads "From $secondaryprice."
Here in the Shopify Community, I found a solution that seemed promising (if combined with this one). However, the product-grid-item.liquid file to which it refers isn't listed in the theme files.
Any ideas for how to proceed?
Solved! Go to the solution
This is an accepted solution.
Thank you - I had found the file, but not the code. Turns out that the "Edit Code" tool in Shopify doesn't have a usable search feature. I copied the code to a text editor and used the text editor's search to find it.
I ultimately got the maximum price to display by replacing this...
{% render 'price', product: card_product, price_class: '' %}
...with a variant of the code you suggested:
Single-build License: {{ card_product.price_max | money }}
Thank you for your help.
Hi @digialkrouse,
In Dawn theme, you need the card_product.liquid file under the Snippet folder.
1. From your Admin Page, click Online Store > Themes >Actions > Edit code
2. In the Snippet folder, open the card_product.liquid
3. Find the code below
{% render 'price', product: card_product, price_class: '' %}
4. After the code, you can paste the code below
From {{ card_product.price | money }} to {{ card_product.price_max | money }}
Thanks, @made4Uo. That sounds appropriate, but the code you cited is nowhere to be found in the card_product.liquid file. I tried a fresh download of the theme, and it's not in there, either. Am I missing something?
What version of Dawn do you have?
Hi @digialkrouse,
You should have the card_product.liquid under the Snippet folder
This is an accepted solution.
Thank you - I had found the file, but not the code. Turns out that the "Edit Code" tool in Shopify doesn't have a usable search feature. I copied the code to a text editor and used the text editor's search to find it.
I ultimately got the maximum price to display by replacing this...
{% render 'price', product: card_product, price_class: '' %}
...with a variant of the code you suggested:
Single-build License: {{ card_product.price_max | money }}
Thank you for your help.
Thank you works great! Tried to solve this for several hours, your fix worked right away.
Great it works but i have an additional question :
After making the change to highest price display,
- How to still keep the price comparison display when i have sales on my product.
- To keep also the unit price by gram
Hi, Thank you for your solution, it works well displaying the price ranges for products with variants. But it displays ranges even on products with no variants(Example: From $40.00 to $40.00), please help me out with that.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024