*

Ghany

  • ****
  • 227 posts
GOOGLE RICH SNIPPETS issue
« on: May 14, 2020, 07:17:53 AM »
Hi I am facing issue with Google Rich snippets, in search, console getting errors like Either 'offers', 'review' or 'aggregateRating' should be specified

I can understand that google should no expect ratings for every product,...

<!-- GOOGLE RICH SNIPPETS -->
  <span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="name" content="<?php echo osc_esc_html(osc_item_title()); ?>" />
    <meta itemprop="description" content="<?php echo osc_esc_html(osc_highlight(osc_item_description(), 500)); ?>" />
    <?php if(osc_count_item_resources() > 0) { ?><meta itemprop="image" content="<?php echo osc_resource_url(); ?>" /><?php } ?>
  </span>



it's possible to improve the above code to avoid reviews and offers errors in search console?

Thanks
« Last Edit: May 14, 2020, 12:48:29 PM by abdul »
Unlock the power of visibility without breaking the bank - https://www.adycart.in/

*

MB Themes

Re: GOOGLE RICH SNIPPETS issue
« Reply #1 on: May 14, 2020, 11:26:15 AM »
@abdul
Theme does not contain review, nor sku or other fields.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ghany

  • ****
  • 227 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #2 on: May 14, 2020, 12:49:24 PM »
Then how we can inform the same to Google,  through coding?
Unlock the power of visibility without breaking the bank - https://www.adycart.in/

Re: GOOGLE RICH SNIPPETS issue
« Reply #3 on: May 14, 2020, 11:13:55 PM »
on item.php   <!-- GOOGLE RICH SNIPPETS -->     

'offers' is requiered

'review' or 'aggregateRating' are optional.

Code: [Select]

<!-- GOOGLE RICH SNIPPETS -->
 <span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="name" content="<?php echo osc_esc_html(osc_item_title()); ?>" />
    <meta itemprop="description" content="<?php echo osc_esc_html(osc_highlight(osc_item_description(), 500)); ?>" />
    <?php if(osc_count_item_resources() > 0) { ?><meta itemprop="image" content="<?php echo osc_resource_url(); ?>" /><?php ?>
 
    <span itemprop="offers" itemtype="http://schema.org/Offer" itemscope>   
        <meta itemprop="priceCurrency" content="<?php echo osc_item_currency(); ?>" />
        <meta itemprop="price" content="<?php echo osc_item_formated_price(); ?>.00" />
    </span>
 </span>
« Last Edit: May 14, 2020, 11:17:45 PM by Matias Torres Vsz »

*

Ghany

  • ****
  • 227 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #4 on: May 15, 2020, 02:43:42 AM »
on item.php   <!-- GOOGLE RICH SNIPPETS -->     

'offers' is requiered

'review' or 'aggregateRating' are optional.

Code: [Select]

<!-- GOOGLE RICH SNIPPETS -->
 <span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="name" content="<?php echo osc_esc_html(osc_item_title()); ?>" />
    <meta itemprop="description" content="<?php echo osc_esc_html(osc_highlight(osc_item_description(), 500)); ?>" />
    <?php if(osc_count_item_resources() > 0) { ?><meta itemprop="image" content="<?php echo osc_resource_url(); ?>" /><?php ?>
 
    <span itemprop="offers" itemtype="http://schema.org/Offer" itemscope>   
        <meta itemprop="priceCurrency" content="<?php echo osc_item_currency(); ?>" />
        <meta itemprop="price" content="<?php echo osc_item_formated_price(); ?>.00" />
    </span>
 </span>

Big thank you for your solution, really resolved search console issue, but I am facing issue in the price for other products who updated their prices.
search engine console sending me an error as 14000 $.00  is not a valid price.
is there any other alternatives for the above error?.

what I did is that I removed $ from oc-admin pannel, for google rich snippet it is okay.. but the viewer won't understand what is 14000.
let me know if is there any alternative.
Big thank...
Unlock the power of visibility without breaking the bank - https://www.adycart.in/

Re: GOOGLE RICH SNIPPETS issue
« Reply #5 on: May 16, 2020, 04:32:32 AM »
you can try with some of these

Code: [Select]
<meta itemprop="price" content="<?php echo osc_item_price() / 1000000 ?>.00" />

or


Code: [Select]
<meta itemprop="price" content="<?php echo osc_item_price() / 1000000 ?>" />

on chrome view-source:  you have to get some like this

Code: [Select]
<span itemprop="offers" itemtype="http://schema.org/Offer" itemscope>   
        <meta itemprop="priceCurrency" content="USD" />
        <meta itemprop="price" content="15000.00" />
    </span>

*

Ghany

  • ****
  • 227 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #6 on: May 16, 2020, 07:26:24 AM »
you can try with some of these

Code: [Select]
<meta itemprop="price" content="<?php echo osc_item_price() / 1000000 ?>.00" />

or


Code: [Select]
<meta itemprop="price" content="<?php echo osc_item_price() / 1000000 ?>" />

on chrome view-source:  you have to get some like this

Code: [Select]
<span itemprop="offers" itemtype="http://schema.org/Offer" itemscope>   
        <meta itemprop="priceCurrency" content="USD" />
        <meta itemprop="price" content="15000.00" />
    </span>
Thank you for your efforts on this issue, Sure I will make a try with the above suggestions,...

Unlock the power of visibility without breaking the bank - https://www.adycart.in/

*

pipetko

  • ****
  • 123 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #7 on: August 12, 2020, 01:25:17 PM »
I mean.... Ar they F kiding me...
Google just does not stop with the ********
Is there anyone with solution for all theese. I know that they are not mandatory. In this case mandatory is only quote: offers or review or aggregateRating."

*

bobyrou

  • ****
  • 107 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #8 on: August 18, 2020, 02:10:12 AM »
you can ignore them, wouldn't help prety much at all

*

pipetko

  • ****
  • 123 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #9 on: August 22, 2020, 08:24:45 PM »
you can ignore them, wouldn't help prety much at all
I know that... But it is anoyng... Is there solution ?

*

pipetko

  • ****
  • 123 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #10 on: August 25, 2020, 02:09:00 PM »
on item.php   <!-- GOOGLE RICH SNIPPETS -->     

'offers' is requiered

'review' or 'aggregateRating' are optional.

Code: [Select]

<!-- GOOGLE RICH SNIPPETS -->
 <span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="name" content="<?php echo osc_esc_html(osc_item_title()); ?>" />
    <meta itemprop="description" content="<?php echo osc_esc_html(osc_highlight(osc_item_description(), 500)); ?>" />
    <?php if(osc_count_item_resources() > 0) { ?><meta itemprop="image" content="<?php echo osc_resource_url(); ?>" /><?php ?>
 
    <span itemprop="offers" itemtype="http://schema.org/Offer" itemscope>   
        <meta itemprop="priceCurrency" content="<?php echo osc_item_currency(); ?>" />
        <meta itemprop="price" content="<?php echo osc_item_formated_price(); ?>.00" />
    </span>
 </span>

because of this
    "price": "55.00",
    "priceCurrency": "USD"

It is a quote from schema.org, your code is doing the things wrong.. It puts the price symbol ( for example the symbol for US dollar $ or whathever ) inside the price which is ERROR ( google rich snipet test say the p[rice is not valid ) for google and should not be there.. In other words the price should not be formated

So instead of THIS: <meta itemprop="price" content="<?php echo osc_item_formated_price(); ?>.00" />
USE THIS ==>: <meta itemprop="price" content="<?php echo osc_item_price(); ?>.00" />


P.S. dear developers I think schema and other tags are mandatory to be up to date no matter if the theme does not support the function... It will be just better for google search.... So you should do sometrhing about it... It is not just the "how it looks" but "how it works" too! There are many things that should be fixed ( updated for new Google terms ) in the SEO plugin as well, but..... one year plus still no updates there too.
« Last Edit: August 25, 2020, 02:12:55 PM by pipetko »

*

Arslan Ishaq

  • **
  • 11 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #11 on: November 20, 2020, 04:39:58 AM »
If we want to add aggregate rating as a rich snippet..what would be the code?

*

MB Themes

Re: GOOGLE RICH SNIPPETS issue
« Reply #12 on: November 20, 2020, 08:34:49 AM »
@Arslan
You may find proper code on google pages.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Arslan Ishaq

  • **
  • 11 posts
Re: GOOGLE RICH SNIPPETS issue
« Reply #13 on: November 20, 2020, 02:47:40 PM »
I'm using the user rating plugin, won't it affect the code?
And kindly help I tried to code for osclass but didn't find...

*

MB Themes

Re: GOOGLE RICH SNIPPETS issue
« Reply #14 on: November 21, 2020, 06:35:50 PM »
It has no impact on code
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots