Forums / Strategies for Advertising my Online Store / Implementing Google Rich Snippets.

Implementing Google Rich Snippets.

Locked

Views: 18,975

Results 81 to 100 of 100
This thread is locked. New replies are disabled.
4 Apr 2013, 3:06 PM
#81
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Implementing Google Rich Snippets.

Looked at the page source, and no issues are jumping out at me. Of course, I could be missing something. Maybe a fresh set of eyes can catch something I'm missing. Here's a product page:

http://www.rescoccc.com/index.php?main_page=product_info&products_id=1370

The best way to learn is to try stuff. But, back it up first.

4 Apr 2013, 4:03 PM
#82
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,864
Plugin Contributions:
18

Re: Implementing Google Rich Snippets.

RescoCCC:

Looked at the page source, and no issues are jumping out at me. Of course, I could be missing something. Maybe a fresh set of eyes can catch something I'm missing. Here's a product page:You have six errors on the page plus some warnings. Most of them will go away if you fix the double </form> problem.
Use tidy html with Firefox to see the problem.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

4 Apr 2013, 5:28 PM
#83
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Implementing Google Rich Snippets.

Cleaned it up with html tidy. The errors weren't causing the issue.

The best way to learn is to try stuff. But, back it up first.

5 Apr 2013, 1:15 AM
#84
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,864
Plugin Contributions:
18

Re: Implementing Google Rich Snippets.

Still has the </form> error, two others, and 71 warnings. Don't just check the frame on the page or you'll miss the page errors.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

5 Apr 2013, 1:29 AM
#85
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Implementing Google Rich Snippets.

It still has the errors because I put the original file back. The sanitized version screwed up the formatting in IE8. The rich snippets problem is not caused by the errors.

The best way to learn is to try stuff. But, back it up first.

16 Mar 2014, 12:15 PM
#86
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

I am trying to add Google rich snippets to my site.

Please can you tell me if an actual product image will show in the Google testing tool if I have coded this correctly ?

I am not getting an image showing. Although under rdfa-node it shows a url for an image. Has my Google snipped coding worked or not ?

rdfa-node
relationship:
name: image_src
href: http://www.xxxxx.co.uk/shop/images/M150%2000139.jpg

I have no html knowledge and am just following the instructions.

28 Dec 2014, 3:11 PM
#88
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

I originally had coded the first option from Melanies "customizing-google-snippets-with-schema-org-microdata" to give google images for my products. But although I got no errors in googles testing tool. For months google seems to have ignored my rich snippets (also I have cross selling on my website) so there were a lot more images I didnt need appearing for some of the products.

I thought that I would rework the coding and try the 2nd image option mentioned by Melanie ...

Second Option In includes/templates/your_template/tpl_modules_main_product_image.php
find 2 instances of
<span class="imgLink">
and change to
<span itemprop="image" class="imgLink">

Im having problems because I dont have 2 instances of <span class="ImgLink"> to change. There is only one instance. Please could someone tell me what changes to make to the coding to get my main product image url displayed in rich snippets instead of the wording "larger image".

This is currently the display Im getting in the google testing tool

And this is my coding for tpl_modules_main_product_image.php.

<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $ */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> <div id="productMainImage" class="centeredContent back"> <script language="javascript" type="text/javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span itemprop="image" class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span itemprop="image">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </noscript> </div>

18 Jan 2015, 12:25 PM
#89
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

I used Melanie's code as well, and everything is working great except the images. I am getting several (8-10) image results fro Rich Snippets that are showing up in my Google Webmaster section, but all of the images are the template buttons... images like 'next', 'add to cart', etc.. things like that... I would like some help with Rich Snippets code as well. I can't get the Google Tools Rich Snippets Highlighter Tool to recognize the structure of my site. Any help would be greatly appreciated.. Thanks!!

31 Jan 2015, 1:30 AM
#90
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Implementing Google Rich Snippets.

In order to only pull the main product image for example, you have to programmatically query it first and the framework just isn't in the core to do so easily.

My instructions, if done correctly should ONLY pull product images, not that includes cross sell, additional images etc... but no other types of images would be pulled.

To build the framework to pull it, a challenge. I suggest you install NUMINIX's Facebook OpenGraph and use the query for the product image which they already built =)

~Melanie

1 Feb 2015, 9:46 PM
#91
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

mprough, thanks for the great tutorial on your site!,, and thanks for the reply. There are many people taking advantage of it, and if they are like me, they appreciate it very much. I was able to solve my problem of my template images showing up by > 1.) Delete the itemprop="image" anywhere used in your html_output.php file

2.) Copy/paste in the reply to this the lines that have zen_image in your product_listing.php, additional_images.php and tpl_modules_main_product_image.phpas told to me by "bislewl" here on the ZenCart forum. Also, as far as my 'condition' creating an error, I was told that I have to use schema.org and not data-vocabulary.org.... Here's part of what I was told in the Google Webmasters Forum
If you are using some properties from data-vocabulary.org, (and examples {that I gave to them in this particular thread} did use data-vocabulary.org), that** would create issues with validation..... in addition to itemCondition, currency 'in the example you used is' a data-vocabulary.org property, the correct property for schema is priceCurrency.

Another example, for availability, the proper way to markup with schema is linking to schema.org/InStock, see below.

<link itemprop="availability" href="http://schema.org/InStock"/> For itemCondition you must link to appropriate type if using schema markup, see below. <link itemprop="itemCondition" href="http://schema.org/DamagedCondition"/> <link itemprop="itemCondition" href="http://schema.org/NewCondition"/> <link itemprop="itemCondition" href="http://schema.org/RefurbishedCondition"/> <link itemprop="itemCondition" href="http://schema.org/UsedCondition"/> Quotes from JML

Anyway, I hope this helps if anyone else is having the same problems.

1 Feb 2015, 10:53 PM
#92
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

NOTE: I should have mentioned this in the above post.. I am ONLY getting my '_med' and my 'additional' images.. and not the main image.. which in my case, I'm happy. The _med has the same file name, except for the "_med" . I will work on getting my main image later, but like I said, most of my markup is showing up in my Google Webmasters Testing Tool..

2 Feb 2015, 2:43 PM
#93
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Implementing Google Rich Snippets.

Hello,

There are many ways to include the image, the OpenGraph module is far easiest =)
People make many changes in the product images, not withstanding modules such as lightboxes and ImageHandler. The tutorial is basically written for a Vanilla Zen Cart.

However, the bit about data-vocabulary.org isn't accurate, see here

~Melanie

2 Feb 2015, 4:32 PM
#94
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

Thanks Melanie, that's why I come to the ZenCart Forum. You guys and girls are the best, and really know your stuff.. Yea, my template is highly modified, and I can't write or understand PHP; that's why I have such a problem implementing some things people tell me or show me; but, my markup data is showing up in my Webmasters Testing Tools with zero errors, so I'm happy. I am going to use your markup example(s) on my other sites as well, now that I have it working on one. Hope you have a GREEEATday!!! and once again, thanks for putting the time into helping me, and others.

28 Nov 2019, 11:02 AM
#95
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

Google Structured Data Tester continually throws errors when marking up 'articles' in EZ pages when links are included in the 'article body' ..... because of the commas ( " ) used in <a href="http://domain">anchor</a> which also includes those used for image source when images are included. The use of commas in JSON-LD markup suggests a 'tag'

Markdown used for links [anchor]****(link address) would eliminate this issue because commas are not used- how can Markdown be incorporated in Zen Cart?

cheers,
Mike

28 Nov 2019, 1:54 PM
#96
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Implementing Google Rich Snippets.

When you say "commas" do you actually mean "double quotes?" Because otherwise I am completely confused by what you are saying.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

28 Nov 2019, 8:41 PM
#97
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

swguy:

When you say "commas" do you actually mean "double quotes?" Because otherwise I am completely confused by what you are saying.
Sorry about that chief .... yes "double quotes".

28 Nov 2019, 8:46 PM
#98
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Implementing Google Rich Snippets.

ok so next question: why is the structured data tester looking at your article body? It should be looking at the JSON data within the open and closing script tags.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

28 Nov 2019, 10:31 PM
#99
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

swguy:

ok so next question: why is the structured data tester looking at your article body? It should be looking at the JSON data within the open and closing script tags.

It is looking at the JSON data between opening and closing tags - "articleBody": is a tag or member within the script opening and closing tags and it is within the opening and closing quotation marks for this member that it is finding quotation marks for links/image locations ..........

So these are E-Z pages .... articles that I have written on the site. The structured data plugin I am using (Super Data by Melanie Prough) only marks up products - I want my articles marked up in an effort to have them qualify for rich snippets in SERP's and in general be prominent in Google.

The Google Markup Helper, nominating 'article' does not include all the necessary tags (have no idea why not) - so I add the generated html to the page and the pages end up in Google Search console as 'Unparsable structured data' and in the report show a number of errors and warnings ("headline", "date modified" and a couple of other tags 'missing and required'.

So I add the required tags manually having looked up the JSON-LD data requirements. This eliminates all the errors except this one;

Parsing error: Missing '}' or object member name
Through research of a number of forums and trial and error I found that by deleting any URL links within the article body the above error disappeared and the test passed with flying colors. The assumption is that the bot sees a quotation between the opening and closing marks that is not related to a 'tag' (member name) so it throws the error.

So the result is that the 'marked up' JSON-LD data for the article does not include any links or images which seems counterproductive. Now my understanding of the purpose of structured data markup is that it gives Google a 'good idea of what is contained on the page' in a concise set of data to reduce crawling time .... and that its other purpose is to use that data for 'rich snippets' ..... both are important for SEO but it is the latter that is most important for maximizing potential exposure.

*note: the same error appears on product pages if you mark them up manually (something I did on a few products for 'reviews' before the latest version of Super Data took care of that - no reason to do that now) - the reason for mentioning this is that it is probable that Melanie in her development of her plugin has obviated the problem in that for products that I have that have links in the descriptions I am not getting any parsing errors.

cheers,
Mike

28 Nov 2019, 11:08 PM
#100
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Implementing Google Rich Snippets.

here is the script I use - when completed it tests fine (as 'article') ;

<!-- JSON-LD markup generated by Google Structured Data Markup Helper. --> <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Article", "mainEntityOfPage":{ "@type":"WebPage" }, "name" : " ", "author" : { "@type" : "Person", "name" : "Mike" }, "datePublished" : " ", "dateModified" : " ", "headline" : " ", "image" : " ", "articleSection" : " ", "articleBody" : " ", "publisher" : { "@type" : "Organization", "name" : "site name", "logo": { "@type": "ImageObject", "url": "sitename/includes/templates/westminster_new/images/logo.png" } } } </script>