Jump to content

Edit History

Yulia Vitun

Yulia Vitun


meta tags need to be closed

On 2/28/2019 at 7:33 AM, Jaep said:

Yes, your programmer is correct. It looks good, but apparently the searchconsole's crawler is a little more strict than the testing tool.

I seem to have solved it for my site with a theme based on the Classic theme. Basically, I added an offers entry along with a valid price to the product miniature. Ask your programmer to add something like this (the important part is the "offers" div):


	<meta itemprop="image" content="https://shop.example.com/imageURL.jpg" />
	<meta itemprop="description" content="Description text" />
	<meta itemprop="sku" content="123456789" />
	<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
		<meta itemprop="url" content="https://shop.example.com/link_to_product.html" />
		<meta itemprop="availability" content="https://schema.org/InStock" />
		<meta itemprop="priceCurrency" content="USD" />
		<meta itemprop="itemCondition" content="New" />
		<meta itemprop="price" content="73077" />
		<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
			<meta itemprop="name" content="Example PrestaShop" />
		</div>
	</div>
	<div itemprop="brand" itemtype="http://schema.org/Thing" itemscope>
		<meta itemprop="name" content="BrandOfProduct" />
	</div>

In my template markup there was an itemprop="price" entry which was a string including the currency symbol. Google Products does not like that, it has to be as above.

I still have a few optional fields missing, some I cannot easily solve in my setup. For example: The priceValidUntil field is recommended

 

Hope this helps

 

Prestashop 1.7.6.5
add the following code to /themes/classic/templates/catalogue/miniatures/product.tpl (around line 73, before  {hook h='displayProductPriceBlock' product=$product type='unit_price'})

{** To fix Google "offers" issue - EV *}
  <div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
     <meta itemprop="price" content="{$product.price_amount}"/>
     <meta itemprop="description" content="{$product.name}"/>
     <meta itemprop="url" content="{$product.url}"/>
     <meta itemprop="priceCurrency" content="{$currency.iso_code}"/>
     <meta itemprop="review" content="{$product}"/>
     <meta itemprop="name" content="{$product.name}"/>
  </div>

credits also to https://github.com/PrestaShop/PrestaShop/issues/19017#issuecomment-647441060

 

Yulia Vitun

Yulia Vitun

On 2/28/2019 at 7:33 AM, Jaep said:

Yes, your programmer is correct. It looks good, but apparently the searchconsole's crawler is a little more strict than the testing tool.

I seem to have solved it for my site with a theme based on the Classic theme. Basically, I added an offers entry along with a valid price to the product miniature. Ask your programmer to add something like this (the important part is the "offers" div):


	<meta itemprop="image" content="https://shop.example.com/imageURL.jpg" />
	<meta itemprop="description" content="Description text" />
	<meta itemprop="sku" content="123456789" />
	<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
		<meta itemprop="url" content="https://shop.example.com/link_to_product.html" />
		<meta itemprop="availability" content="https://schema.org/InStock" />
		<meta itemprop="priceCurrency" content="USD" />
		<meta itemprop="itemCondition" content="New" />
		<meta itemprop="price" content="73077" />
		<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
			<meta itemprop="name" content="Example PrestaShop" />
		</div>
	</div>
	<div itemprop="brand" itemtype="http://schema.org/Thing" itemscope>
		<meta itemprop="name" content="BrandOfProduct" />
	</div>

In my template markup there was an itemprop="price" entry which was a string including the currency symbol. Google Products does not like that, it has to be as above.

I still have a few optional fields missing, some I cannot easily solve in my setup. For example: The priceValidUntil field is recommended

 

Hope this helps

 

Prestashop 1.7.6.5
add the following code to /themes/classic/templates/catalogue/miniatures/product.tpl (around line 73, before  {hook h='displayProductPriceBlock' product=$product type='unit_price'})

{** To fix Google "offers" issue - EV *}
  <div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
     <meta itemprop="price" content="{$product.price}>
     <meta itemprop="description" content="{$product.name}">
     <meta itemprop="url" content="{$product.url}">
     <meta itemprop="priceCurrency" content="EUR">
  </div>

credits also to https://github.com/PrestaShop/PrestaShop/issues/19017#issuecomment-647441060

 

×
×
  • Create New...