Post by zaidladha » Mon Jun 05, 2023 12:07 pm

Hi,
I am looking at several hundred critical errors from Google regarding the rich snippets for items with prices over $1,000 (as they include a comma). The SEO module I have doesn't seem to take that into account or there appears to be an extra set of quotation marks? I have reached out to the developer but was hoping to get some quicker help here.

I am thinking it's this line that's causing the issue:
<meta itemprop="price" content="<?php echo $special ? $special : $price; ?>">


I have tried this one with no luck:
<meta itemprop="price" content="<?php if (!$special) { echo preg_replace('/[^0-9.]+/','',$price);}else{echo preg_replace('/[^0-9.]+/','',$special);} ?>">


Edit: Opencart 2.3.0.2

Google error: Invalid floating point number in property "price"
e.g. <meta itemprop="price" content="1,171.67" "

URL:https://www.stevestonmarine.com/heater- ... ing-system

Active Member

Posts

Joined
Wed Jun 05, 2013 3:07 pm

Post by ADD Creative » Mon Jun 05, 2023 4:58 pm

Make sure you refresh your modifications when trying your change.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Jun 05, 2023 7:38 pm

As above it looks like you're on the right lines but perhaps your cache isn't clearing. You should be making any changes with a vQmod or OCMOD really.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 157 guests