Google+ Sharing Product Image on PrestaShop

Only the logo was sharing with Google Plus on PrestaShop site product’s page. Facebook was sharing images just OK. Here’s how to fix Google+ sharing of products.

Google recommends schema.org microdata (and uses it as preferred option) to share images. So we should just put:

<body itemscope itemtype="http://schema.org/Product">
<img itemprop="image" src="image-url"></img>

I’m adding itemscope itemtype="http://schema.org/Product" to the body tag. Then in my template on product.tpl I’m adding itemprop="image" to my product image codes. Like

<img itemprop="image" src="{$link->getImageLink($product...

And now Google+ takes product image to share.

It may be useful to add another hidden image in the footer, for sharing on pages which are not product pages, if your default sharing image is not so good.

Share:
This entry was posted in PrestaShop and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *