JSON Price Value Without Comas or Periods

ravey
New Member
2 0 0

Hi, 

My JSON file shows price  3040, when it's $30.40.

Google Shopping is disapproving my products based on the JSON value.

View attached. How can the price value be formatted correctly?

Screen Shot 2020-10-08 at 3.40.07 PM.png

 

0 Likes
EmmanuelFlossie
Shopify Partner
704 23 153

If your prices are with a comma, you need to have 

price | money_without_currency  | strip_html | remove:'.' | replace: ',', '.'

 

if you have prices with a dot, you need to have

price | money_without_currency  | strip_html | remove:',' 

 

 

 

I'm a Google Shopping Specialist & a Google Ads Platinum Product Expert (Only a hand full of Platinum experts in the world!)
Need Premium Data Feed Management Support? Get in touch.
ravey
New Member
2 0 0

@EmmanuelFlossie , There is the word REMOVE in the code you provided. The JSON is removing all "periods," from $30.40 and making it 3040. When Google robots crawl my website they see two prices, one $30.40 and the JSON 3040 (no periods or commas), and Google robot thinks the price is $3,040, and it's flagging my pages as incorrect or double prices and disapproving my ads. 

I'd like the JSOn file to show the exact price thats on the page $30.40 not 3040.

Would your code do that because it has the word "remove?" 

price | money_without_currency  | strip_html | remove:',' 

 

0 Likes
EmmanuelFlossie
Shopify Partner
704 23 153

If your prices decimal is dot, then use the second code, if its a comma use the first code.

From your examples you need to use the second code.

I'm a Google Shopping Specialist & a Google Ads Platinum Product Expert (Only a hand full of Platinum experts in the world!)
Need Premium Data Feed Management Support? Get in touch.