Show Max Price on Collections Page Using Spotlight Theme

I am using the Spotlight Theme and I cannot figure out how to change the code to display the higher price. I am using 3 variants, $10, $15 and $20 and it is showing the $10. Please help.

1 Like

Hello @DropDeadAmazing

To show the maximum price on your Collections Page, follow these steps:

Step 1: Open Theme Editor

  1. In your Shopify Admin, go to “Online Store” > “Themes” > “Actions” > “Edit Code”.
  2. Find the folder named “snippets” and locate the “price.liquid” file.

Step 2: Modify the Code

Search for the class price__regular in the “price.liquid” file.

Step 3: Replace the Existing Code

Remove the existing code:


  {{ money_price }}

Replace it with:


  {% assign maxPrice = product.variants | sort: 'price' | last %}
  
    {{ maxPrice.price | money }}
  

1 Like