Search results shows incorrect compare-at-price on some products

Topic summary

A Shopify store is experiencing incorrect compare-at-price displays on search results and collection pages. Some products show drastically wrong values (e.g., $3,199 appearing as $3.00) while others display correctly, despite all products being configured identically in the admin panel.

Root Cause Identified:

  • The collection and search pages were pulling prices from a custom metafield instead of the standard product compare-at-price field
  • The metafield cannot handle formatting characters like commas
  • When the metafield contained “3,199”, only the first number before the comma was displayed ($3.00)

Solution:
Removing the comma from the metafield value resolved the display issue.

Recommended Next Steps:

  • Reconfigure the metafield definition to accept only numeric values
  • Consider using Shopify Flow or the Mechanic app to automate price synchronization and validate metafield data
Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

If someone search for a product the search results page will show the incorrect compare-at-price on some but not all products.

I also have this issues on some collection pages.

For example, I have a product that compare-at-price is set at $3,199 the sale price at $2,299. But what is displayed is Compare-at-price $3.00 and sale price $2,299.

Hi @sunlighten-us ,

This could be a result of incorrect use of liquid filters. One would have to take a close look at the code.

What you can do in the meantime is make sure that the compare at price is accurate in admin > product details.

Lastly checking for any scripts that run on collection pages to eliminate that being the cause.

1 Like

yes the compare-at-price is accurate in the product details.

I’ll take a look at the code and see if anything might be causing that. It seems so weird that it works on other products through. My screenshot shows 2 products that it displays fine, and the 1 not. All products are configured the same…to my knowledge.

It turns out there was a meta field created and the collection and search page was looking for the compare price meta field. On top of that the meta field can’t have any other characters other than numbers or it will only display the first number.

Example: meta field = 3,199 and displayed $3.00. Remove the comma and the price showed correctly.

2 Likes

You’ll probably want to look at redo the metafield definition to enforce accepting only numbers.

And or using shopify-flow, or the mechanic app, to automate keeping compare prices in sync or to test for metafields that have characters other than numbers.