Invalid floating point number in property "price"

Topic summary

A Shopify store owner encountered a Google Rich Results error: the product price property incorrectly included a currency symbol ($), violating structured data requirements.

Root Cause:
The theme’s microdata formatting (in snippets/product-form.liquid) used itemprop="price" on an H2 element displaying prices with the | money filter, which outputs currency symbols.

Solution Implemented:

  • Removed microdata attributes from the visible price display element
  • Added a hidden <meta itemprop="price"> tag using the money_without_currency filter to output numeric values only (e.g., “21.95” instead of “$21.95”)
  • Maintained the priceCurrency meta tag for proper schema markup

Outcome:
After applying the code changes, Google Search Console validation confirmed the issue was resolved. The store owner expressed interest in hiring the developer for future work, including a potential theme upgrade to a newer Palo Alto version.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Looking for a web developer who can help me with my theme to edit some code to help with some invalid merchant listings.

Page Mill Design 6/7/18 Palo Alto (V2.1.6)

https://search.google.com/test/rich-results/result?id=ecCnEvFVf5NNAxHxiy9qtg

1 Like

Hi @MANDUST23

Please give me Collaborator request code of your store so I can check and help you to solve it.

9260 - Thanks Dan!

The price property should not include the $ sign:

This is invalid:

## $21.95

This is fine:

## 21.95

Your current code in sections/product-template.liquid most probably looks similar to

## 
  {{ product.selected_or_first_available_variant.price | money }}

You can change it to

## 
  {{ product.selected_or_first_available_variant.price | money }}

Here I’ve moved microdata away from the ProductPrice element into hidden meta tag.

Your theme is old and microdata requirements has changed since it was last updated…

Thanks, Tim.

I’ve been trying to find## $21.95
in my backend code but can’t!

Is it possible an updated theme would solve this issue or do I need to edit
the current code?

Is this something you could help me with?

Thanks,
Steve

of course theme code would have no $21.95 – there should be a variable to be replaced by the actual product price by shopify engine – so your marker would be id=“ProductPrice” or simply search for ProductPrice…

the code should look similar to what I’ve pasted above under *"*Your current code in sections/product-template.liquid most probably looks similar to" – not the variable reference inside {{ … }}.

Yes, current theme version will have it fixed, however, updating to current version would be a project since it may become complex.

Yes, I can help with the actual edit – account request is sent.

1 Like

Thanks, Tim.

Is all I can find on sections/product-template.liquid

I can imagine a theme update could be a larger task. I’m a little nervous to give access to my store, this is my first time asking for help. Can you walk me through how to do it? How to test it? I don’t want to sacrifice a large site breakdown for a small change…if you get what I’m saying?

Thanks, Tim.

Just replied - as I am hesitant to give store access as a first timer
looking for help.

That being said, if you can walk me through this small coding edit, would
you be open to quoting me for upgrading mandust.ca to
https://themes.shopify.com/themes/palo-alto/styles/vibrant?locale=en&surface_detail=designers&surface_inter_position=1&surface_intra_position=2&surface_type=designers
?

Just tossing it out there, not sure what kind of work you are looking for.

Thanks,
Steve

Based on this screenshot I can see that the target piece of code is inside snippets/product-form.liquid

If you’re nervous, you can still give me access, but only to themes (as I would request anyway) and read-only – this way I’d be able to see the code, but not change it.

1 Like

Got it, think I’ve got it now! Thanks, Tim.

Ok, so here is the wanted code from the snippets/product-form.liquid:

Not quite the same as I guessed above, but anyways.

This is what it needs to look like:

{% comment %}
    Prices
    {% endcomment %}
    ## 
        {% if current_variant.compare_at_price %}
            ~~{{ current_variant.compare_at_price | money }}~~
        {% endif %}
        {{ current_variant.price | money }}
    
    

Here we’re removing the microdata formatting from the H2 element (no longer has itemprop=“price”) and create a separate which we designate as price. Note that for meta content we’re using filter money_without_currency which we expect to not output the dollar sign.

1 Like

Thanks, Tim.

I’ve hopped in and replaced the code you suggested - feel free to have a look and confirm if you have a moment. Waiting now for validation from GSC, said it could be a few days. Thanks again.

Well, you can re-test it in Rich results test, https://search.google.com/test/rich-results, like you’ve done initially
https://search.google.com/test/rich-results/result?id=4Rv-RjxQ5OmFrk3D9ZjAKA

1 Like

Thanks, Tim. As far as I can see, all looks good and functions OK so far. I’ll keep an eye on GSC for updated results.

Hey, Tim.

Received the official OK today - awesome support, thanks again. I really appreciated your communication on the back & forth. Would you be open to taking on any additional work?

Yes, my e-mail is in my signature.