How to fix my microdata / Rich Snippets problems ?
Introduction about structured data markup (microdata or rich snippets)
Structured data markup is a machine-readable representation of your product data directly on your site. The markup that's added to your HTML helps Google and other search engines understand and process your content reliably. Learn more about setting up structured data for Merchant Center on your site.
Structured data markup is used by Google for 2 main reasons:
- To enrich your results in Google's search engine, with additional information such as price, availability, number of ratings and ratings average (with stars in a visual way).
- For a faster consistency check between information that is in the feed you submited in Google Merchant Center and the one available in your website. Indeed, when you submit a products data feed in Google Merchant Center, Google checks if the feed information is the same than the one in your website, for ensure a maximum of consistency. The markup automates the check process, which makes it faster.
Moreover, this markup is also used by Google to automatically update your products price and availability in Google Shopping. Indeed, if your products price and availability change very frequently (throughout a day for example) and that your products feed is not updated often enough, or if it takes time to be updated due to the volume of data, there may be inconsistency between the information in your feed and your product files on your site. If Google notices this disparity, this may result in the suspension of your Google Merchant Center account. To solve this problem, and provided that your website is properly marked, you can active the "Automatic item updates" option in your Google Merchant Center account, and Google will update itself the products price and availability update, by fetching the information in your website, and this, up to several times a day. This reduces the risk of an account suspension. If too many mismatches occur, however, automatic item updates will stop working and your account will be subject to disapproval. It's up to you to update your feed frequently enough to avoid any problems.
Errors related to a wrong structured data markup of your custom theme
The microdata system is very useful, but you may experience compliance issues between your custom theme, based on the PrestaShop default theme, and the Google prerequisites. This has nothing to do with our module and is only related to your theme.
However, we give you the solution to bring your prices into compliance (in case where your theme generates errors) and no longer have any problem. But, if the error is related to the condition of the products or their availability, please approach your theme editor to solve the problem because this type of error is really related to the specificity of each theme.
So here is the solution to correct a price markup error (if you don't have any technical skill and that you prefer we handle it for you, provided you have our "Customer Ratings and Reviews Pro + Google Rich Snippets" module, don't hesitate to contact us) :
Quite often, your theme template will not correctly implement the markup. Well, for the price to be correctly read by Google, price must be formatted with a dot as separator, not a comma, and must not contain the currency sign (eg: €). In order to solve this problem without changing the price appearence on the product page (comma and currency are useful for user experience), you have to add the "content" property in the markup. Like so :
A price incorrect formatting problem in product.tpl template
Go to the "product.tpl" template. The existing code in the default theme (from which your custom theme is built) is as follows :
<span id="our_price_display" class="price" itemprop="price">{convertPrice price=$productPrice|floatval}</span>
Replace it by this :
<span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span>
A price incorrect formatting problem in product-list.tpl template
Go to the "product-list.tpl" template. The existing code in the default theme (from which your custom theme is built) is as follows :
<span itemprop="price" class="price product-price">
Replace it by this :
<span itemprop="price" class="price product-price" content="{if !$priceDisplay}{$product.price}{else}{$product.price_tax_exc}{/if}">
A problem with the "Products in the same category" PrestaShop module
Go to the "productscategory.tpl" template in the "Products in the same category" module folder. The existing code in the default theme (from which your custom theme is built) is as follows :
<p class="price_display">
<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>
</p>
Replace it by this :
<p class="price_display">
<span class="price" content="{$categoryProduct.displayed_price}">{convertPrice price=$categoryProduct.displayed_price}</span>
</p>
A problem related to the location of "schema.org" HTML tags that surround the "product" object
In some themes, HTML tags of "schema.org" structured data surronding the "product" object (itemtype="http://schema.org/Product") are incorrectly located. Therefore, tags that manage the ratings and reviews rich snippets, included by our module, are out of this markup. Well, according to the "http://schema.org" convention, they must be linked and included in this markup. This non-compliance is detected by Google which will send you an error.
As a reminder, Google offers a tool to test the rich snippets compliance. To know how to use it, please read our FAQ.
In that case, a work of investigation is necessary in the custom theme, in order to correct the localisation of "product" object tags. If you don't have any technical skills, please ask your theme editor to solve the problem or, if you have our "Customer Ratings and Reviews Pro + Google Rich Snippets" module, contact us.