Jump to content

Edit History

Peter Liska

Peter Liska

To solve this "Google Webmaster problem" it will be better (for all of you) to have a look at PrestaShop GitHub Classic theme, where most of these problems have been already solved.

The most important thing is here (around line 80):

https://github.com/PrestaShop/PrestaShop/blob/develop/themes/classic/templates/catalog/_partials/miniatures/product.tpl

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible">
	<meta itemprop="priceCurrency" content="{$currency.iso_code}" />
	<meta itemprop="price" content="{$product.price_amount}" />
</div>

You can add url and avaibilty too:

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible">
	<meta itemprop="priceCurrency" content="{$currency.iso_code}" />
	<meta itemprop="price" content="{$product.price_amount}" />
  
	<meta itemprop="url" content="{$product.url}" />
	<link itemprop="availability" href="{$product.seo_availability}" />
</div>

Here is my pull request for this: https://github.com/PrestaShop/PrestaShop/pull/21786/files

 

Search for the "itemprop" in the latest classic theme and you can find more of these and where to add them. 

I do NOT recommend add this in offers: 

<meta itemprop="review" content="{$product}"/>
<meta itemprop="name" content="{$product.name}"/>

review - A review of the item!

Offers are described here: https://schema.org/Offer

name - is already specified in product.tpl file:

{block name='product_name'}
	{if $page.page_name == 'index'}
	<h3 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h3>
	{else}
	<h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h2>
	{/if}
{/block}

 

Peter Liska

Peter Liska

To solve this Google problem it will be better (for all of you) to have a look at PrestaShop GitHub Classic theme, where most of these problems have been already solved.

The most important thing is here (around line 80):

https://github.com/PrestaShop/PrestaShop/blob/develop/themes/classic/templates/catalog/_partials/miniatures/product.tpl

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible">
	<meta itemprop="priceCurrency" content="{$currency.iso_code}" />
	<meta itemprop="price" content="{$product.price_amount}" />
</div>

You can add url and avaibilty too:

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible">
	<meta itemprop="priceCurrency" content="{$currency.iso_code}" />
	<meta itemprop="price" content="{$product.price_amount}" />
  
	<meta itemprop="url" content="{$product.url}" />
	<link itemprop="availability" href="{$product.seo_availability}" />
</div>

Here's mine pull request for this: https://github.com/PrestaShop/PrestaShop/pull/21786/files

 

Search for the "itemprop" in the latest classic theme and you can find more of these and where to add them. 

I do NOT recommend add this in offers: 

<meta itemprop="review" content="{$product}"/>
<meta itemprop="name" content="{$product.name}"/>

review - A review of the item!

Offers are described here: https://schema.org/Offer

name - is already specified in product.tpl file:

{block name='product_name'}
	{if $page.page_name == 'index'}
	<h3 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h3>
	{else}
	<h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h2>
	{/if}
{/block}

 

×
×
  • Create New...