Jump to content

Type d'objet invalide pour le champ "Brand"


Recommended Posts

Bonjour,

 

J'ai depuis peu des avertissements sur la console Google Search.

Il est indiqué Type d'objet invalide pour le champ "Brand" alors que le test des résultats enrichis trouve bien la ligne <meta itemprop="brand" content="marque">

Le type trouvé est "Thing", est-ce le bon type svp ?

Merci d'avance.

Cordialement,
Pilou

 

Link to comment
Share on other sites

Bonjour Eolia,

Merci pour ta réponse.

Thing n'est donc pas le bon type ?
Comment le changer svp ?

 

Dans le product.tpl, j'ai ceci:

<meta itemprop="brand" content="{$product_manufacturer->name|escape:'html':'UTF-8'}">
                {if file_exists($smarty.const._PS_ROOT_DIR_|cat:'/img/m/'|cat:$product_manufacturer->id|cat:'.jpg')}
                  <span class="manufacturer-logo" data-ob="{$link->getManufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'|base64_encode}">
                    <img src="{$img_manu_dir|escape:'html':'UTF-8'}{$product_manufacturer->id|intval}.jpg" alt="{$product_manufacturer->name|escape:'html':'UTF-8'}">
                  </span>
                {else}
                  <label class="mb-0">{l s='Brand:'}</label>
                  <span class="text-primary font-weight-bold" data-ob="{$link->getManufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'|base64_encode}">
                    {$product_manufacturer->name|escape:'html':'UTF-8'}
                  </span>
                {/if}

Que dois-je changer svp ?

Link to comment
Share on other sites

Ben en suivant la doc^^

                {if file_exists($smarty.const._PS_ROOT_DIR_|cat:'/img/m/'|cat:$product_manufacturer->id|cat:'.jpg')}
                  <span class="manufacturer-logo" data-ob="{$link->getManufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'|base64_encode}">
                    <img src="{$img_manu_dir|escape:'html':'UTF-8'}{$product_manufacturer->id|intval}.jpg" alt="{$product_manufacturer->name|escape:'html':'UTF-8'}">
                  </span>
                {else}
                  <label class="mb-0">{l s='Brand:'}</label>
                  <span itemprop="brand" itemtype="https://schema.org/Brand" itemscope class="text-primary font-weight-bold" data-ob="{$link->getManufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'|base64_encode}">
                    <span itemprop="name">{$product_manufacturer->name|escape:'html':'UTF-8'}</span>
                  </span>
                {/if}

PS: Vous me faites marrer avec vos lien obfusqués^^

Link to comment
Share on other sites

<span class="manufacturer-logo" data-ob="{$link->getManufacturerLink($product_manufacturer->id, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'|base64_encode}">

Ca c'est un lien obsuqué pour pas que Google le voit^^ Mais ton js le remplace par un lien <a> en mettant en hrf le data-ob décodé.

On peut avoir une url de la page qui pose souci ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...