Osclass Support Forums

Osclass theme support => Alpha Osclass Theme => Topic started by: Mindaugas on February 07, 2023, 04:58:24 PM

Title: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: Mindaugas on February 07, 2023, 04:58:24 PM
Hello,

How to fix error in shema.org code - either "priceCurrency" or "priceSpecification.priceCurrency" should be specified (error from Google Console)???  This error appears on ads url that do not have a price listed (no price, "Deal").

Example of shema.org generated code in page:
Code: [Select]
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "SENŲ 8MM KINO JUOSTOS PERRAŠYMAS - SKENAVIMAS",
  "image": "https://www.domain.org/oc-content/uploads/1/309.webp",
  "description": "Kita - Klaipėdos miesto savivaldybė - Klaipėda - Profesionalus senų 8mm kino juostų perrašymas pakadriui (skenuojant po vieną kadrą) į šiuolaikinį HD 1080 formatą. Radę ...",
  "brand": "Osclass",
    "offers": {
    "@type": "Offer",
    "itemOffered": "SENŲ 8MM KINO JUOSTOS PERRAŠYMAS - SKENAVIMAS",
    "url": "https://www.domain.org/services/office-services/kita/kita-in-lietuva-klaipedos-miesto-savivaldybe-klaipeda_s158",
        "price": "0",
    "priceValidUntil": "2022-10-13",
    "availability": "https://schema.org/InStock"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "0",
    "bestRating": "5",
    "worstRating": "0",
    "ratingCount": "1",
    "reviewCount": "1"
  }
  }
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: MB Themes on February 09, 2023, 03:23:40 PM
I see.
What is currency of item that is "Free" ?
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: Mindaugas on February 09, 2023, 05:46:04 PM
In ads content no price - its "deal" option ('Check with seller'). Structured data code should be generated accordingly?!? Which module is responsible for generating shema.org code?
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: MB Themes on February 10, 2023, 01:25:23 PM
It does not make sense. Free listing does not have currency code at all. What is currency of free listing?
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: KaloSex on February 16, 2023, 03:42:33 PM
it may doesnt make sense, but i face exactly the same problem. The console mark it as site problem so this code must be added: "priceCurrency": "EUR"
on the "offers": {

I am using delta theme, which file do i have to edit to fix it?
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: MB Themes on February 16, 2023, 08:04:01 PM
Put there whatever if you just want to satisfy validation tool and makes you happy.
Check item.php
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: KaloSex on February 17, 2023, 09:21:29 AM
Put there whatever if you just want to satisfy validation tool and makes you happy.
Check item.php

My brother, with your response " if you just want to satisfy validation tool" it makes it look like we are some weirdos. I work many years on SEO on casinos sector. Since you decide, that when we disable price, you still create the structure of priceoffer and you set it to "0" (which means no price), you still need to define currency - it's just how it is. It's not to satisfy google validator. It's to satisfy the guidelines of GOOGLE, so it doesn't count it as error on your site, so you can position as good as you can on their search results.

Anyway its easily fixed by adding one line on the oc-includes\osclass\scructure-data.php if anyone wonders.

Thank you!
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: Mohammad Quaid MJ on January 20, 2024, 04:06:35 PM
Kindly give us that one line of code to satisfy Google.
Title: Re: Either "priceCurrency" or "priceSpecification.priceCurrency" should be specified
Post by: MB Themes on January 20, 2024, 09:59:50 PM
You may update oc-includes/osclass/structured_data.php based on your needs.