Magento extensions & Pay-as-you-go development

10 years of business 2101 reviews 4.9 average rating
User guide

What are Rich Snippets ?

Rich Snippets is the term used to describe structured data markup that site operators can add to their existing HTML, which in turn allow search engines such as Google to better understand what information is contained on each web page.

The benefits of these Rich Snippets are:

  • Better ranking in the search engines result pages
  • Better visibility of your product information in the result pages of the search engines (price, availability, ratings...)
  • Automatic update of your product data in Google Merchant Center

The Rich Snippets may be built with different markup:

  • Microdata
  • Microformats
  • RDFa
  • JSON-LD (recommended by Google)

The Google Rich Snippets extension allows applying in a few minutes the required structured data to the product pages of your website and taking benefits of the search engine optimizations.

How to use Google Rich Snippets for Magento 2?

Creating a new Rich Snippet template is really easy and quick with the Google Rich Snippets extension.

Go to:
sTORESSETTINGSconfigurationWyomind Rich SNippets manager

Configure the general settings

Enable log reporting

Allows you to activate the log file available under the var/log directory.

The file is named RichSnippetsManager.log.

Create a Rich Snippet template with the wizard

You can create a new Rich Snippet using the template creation tool. 

Name

Give a name to the new Rich Snippet template that you are creating.
This name is only visible in the back-office and doesn't have any incidence on the front-end.

Format

Choose the Rich Snippets format to use:
  • Microdata (HTML)
    The microdata is based on the schema.org syntax and adds invisible HTML tags in your pages that describe their content.
  • Json-LD (recommended by Google)
    Json-LD is a syntax recommended by Google. This syntax is based on JSON and makes the content easy to read for human eyes.

Store view

Select to which store view(s) the Rich Snippet template must apply.

Position

Choose in which part of the page the Rich Snippet template must be applied.
  • Before the product
    That option is not recommended, except if you are using Google Rich Snippet for other purposes than the Rich Snippets management.
  • After the product (recommended)
    All resources that are not necessary to the visitors of your website or for which the payload can be deferred must be placed below the fold (Google Insight recommendations). That's why we suggest placing any Rich Snippets after the product data.

Status

Define if the Rich Snippet is enabled or not.
A template that is not enabled will not have any incidence on the front-end.

Include description

Indicate if the Rich Snippet must include the description of the product or not, if necessary, which attribute must be used.

Include brand

Indicate if the Rich Snippet must include the brand of the product or not, if necessary, which attribute must be used.

Include ratings

Indicate if the Rich Snippet must include the rating of the product or not, if necessary the customer's review as well.

Include offers

Indicate if the Rich Snippet must include the price and the availability of the product.

Include identifier

Indicate if the Rich Snippet must include one or more unique identifiers of the product, and if necessary, which ones must be used from the below:
  • SKU
  • GTIN 8
  • GTIN 13
  • GTIN 14
  • MPN

Once the template is configured, you can click on Create template. The template will be automatically saved in your Rich Snippets templates library. You will then be able to update this template in:
ProductsRich Snippets ManagerMANAGE TEMPLATES

Test the template

Thanks to Google Rich Snippet, you can test the result of the Rich Snippets that are present in your product pages.
To do so you just have to insert the SKU of the product you want to check in the testing tool and then click on GO.

Two links appear:

  • The first link is the one of the product page as you customers see it.
  • The second link is a direct link to the Google testing tool, Google Structured Data Testing Tool: This tool allows you to visualize the Rich Snippets as Google sees them, and if necessary, identify potential errors and fix them.

Refine the Rich Snippets with the editor

The Google Rich Snippets extension creates for you a PHTML template from your settings while creating a Rich Snippet template from:
sTORESSETTINGSconfigurationWyomind Rich SNippets manager

The template is then converted automatically into PHP, HTML, and/or JSON code without any further action from your end.

However, you can edit and update the templates from the editor available in Google Rich Snippets. To do so, go to:
ProductsRich Snippets ManagerMANAGE TEMPLATES

The grid lists all the Rich Snippets available in your library.

Editing the Rich Snippets code requires a good understanding of the PHP code and also a basic knowledge of HTML.

The black box

In order to make the editing of the Rich Snippets easier, the editor includes a toolbox (so-called the "Black Box").

This toolbox allows visualizing several things.

Placeholders

You can check the different placeholders available for the products under Basic product attributes.

Methods

The available methods of the PHP API are listed under Specific methods.

Preview

You can check the result of the Rich Snippets for a given product by adding the SKU of a product in the Preview.

Predefined objects and placeholders usage

When editing a Rich Snippet template, a code editor appears and displays the code used by the Rich Snippets.

The source code of the template uses PHP code samples and placeholders (also called shortcuts) that make the source code editing easier to read and edit.

The syntactic colorization will help you write PHP and HTML code.

Product data

$product is an instance of the Catalog/Product model.

/**
* Catalog product model instance
*
* @var Mage_Catalog_Model_Product
*/
var $product;​

The product attributes are available through the usual methods:
  • $product->getData("attribute_code");
  • $product->getAttributeText("attribute_code");
  • $product->getAttributeCode();


For example:

<?php
// Display a product SKU
echo $product->getSku();
// Display a product NAME
echo $product->getData("name");
// Display a product DESCRIPTION
echo $product->getDescription();
// Display a product MANUFACTURER
echo $product->getAttributeText("manufacturer");


Product attributes are also available through the placeholders as follows:

{{product.attribute_code}}


For example:

<!-- Display the product SKU -->
{{product.sku}}
<!-- Display the product NAME -->
{{product.name}}
<!-- Display the product DESCRIPTION -->
{{product.description}}
<!-- Display the product MANUFACTURER -->
{{product.manufacturer}}

Reviews data

$reviews is an instance of the Review/Review_Collection model.
/**
* Product Review model instance
*
* @var Mage_Review_Model_Review
*/
var $reviews;​​


If you want to iterate through each element of the collection, then you must use a foreach loop, as follows:

foreach($reviews as $review){
...
}

Each review is available through the $review variable and the properties are available through the usual methods:

  • $review->getData("attribute_code");
  • $review->getAttributeCode();


For example:

<?php foreach($reviews as $review): ?>
 <div itemprop="review" itemscope itemtype="http://schema.org/Review">
 <meta itemprop="name" content="<?php echo $review->getTitle(); ?>"/>
 <meta itemprop="author" content="<?php echo $review->getNickName(); ?>"/>
 <meta itemprop="datePublished" content="<?php echo $review->getCreatedAt(); ?>"/>
 <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
  <meta itemprop="ratingValue" content="<?php echo $review->getScore(); ?>"/>
 </div>
  <meta itemprop="description" content="<?php echo $review->getDetail(); ?>" />
 </div>
<?php endforeach; ?>


The data related to the reviews are also available through the placeholders as follows:

{{review.attribute_code}}


For example:

<?php foreach ($reviews as $review): ?>
 <div itemprop="review" itemscope itemtype="http://schema.org/Review">
  <meta itemprop="name" content="{{review.title output='htmlentities($self)'}}" />
  <meta itemprop="author" content="{{review.nickname output='htmlentities($self)'}}" />
  <meta itemprop="datePublished" content="{{review.created_at output='htmlentities($self)'}}">
  <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
   <meta itemprop="ratingValue" content="{{review.score output='htmlentities($self)'}}" />
  </div>
 <meta itemprop="description" content="{{review.detail output='htmlentities($self)'}}" />
 </div>
<?php endforeach; ?>

PHP API usage

Google Rich Snippet offers a few methods that allow to easily access the data related to the products.

Image

Get the image of a product:

/**
* Get product image
* 
* @return Mage_Catalog_Helper_Image|string
*/
$this->getProductImage($product);

Rating and reviews

Get the number of reviews left by the customers for the product:

/**
* Retrieves total reviews
* 
* @return string
*/
$this->getReviewCount();

Get the average rating of the customers for the product:

/**
* Get rating value
* 
* @return float
*/
$this->getRatingValue();

Currency

Get the store view currency:

/**
* Get currency
* 
* @return string
*/
$this->getCurrency();

Availability

Get the product availability:

/**
* Get product availibility
* 
* @return string
*/
$this->getAvailability($product);

Price

Get the product price, the minimal price and the maximum price:

/**
* Get offer price according to product type
* 
* @param string[min|max|NULL] $which
* @return float
*/
$this->getOfferPrice($product, $which = null);

PHP variables

All PHP variables that are initialized in the Rich Snippet editor are available through the {{placeholders}}. 

For example:
<!-- RATING -->
{{ratingValue output='htmlentities($self)'}}
 <?php $reviewCount = $this->getReviewCount(); if({{ratingValue output='htmlentities($self)'}} return "{{ratingValue output='htmlentities($self)'}}";)?>
 <?php if ($reviewCount > 0): ?>
 <?php $ratingValue = $this->getRatingValue(); ?>
 <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
  <meta itemprop="ratingValue" content="{{ratingValue output='htmlentities($self)'}}">
  <meta itemprop="reviewCount" content="{{reviewCount output='htmlentities($self)'}}"/>
 </div>
 <?php endif; ?>

PHP functions in attribute calls

You can use any PHP function to apply in the attribute calls even if the function requires one or more additional arguments, for instance:

{{ratingValue output='htmlentities($self)'}}

Enhance the visibility of your Magento® 2 website in Google's search result pages

100% Easy

Thanks to the creator wizard, you can create new rich snippets templates in no time without any coding knowledge.

100% Customizable

Once the template is created you can edit, update, and customize the rich snippet template to refine the data.

100% Reliable

Use the extension testing tool to check the product page code very simply.

100% Compatible

Our extension allows managing any type of Rich Snippets (JSON-LD, schema.org, RDFa,....) and supports all product types.

Freqently Asked Questions
Pre-sales informations

This extension works with Magento Community Edition and also Magento Enterprise Edition. To know if Google Rich Snippets is compatible with your Magento version, please check the Compatibility tab.

License and domains

A license is valid for an unlimited period of time on one single Magento installation

  • If you're using more than one Magento installation, you will have to buy a separate license for each instance.
  • if you're running several domains on a same Magento installation, you will need only one license for all of them.
Although your license doesn’t have a limited period of validity, your support period does. By purchasing an extension, you’ll be granted a 6-month support period for free. Passed this period, you will have to pay for a new one (see FAQ: Extend your Support period)

You can pre-register your live domain to your license in advance.

Thanks to this option, you'll be able to get the extension ready to use on your domain before it goes live.

To pre-register your production domain: 

  1. Go to:
    mY accountLicenses & DOwnloads
  2. Click on  next to the extension you want your domain to pre-register on.
  3. Click on the link at the bottom of the page saying:
    Do you want to pre-register your domain in order to be ready to go live?
  4. Finally, enter your domain name and click on pre-register now .
Attention, this doesn't mean your license is activated. You'll still have to activate it on your new domain when the extension is installed. 

One license is valid for an unlimited period of time on one Magento installation only. However, it is possible to extend or transfer your license in 2 cases: 

  • If you would like to add your testing environments to your license. 
    In that case, it is possible to extend your license to an unlimited number of domains for free.
    For example: mywebsite-staging.com or mywebsite-dev.com
  • If you want to transfer your license to another live domain.
    In that case, the support period for your license must still be active.

To be able to use Google Rich Snippets on both your production and testing environments, follow the instructions below:

  1. Download Google Rich Snippets.
    (see FAQ: Extensions download)
  2. Install Google Rich Snippets on your environment.
    (see FAQ: Extensions installation)
  3. Activate the license.
    (see FAQ: Extensions activation from the backoffice or Extensions activation from the CLI)

Also, if you are managing a large amount of domains, please contact us so that we can automatically whitelist these domains.
Extension versioning and download

In order to download Google Rich Snippets, log into your Wyomind account:

    1. Go to:
      my accountLicenses & downloads 
    2. Click on the  icon next to Google Rich Snippets.

      A new window opens.

    3. Choose the version of Google Rich Snippets.
      You will be able to choose the most recent version of Google Rich Snippets (for both Magento 1 and Magento 2).
    4. Click on  .

Your download can start.

When purchasing an extension from wyomind.com, you benefit from a lifetime upgrade. You can at any time download the latest version of the extension directly from your account. 

To upgrade Google Rich Snippets, follow the steps below:

  1. Go to:
    my accountLicenses & Downloads
  2. Click on  next to Google Rich Snippets.
  3. Choose the latest version of Google Rich Snippets (for Magento 1 and Magento 2).
  4. Click on download .
  5. Install the new version of Google Rich Snippets to update your Magento admin. 

Extensions Installation/Uninstallation

You can install Google Rich Snippets manually.

  1. Download Google Rich Snippets (zip file) on:
    mY ACCOUNTLicenses & Downloads
     
    Refer to the FAQ: Extensions download
  2. Once Google Rich Snippets is downloaded, open the folder and unzip it.
  3. Copy the content of the unzipped folder and paste all files and directories in your Magento 2 root directory.
  4. In your Command Line Interface, execute:
    bin/magento setup:upgrade 

    If you are using a production mode, execute also:

    bin/magento setup:static-content:deploy  
    bin/magento setup:di:compile  

You can install Google Rich Snippets using Composer software in two cases:

  • if you purchased Google Rich Snippets on Magento Marketplace.
  • if you purchased Google Rich Snippets on Wyomind.com AND requested access to our repository:
    repo.wyomind.com
  1. Add to your composer configuration our repository:
    composer config repositories.wyomind composer https://repo.wyomind.com 

  2. Execute Composer command:
    composer require wyomind/richsnippetsmanager
  3. Then go in your Command Line Interface and execute:
    bin/magento setup:upgrade ​
  4. If you are using a production mode, also execute:
    bin/magento setup:static-content:deploy  ​
    bin/magento setup:di:compile​

To uninstall Google Rich Snippets, start with disabling the extension running the following command:

bin/magento module:disable Wyomind_RichSnippetsManager

Then, you have 2 ways to uninstall the extension depending on how the extension has been previously installed: 

  • Manual installation

    Run the richsnippetsmanager-uninstall.sh file (you can find it in the extension zip folder) from your Magento root directory:

    sh richsnippetsmanager-uninstall.sh

     

  • Installation via Composer

    Run the below command line:

    composer remove wyomind/richsnippetsmanager

Once the uninstallation is over, refresh your cache and enable the compiler back again (if you use it). 

You can install Google Rich Snippets via Web Setup Wizard if you purchased it from Magento Marketplace only.

To know how to proceed, all steps are described in the link below: 
http://docs.magento.com/m2/ce/user_guide/system/component-manager.html

Next step is to activate your license:
Extension activation

Extensions activation

Once Google Rich Snippets is installed, you have to activate the license. For previous versions, you can activate the license from your back-office:

    1. Go to your Magento admin panel. A message pops up at the top of the page.


      If the message doesn't appear then you must check that:

         1. The Adminhtml_Notifications and Wyomind_Core modules are well enabled.
         2. The HTML output of the Adminhtml_Notifications and Wyomind_Core modules are not disabled in:
      storesconfigurationadvanced advanced
         3. The encryption key well exists in app/etc/env.php:
      <?php
       return array(
       'backend' => array(
       'frontName' => 'admin'
       ),
       'crypt' => array(
       'key' => '1e8f3c6772b7a6a6689c3c8cefa4ccf0'
       ),
       /* ... */
       )
      ?>​
    2. Copy your activation key in:
      StoresConfigurationWyomind Your extension

      You can find your activation key in 2 different places:
      In the confirmation email that you received after purchasing Google Rich Snippets.
      In your Wyomind account:My account Licenses & downloads
      Select Google Rich Snippets and click on  .

      A new page opens where you'll find your activation key (see below).


    3. In your Magento admin go to:
      StoresConfigurationWyomind Your extension

      Paste the activation key in the Activation Key field and choose between the automatic (yes) or the manual (no) activation method:
      By choosing Yes, the connection to Wyomind license server will be automatic.
      By choosing No, you will have to log on to Wyomind license server yourself.

    4. Click on Save config .
    5. A message appears at the top of your admin panel. Click on that link: 
      Activate it now!
    6. Copy and paste the license code in the License code field from your admin or simply click on Activate now! 


    7. Finally, refresh your cache, log out and log in back straight after, to complete the installation.

When the extension includes other modules, repeat the steps described above for each one, using the corresponding activation keys (each module has its own activation key).

Add another domain to your license


To activate the license on another domain (test, staging...):

  1. Once the extension is installed on the new domain, copy your activation key in:
    StoresConfigurationWyomind Your extension
  2. After having saved the configuration, a notification appears. Click on Add this domain to my license.

  3. A transfer request will then be sent to our team within an hour.
    Once the request is taken care of, you will receive a confirmation email.
    If your transfer request is accepted, you can use Google Rich Snippets on both environments at the same time.

Note that the order in which you activate your license on your domains does not matter. You can start with your staging/dev/local environment or with your live domain, the process will be the same.

Also, if you have loads of staging domains, or if you are an agency managing load of domains for your customers, please contact us so that we can automatically whitelist these domains.

Once Google Rich Snippets is installed, you have to activate the license.

For this, you can use the below command line (change the Activation key with the corresponding value):

bin/magento wyomind:license:activate Wyomind_RichSnippetsManager <YOUR_ACTIVATION_KEY>

To retrieve the list of all the available modules as well as the licenses status, please use:

bin/magento wyomind:license:status

 Among the different status, you can find: 

  • registered = your license is registered
  • pending = you need to run the activation command line
  • invalidated = the license has been invalidated due to a wrong activation key or a license infringement
 
Check how to add another domain to your license.
Magento® Compatibility

Magento® Open Source

(Magento® Community Edition)

  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4
  • 2.3.7
  • 2.3.6
  • 2.3.5
  • 2.3.4
  • 2.3.3
  • 2.3.2
  • 2.3.1
  • 2.3
  • 2.2.9
  • 2.2.8
  • 2.2.7
  • 2.2.6
  • 2.2.5
  • 2.2.4
  • 2.2.3
  • 2.2.2
  • 2.2.11
  • 2.2.10
  • 2.2.1
  • 2.2
  • 2.1.9
  • 2.1.8
  • 2.1.7
  • 2.1.6
  • 2.1.5
  • 2.1.4
  • 2.1.3
  • 2.1.2
  • 2.1.18
  • 2.1.17
  • 2.1.16
  • 2.1.15
  • 2.1.14
  • 2.1.13
  • 2.1.12
  • 2.1.11
  • 2.1.10
  • 2.1.1
  • 2.1
  • 2.0.9
  • 2.0.8
  • 2.0.7
  • 2.0.6
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.18
  • 2.0.17
  • 2.0.16
  • 2.0.15
  • 2.0.14
  • 2.0.13
  • 2.0.12
  • 2.0.11
  • 2.0.10
  • 2.0.1
  • 2.0

Adobe® Commerce

(Magento® Enterprise Edition)

  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4
  • 2.3.7
  • 2.3.6
  • 2.3.5
  • 2.3.4
  • 2.3.3
  • 2.3.2
  • 2.3.1
  • 2.3
  • 2.2.9
  • 2.2.8
  • 2.2.7
  • 2.2.6
  • 2.2.5
  • 2.2.4
  • 2.2.3
  • 2.2.2
  • 2.2.11
  • 2.2.10
  • 2.2.1
  • 2.2
  • 2.1.9
  • 2.1.8
  • 2.1.7
  • 2.1.6
  • 2.1.5
  • 2.1.4
  • 2.1.3
  • 2.1.2
  • 2.1.18
  • 2.1.17
  • 2.1.16
  • 2.1.15
  • 2.1.14
  • 2.1.13
  • 2.1.12
  • 2.1.11
  • 2.1.10
  • 2.1.1
  • 2.1
  • 2.0.9
  • 2.0.8
  • 2.0.7
  • 2.0.6
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.18
  • 2.0.17
  • 2.0.16
  • 2.0.15
  • 2.0.14
  • 2.0.13
  • 2.0.12
  • 2.0.11
  • 2.0.10
  • 2.0.1
  • 2.0
User's reviews
Log into your account to leave your review and get up to 3 months of free support.

6th June 2018

The BEST rich snippet extension out there by far! (and we tried quite a few)!

For months we've been looking for a rich snippet extension that will easily allow us to have full control. Been searching up and down the web for something that is easy enough to use and extremely powerful with no luck. Until we got in touch with Wyomind and told us that they are working on an extension which will just do that! We decided to wait! And all this waiting worth every day/hour/second! Finally out! Using this extension we were able to fix lots of issues in our Google merchant center and we are not tied up on what more we can do with it - the sky is the limit! Not to mention the support from Aurelie which is top notch every time we have a question or problem. Extremely fast response and helpful advice! I can't fault this company. Their support is just like next door and will answer any query in no time! For any Magento 2 extensions we need they are the first to look first! Thank you so much Wyomind for making our life so much easier!

Changelog
  • Compatibility with PHTML minification
  • The rendering of offers for configurable products has been modified in the default template
  • The way prices are retrieved has changed for grouped products:
        min provides the price of the cheapest child product
        max provides the price of the most expensive child product
        sum (or any other keyword) provides the sum of the prices of the children

Enhancement

  • Scenario updated for the demo

Enhancement

  • Improved license management system (Clear code)
  • Fix for the demo store
  • Fix for the display of "Be the first to review this product" on the products pages

Enhancements

  • Scenario added for sample data

Enhancement

  • Children products are available in the offers
  • Compatibility with PHP 7.2
  • Compatibility fix for Magento 2.3.3

Enhancements

  • Sample data available for the demo

First Release for Magento 2

Patch v1.0.0.8

  • Fix on permissions

Patch v1.0.0.7

  • Fix to secure the Echo in the templates

Patch v1.0.0.6

  • User permissions update

Patch v1.0.0.5

  • Check on the module installation directory

Patch v1.0.0.4

  • Fix on files

Patch v1.0.0.3

  • Minor fix

Patch v1.0.0.2

  • Fix for the compilation

Patch v1.0.0.1

  • Fix on the typo

Demo store
Front-end
Back-end
Login
GoogleRichSnippets
Password
GoogleRichSnippets123

Stay tuned and get a coupon code of 10% off any purchase while creating your account!

Subscribe now for updates, promotions and products launch twice a month at most.

Please indicate a valid email