What's New
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.
Dear all ,
When i share a product page on facebook , the image shared is randomly taken from “x other items in the same category” and never from the product image itself.
I tried to share a panda demo product and it worked fine. The image share is the product main image.
On the facebook developper page (open graph test) , i have this error : “Inferred Property
The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.”
for product example page : https://pastel-living.com/rangements/1071-console-krystal-marbre-marronpietement-noir.html
Can somebody help please ?
Thank you
Regards
Hello,
Facebook open graph debugger says “The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.”
https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fpastel-living.com%2Frangements%2F1071-console-krystal-marbre-marronpietement-noir.html
But The ‘og:image’ property is there, see attached picture, I will let you know when I figure it out.
Best regards.
Jonny
Hi,
It seems that og:image should a HTTP link, not a HTTPS one.
So you need to edit the \themes\panda\templates\catalog\product.tpl file remove this code
<meta property="og:image" content="{$product.cover.large.url>
By this one.
<meta property="og:image" content="{$product.cover.large.url|regex_replace:'/^https/':'http'}">
And then click on the “Scrape Again” on the Facebook open graph debugger page to see if the problem is fixed.
If this is the correct fix, I will include it in the upcoming update.
Best regards.
Jonny
Hi,
Adding image width and image height attributes can fix the problem.
Take the following two steps:
1. Restore the fix I sent you yesterday.
2. Add this code to right blow og:image in the same product.tpl file.
<meta property="og:image:width" content="{$product.cover.large.width}">
<meta property="og:image:height" content="{$product.cover.large.height}">
<meta property="og:image:alt" content="{$product.name}">
I’ve tested the fix on a https site, it worked fine.
https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.sunnytoo.net%2Finstagram%2Fps17%2Ftshirts%2F1-1-faded-short-sleeves-tshirt.html%23%2F1-size-s%2F13-color-orange
Best regards.
Jonny
Dear Jonny ;
please, is my joined product.tpl file correct ? because it doesnt seem to work .
Thank you so much
best regards
Adil
{block name=’head’ append}
{if isset($fb_app_id) && $fb_app_id}
<meta property=”fb:app_id” content=”{$fb_app_id}” />
{/if}
<meta property=”og:type” content=”product”>
<meta property=”og:url” content=”{$urls.current_url}”>
<meta property=”og:title” content=”{$page.meta.title}”>
<meta property=”og:site_name” content=”{$shop.name}”>
<meta property=”og:description” content=”{$page.meta.description}”>
<meta property=”og:image” content=”{$product.cover.large.url}”>
<meta property=”og:image:width” content=”{$product.cover.large.width}”>
<meta property=”og:image:height” content=”{$product.cover.large.height}”>
<meta property=”og:image:alt” content=”{$product.name}”<meta property=”product:pretax_price:amount” content=”{$product.price_tax_exc}”>
<meta property=”product:pretax_price:currency” content=”{$currency.iso_code}”>
<meta property=”product:price:amount” content=”{$product.price_amount}”>
<meta property=”product:price:currency” content=”{$currency.iso_code}”>
{if isset($product.weight) && ($product.weight != 0)}
<meta property=”product:weight:value” content=”{$product.weight}”>
<meta property=”product:weight:units” content=”{$product.weight_unit}”>
{/if}
{/block}
You must be logged in to reply to this topic.