Shopify themes, liquid, logos, and UX
Im using Trade theme
let me start with the thing that started all of this, I had multiple variants on a item and it was showing the cheapest option instead of the main price when viewing items so i found a guide and fixxed that issue which was to do
Online Store > Themes > Edit code > search for "price.liquid"
then proceed to find this line
if target == product and product.price_varies assign money_price = 'products.product.price.from_price_html'| t: price: money_price endif
then change
t: price: money_price
to
t: price: money_price_max
but now when i sort by highest price in the product grid its going off the cheapest variant instead of the actual so the top rows there are $90 products displayed but if you scroll to row 3 theres randomly $200 prices listest
Hey @Atlas_0ne
Based on your issue, it sounds like you've fixed the display of prices in the product grid, but now the sorting functionality in your collection grid is not working correctly. This is because your theme is still using the default price for sorting rather than the maximum price.
Here's how to fix the sorting issue:
collection.liquid
collection-template.liquid
Or possibly in a file inside the snippets folder related to sorting or collection grids
Search for code related to sorting or price sorting. Look for something like:
{% assign sorted_products = collection.products | sort: 'price' %}
or
{% when 'price-descending' %}
{% assign sorted_products = collection.products | sort: 'price' | reverse %}
Change the sort parameter from 'price' to 'price_max' like this:
{% when 'price-descending' %}
{% assign sorted_products = collection.products | sort: 'price_max' | reverse %}
Make the same change for the 'price-ascending' sort option if it exists.
Save your changes.
This modification should make your collection grid sort by the maximum variant price instead of the default (minimum) price, which will match the prices you're now displaying on your product grid.
Feel free to give it a try on your end, and if you need any help, just send us your collaborator code via DM or email. We’ll gladly make the necessary changes for you for free. Looking forward to assisting you! 😊
Cheers,
Shreya
i do not seem to have any of the .liquid files the only thing i can find refencing sorting is in main-collection-product-grid.liquid and im not seeing anything similar to {% assign sorted_products = collection.products | sort: 'price' %}
Will it be fine if I can have a look at your theme code and fix it for free? Would be willing to DM or email your collaborators code?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025