<meta property="og:url" content="<?php echo "http://". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];?>"/>
<meta property="og:description" content=""/>
<meta property="og:title" content=""/>
<meta property="og:image" content=""/>
I've tested with the head.phtml
file,but I don't know how to get product attributes such like sku
, color
and images
.
I tested with $this->helper('catalog/image')->init($_product, 'image')
found in
media.phtml
on meta tag and get a blank page,but images on product view are working fine.
That confuses me a lot.
Best Answer
You need to can add this to one of your layout files:
Now you need to create the file
opengraph/product.phtml
inside you theme (app/design/frontend/{package}/{theme}/template/
) with the following content:If you need to include the
sku
orcolor
in there you can get them like this:Clear the cache when you are done.