On 2/22/2020 at 12:09 PM, Surffari said:I ma fighting with this same problem.
Can't find any examples how to add these directives/attributes in a way that Google would accept it.
I do have EAN's for all my products.
Found this block from product.tpl and tried a few things here, but without the wanted end result.
Also looking the schema, but that doesn't really help me.Any insoight or examples would be welcome
{block name='head' append} <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="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}"> <!-- added gtin directive >>>> --> <meta property="product:gtin" content="{$product.ean13}"> <meta property="product:mpn" content="{$product.ean13}"> <!-- <<<< added gtin directive --> {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}
Do you have an HTML source output of the above referenced code? My first guess is your template is not populating the $product.ean13 value, but that's just a wild guess. I'll try to have a look this weekend and see how I fixed it in my code.