Post by upgrader » Mon Dec 08, 2014 9:47 pm

For anyone else with the same problem I stated above, try the following.

In the "z-google-rich-snippets-2.xml" file

Find on line 37

Code: Select all

<add><![CDATA[<div><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><img src="catalog/view/theme/default/image/stars-<?php echo round($rating); ?>.png" alt="<?php echo round($rating,1); ?>" title="<?php echo round($rating,1).'* ('.$reviews.') '; ?>" /> (<span itemprop="ratingValue"><?php echo round($rating,1); ?></span>/5)]]></add>
and change to

Code: Select all

<add><![CDATA[<div><?if($product_info['rating']):?><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><img src="catalog/view/theme/default/image/stars-<?php echo round($rating); ?>.png" alt="<?php echo round($rating,1); ?>" title="<?php echo round($rating,1).'* ('.$reviews.') '; ?>" /> (<span itemprop="ratingValue"><?php echo round($rating,1); ?></span>/5)<?endif?>]]></add>
Then on line 41 find

Code: Select all

<add><![CDATA[<span itemprop="reviewCount"><?php echo $reviews; ?></span>]]></add>
and change to

Code: Select all

<add><![CDATA[<?if($product_info['rating']):?><span itemprop="reviewCount"><?endif?><?php echo $reviews; ?></span>]]></add>
Now if product has no reviews, then no rich snippet review code will be shown in source code.
Hope it helps others.

Newbie

Posts

Joined
Sat Dec 06, 2014 11:58 pm

Post by mrwell » Sun Dec 14, 2014 9:52 pm

Hello @tik
I've been trying to get your usefull extention to work, no luck.
I get this in my log file and tried to work things out by myself, does not work:


12-14 13:05:48 ~ IP : 2.26.87.26 ----------
MOD DETAILS:
modFile : ............/vqmod/xml/custom_image_titles.xml
id : Add custom titles and alternative messages for all product and category images together with image sort order
version : 2.5.0
vqmver : 2.3.2
author : bull5-i

File Name : catalog/view/theme/*/template/product/product.tpl(0)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>

MOD DETAILS:
modFile : ........./vqmod/xml/z-google-rich-snippets-2.xml
id : @tik Google Rich Snippets p2
version : 1.9.9
vqmver : 2.4.1
author : OC2PS

File Name : catalog/view/theme/*/template/product/product.tpl(2)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): src="<?php echo $thumb; ?>"

----------------------------------------------------------------------


---------- Date: 2014-12-14 13:05:49 ~ IP : 2.26.87.26 ----------
REQUEST URI : /index.php?route=product/product/review&product_id=78
MOD DETAILS:
modFile : ......../vqmod/xml/z-google-rich-snippets-2.xml
id : @tik Google Rich Snippets p2
version : 1.9.9
vqmver : 2.4.1
author : OC2PS

File Name : catalog/view/theme/*/template/product/review.tpl(4)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): <img src="catalog/view/theme/default/image/stars-<?php echo $review['rating'] . '.png'; ?>" alt="<?php echo $review['reviews']; ?>" />

----------------------------------------------------------------------


---------- Date: 2014-12-14 13:05:50 ~ IP : 2.26.87.26 ----------
REQUEST URI : /
MOD DETAILS:
modFile : ....../vqmod/xml/z-google-rich-snippets-2.xml
id : @tik Google Rich Snippets p2
version : 1.9.9
vqmver : 2.4.1
author : OC2PS

File Name : catalog/view/theme/*/template/module/latest.tpl(0)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): stars-<?php echo $product['rating']; ?>.png"

How can I get it fixed with your help?
Thank you.

New member

Posts

Joined
Wed Jun 29, 2011 6:16 am

Post by Khal » Fri Jan 23, 2015 10:15 pm

Hi

Great extension- thanks for making it free. I had it on my old site, but I've recently switched to OC2.0.1.1. Just wondering if you have any plans to make a version compatible with OC 2.0.1.1?

Many thanks

https:KhaleejiAbaya.Com
OC 2.0.1.1


Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by zaidladha » Mon Mar 30, 2015 8:58 am

Hi,
any ideas? on checkout I get this error when it gets to shipping method
:
Fatal error: Call to a member function getElementsByTagName() on a non-object in /var/www/html/catalog/model/shipping/canada_post_ws_rest.class.php on line 161

New member

Posts

Joined
Wed Jun 05, 2013 3:07 pm

Post by stokeyblokey » Tue May 12, 2015 12:06 am

I had lots of errors in Webmaster Tools about the reviews when using this mod (only started giving errors recently) - to fix it I changed line 37 like so:

Code: Select all

<add><![CDATA[<div><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><img src="catalog/view/theme/default/image/stars-<?php echo round($rating); ?>.png" alt="<?php echo round($rating,1); ?>" title="<?php echo round($rating,1).'* ('.$reviews.') '; ?>" /> <meta itemprop="worstRating" content="0"/>
<meta itemprop="bestRating" content="5" /> (<span itemprop="ratingValue"><?php echo round($rating,1); ?></span>/5)]]></add>
This fixes the "failed to normalize the rating value" error by defining worst rating as 0 and sets min and max rating values to remove the other error.

Hope this is right, and that it helps someone!

Stokey

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by zzzxxccvvv » Sat May 23, 2015 12:51 pm

Hi,

thank you for this great extension.

I have a question. Is there a way to stop google showing the price in the results? I don't want the customers to see the price from google search page.

Regards,

Newbie

Posts

Joined
Fri Oct 24, 2014 12:23 am

Post by jonidfld » Sat Jun 13, 2015 9:49 pm

@stokeyblokey

Thanks - this worked perfectly for me!

Newbie

Posts

Joined
Wed Apr 11, 2012 8:44 pm

Post by chibao » Thu Dec 24, 2015 7:00 pm

I have question that I would like to remove reviews and stars on Google search by hiding star and reviews in opencart, is this possible?
If not, is there any way to hide it on Google search because my store just opened and there's no one come and review.

Newbie

Posts

Joined
Thu Dec 24, 2015 6:56 pm

Post by skyline1983 » Mon May 23, 2016 3:46 pm

Can you help me to customyze module? product type is unknown!

Newbie

Posts

Joined
Mon May 23, 2016 3:35 pm

Post by i2Paq » Thu May 26, 2016 4:28 am

Any update for 2.2?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

UPGRADE to 2.x: Contemplate before thou begins!

Our FREE search: Find your answer FAST!.

BUGs?: Known BUGS for All OC Versions.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by skip » Mon Dec 05, 2016 6:43 am

OC 2.0.2.0, vQmod 2.5.1, Default theme

what does this mean ? I dont see download, only donate link, sory if I wass missed something

Active Member

Posts

Joined
Mon May 09, 2011 9:57 pm

Post by Dunald » Fri Jan 06, 2017 5:10 am

Hi!
Can the product image show in Google result when using this vqmod?

Active Member

Posts

Joined
Tue Mar 15, 2011 9:05 pm
Who is online

Users browsing this forum: No registered users and 9 guests