Google: Invalid price format in property "price"

Hi,

I’m having an error, in the google search console with this URL: https://bottlefulloftaste.com/products/xzens-rosemary-bar-mix-essence-bottle-full-of-taste

I checked the page, and it shows me this error in the product page:

@type”: “Offer”,
“price”: “19,99”,
“priceCurrency”: “EUR”,

If I understand it correct, the problem is the comma instead of the dot in the price.

But how can I change it? I see nothing in shopify to edit this data.

Hi,

If you’re using a Shopify app to generate and manage your JSON-LD data, check the app’s settings or documentation to see if there’s an option to fix the price formatting issue.

If you’re not using an app, you can locate the code for the JSON-LD data in your Shopify store’s theme files. Check the theme.liquid file or the snippets/snip-social-meta-tags.liquid file for the structured data code.

Once you find the code, locate the “price” property and replace the comma with a decimal point in the price value using the code price | money_without_currency | strip_html | remove: '.' | replace: ',', '.'.

Save your changes and check your Google Search Console again to see if the error has been resolved.

I hope this helps!

I found it and changed it in the snippets.

google Search console still complains, but maybe it’s a caching issue. I will test it tomorrow again.

thanks a lot for the fast and detailed help.

And, did this work? I am facing the same issue. Search Console tells me the format is wrong, but the format is not wrong :wink:

Hey! Thanks for the explanation! I did do as you said (see below). But unfortunately, the error keeps poppin’ up. Is there any way you can help me?

Hi!! I hope you’ve figured it out by now but if not: try this!
i had to face the same issue and found a solution.. Maybe it works for you too or someone else:

edit your code as described before - but instead of editing the theme.liquid or social-meta-tags.liquid look if you have the microdata-schema.liquid (this worked for me yours might be called different, depending on your theme i guess)

now search for this line of code:

“price”: {{ product.price_min | money_without_currency | json }},

and edit it to:

“price”: {{ product.price_min | money_without_currency | strip_html | remove: ‘.’ | replace: ‘,’, ‘.’ json }},

I pasted the code that was provided in this thread before and really just tried it at each place in the code that referred to money, currency or price… i made sure to safe the whole code of each section/asset/snippet before i changed ANYTHING and and reload the url in google search console after adding the code which was provided in this thread where this error accured to make sure i can always go back if it doesn’t work and know how to recreate the original code.

I hope this helps and works for you, but even more i hope that you already got it figured out!!