Page 1 of 1

Make social buttons show product picture+details ?

Posted: 02 Feb 2016, 11:24
by joakim
Is it possible to make social buttons set OpenGraph properties with product details?
So they share product picture + details instead of general page details.

Re: Make social buttons show product picture+details ?

Posted: 02 Feb 2016, 11:29
by aimeos
joakim wrote:Is it possible to make social buttons set OpenGraph properties with product details?
So they share product picture + details instead of general page details.
It's currently not possible to share details but you can add the URL to the product picture:
https://aimeos.org/docs/Configuration/C ... l/facebook

What product details do you want to hand over?

Re: Make social buttons show product picture+details ?

Posted: 02 Feb 2016, 13:27
by joakim
aimeos wrote:
joakim wrote:Is it possible to make social buttons set OpenGraph properties with product details?
So they share product picture + details instead of general page details.
It's currently not possible to share details but you can add the URL to the product picture:
https://aimeos.org/docs/Configuration/C ... l/facebook

What product details do you want to hand over?
I would like to use product title as og:title, product description as og:description and product image as og:image

Re: Make social buttons show product picture+details ?

Posted: 02 Feb 2016, 13:51
by aimeos
joakim wrote:I would like to use product title as og:title, product description as og:description and product image as og:image
The URL, product name and product image are already available as parameter for the URLs provided og:title and og:description can be handed over as URL GET parameters: https://aimeos.org/docs/Configuration/C ... l/facebook

Re: Make social buttons show product picture+details ?

Posted: 02 Feb 2016, 14:48
by Metalics
joakim wrote: I would like to use product title as og:title, product description as og:description and product image as og:image
If you are using another tool suçh as "AddThis" or "ShareThis", you can add the following line in layouts/catalog/detail -- header-default.html to use og:image

<?php foreach( $this->detailProductItem->getRefItems( 'media', 'default', 'default' ) as $mediaItem ) : ?>
<meta property="og:image" content="http://www.YOURDOMAIN.com/<?php echo $this->content( $mediaItem->getUrl() ); ?>" />
<?php endforeach; ?>