Jump to content

Edit History

Mauricio Molina

Mauricio Molina

Hello people,

I'm from Brazil, I followed this topic for a while trying to resolve errors and warnings and I was 100% successful.

As I used the help of many here, I will contribute to help everyone in need.

Changes are only in "product.tpl"

Way:

themes / classic / templates / catalog / _partials / miniatures / product.tpl

Full code:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{block name='product_miniature_item'}
<div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  {if isset($position)}<meta itemprop="position" content="{$position}" />{/if}
  <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemprop="item" itemscope itemtype="https://schema.org/Product">
  
	  <meta itemprop="mpn" content="{$product->reference}" />
      <meta itemprop="name" content="{$product.manufacturer_name}" />
      <link itemprop="image" href="{$product.cover.large.url}" />      
      <meta itemprop="description" content="{$page.meta.description}" />
      <div itemprop="offers" itemtype="http://schema.org/AggregateOffer" itemscope>
		<link itemprop="url" href="{$product.url}" />		
        <meta itemprop="availability" content="{$product.seo_availability}" />	
		<meta itemprop="itemCondition" content="Novo" />        
        <meta itemprop="price" content="{$product.price_amount}" />
        <meta itemprop="lowPrice" content="{$product.price_amount}" />
        <meta itemprop="highPrice" content="{$product.regular_price_amount}" />
		<meta itemprop="offerCount" content="6" />
        
        <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
		<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
		<meta itemprop="gtin13" content="{$product->ean13}" />
      </div>
      <div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
        <meta itemprop="reviewCount" content="3" />
        <meta itemprop="ratingValue" content="5" />
      </div>
      <div itemprop="review" itemtype="http://schema.org/Review" itemscope>
        <div itemprop="author" itemtype="http://schema.org/Person" itemscope>
          <meta itemprop="name" content="{$customer_name}" />
        </div>
        <div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
          <meta itemprop="ratingValue" content="3" />
          <meta itemprop="bestRating" content="5" />
        </div>
      </div>
      <meta itemprop="sku" content="{$product.reference_to_display}" />
      <div itemprop="brand" itemtype="http://schema.org/Brand" itemscope>
        <meta itemprop="name" content="{$product.manufacturer_name}" />
      </div>
  
    <div class="thumbnail-container">
      {block name='product_thumbnail'}
        {if $product.cover}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img
              src="{$product.cover.bySize.home_default.url}"
              alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}"
              data-full-size-image-url="{$product.cover.large.url}"
              />
          </a>
        {else}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img src="{$urls.no_picture_image.bySize.home_default.url}" />
          </a>
        {/if}
      {/block}

      <div class="product-description">
        {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:60:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h2>
          {/if}
        {/block}

        {block name='product_price_and_shipping'}
          {if $product.show_price}
            <div class="product-price-and-shipping">
              {if $product.has_discount}
                {hook h='displayProductPriceBlock' product=$product type="old_price"}

                <span class="regular-price" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span>
                {if $product.discount_type === 'percentage'}
                  <span class="discount-percentage discount-product">{$product.discount_percentage}</span>
                {elseif $product.discount_type === 'amount'}
                  <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span>
                {/if}
              {/if}

              {hook h='displayProductPriceBlock' product=$product type="before_price"}

              <span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span>
              <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="invisible">
                <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
                <meta itemprop="price" content="{$product.price_amount}" />
				<link itemprop="url" href="{$product.url}" />		
				<meta itemprop="availability" content="{$product.seo_availability}" />
				<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
              </div>

              {hook h='displayProductPriceBlock' product=$product type='unit_price'}

              {hook h='displayProductPriceBlock' product=$product type='weight'}
            </div>
          {/if}
        {/block}

        {block name='product_reviews'}
          {hook h='displayProductListReviews' product=$product}
        {/block}
      </div>

      {include file='catalog/_partials/product-flags.tpl'}

      <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
        {block name='quick_view'}
          <a class="quick-view" href="#" data-link-action="quickview">
            <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
          </a>
        {/block}

        {block name='product_variants'}
          {if $product.main_variants}
            {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
          {/if}
        {/block}
      </div>
    </div>
  </article>
</div>
{/block}

The only thing I would like to automatically leave would be the evaluations:

<div itemprop = "aggregateRating" itemtype = "http://schema.org/AggregateRating" itemscope>
        <meta itemprop = "reviewCount" content = "3" />
        <meta itemprop = "ratingValue" content = "5" />
      </div>

Does anyone know which path we can put in the "content" field to make it automatic and not write manually?

 

Mauricio Molina

Mauricio Molina

Hello people,

I'm from Brazil, I followed this topic for a while trying to resolve errors and warnings and I was 100% successful.

As I used the help of many here, I will contribute to help everyone in need.

As alterações são apenas no "product.tpl"

Way:

themes / classic / templates / catalog / _partials / miniatures / product.tpl

Full code:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{block name='product_miniature_item'}
<div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  {if isset($position)}<meta itemprop="position" content="{$position}" />{/if}
  <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemprop="item" itemscope itemtype="https://schema.org/Product">
  
	  <meta itemprop="mpn" content="{$product->reference}" />
      <meta itemprop="name" content="{$product.manufacturer_name}" />
      <link itemprop="image" href="{$product.cover.large.url}" />      
      <meta itemprop="description" content="{$page.meta.description}" />
      <div itemprop="offers" itemtype="http://schema.org/AggregateOffer" itemscope>
		<link itemprop="url" href="{$product.url}" />		
        <meta itemprop="availability" content="{$product.seo_availability}" />	
		<meta itemprop="itemCondition" content="Novo" />        
        <meta itemprop="price" content="{$product.price_amount}" />
        <meta itemprop="lowPrice" content="{$product.price_amount}" />
        <meta itemprop="highPrice" content="{$product.regular_price_amount}" />
		<meta itemprop="offerCount" content="6" />
        
        <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
		<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
		<meta itemprop="gtin13" content="{$product->ean13}" />
      </div>
      <div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
        <meta itemprop="reviewCount" content="3" />
        <meta itemprop="ratingValue" content="5" />
      </div>
      <div itemprop="review" itemtype="http://schema.org/Review" itemscope>
        <div itemprop="author" itemtype="http://schema.org/Person" itemscope>
          <meta itemprop="name" content="{$customer_name}" />
        </div>
        <div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
          <meta itemprop="ratingValue" content="3" />
          <meta itemprop="bestRating" content="5" />
        </div>
      </div>
      <meta itemprop="sku" content="{$product.reference_to_display}" />
      <div itemprop="brand" itemtype="http://schema.org/Brand" itemscope>
        <meta itemprop="name" content="{$product.manufacturer_name}" />
      </div>
  
    <div class="thumbnail-container">
      {block name='product_thumbnail'}
        {if $product.cover}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img
              src="{$product.cover.bySize.home_default.url}"
              alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}"
              data-full-size-image-url="{$product.cover.large.url}"
              />
          </a>
        {else}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img src="{$urls.no_picture_image.bySize.home_default.url}" />
          </a>
        {/if}
      {/block}

      <div class="product-description">
        {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:60:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h2>
          {/if}
        {/block}

        {block name='product_price_and_shipping'}
          {if $product.show_price}
            <div class="product-price-and-shipping">
              {if $product.has_discount}
                {hook h='displayProductPriceBlock' product=$product type="old_price"}

                <span class="regular-price" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span>
                {if $product.discount_type === 'percentage'}
                  <span class="discount-percentage discount-product">{$product.discount_percentage}</span>
                {elseif $product.discount_type === 'amount'}
                  <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span>
                {/if}
              {/if}

              {hook h='displayProductPriceBlock' product=$product type="before_price"}

              <span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span>
              <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="invisible">
                <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
                <meta itemprop="price" content="{$product.price_amount}" />
				<link itemprop="url" href="{$product.url}" />		
				<meta itemprop="availability" content="{$product.seo_availability}" />
				<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
              </div>

              {hook h='displayProductPriceBlock' product=$product type='unit_price'}

              {hook h='displayProductPriceBlock' product=$product type='weight'}
            </div>
          {/if}
        {/block}

        {block name='product_reviews'}
          {hook h='displayProductListReviews' product=$product}
        {/block}
      </div>

      {include file='catalog/_partials/product-flags.tpl'}

      <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
        {block name='quick_view'}
          <a class="quick-view" href="#" data-link-action="quickview">
            <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
          </a>
        {/block}

        {block name='product_variants'}
          {if $product.main_variants}
            {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
          {/if}
        {/block}
      </div>
    </div>
  </article>
</div>
{/block}

The only thing I would like to automatically leave would be the evaluations:

<div itemprop = "aggregateRating" itemtype = "http://schema.org/AggregateRating" itemscope>
        <meta itemprop = "reviewCount" content = "3" />
        <meta itemprop = "ratingValue" content = "5" />
      </div>

Does anyone know which path we can put in the "content" field to make it automatic and not write manually?

 

Mauricio Molina

Mauricio Molina

Hello people,

I'm from Brazil, I followed this topic for a while trying to resolve errors and warnings and I was 100% successful.

As I used the help of many here, I will contribute to help everyone in need.

As alterações são apenas no "product.tpl"

Way:

themes / classic / templates / catalog / _partials / miniatures / product.tpl

Full code:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{block name='product_miniature_item'}
<div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  {if isset($position)}<meta itemprop="position" content="{$position}" />{/if}
  <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemprop="item" itemscope itemtype="https://schema.org/Product">
  
	  <meta itemprop="mpn" content="{$product->reference}" />
      <meta itemprop="name" content="{$product.manufacturer_name}" />
      <link itemprop="image" href="{$product.cover.large.url}" />      
      <meta itemprop="description" content="{$page.meta.description}" />
      <div itemprop="offers" itemtype="http://schema.org/AggregateOffer" itemscope>
		<link itemprop="url" href="{$product.url}" />		
        <meta itemprop="availability" content="{$product.seo_availability}" />	
		<meta itemprop="itemCondition" content="Novo" />        
        <meta itemprop="price" content="{$product.price_amount}" />
        <meta itemprop="lowPrice" content="{$product.price_amount}" />
        <meta itemprop="highPrice" content="{$product.regular_price_amount}" />
		<meta itemprop="offerCount" content="6" />
        
        <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
		<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
		<meta itemprop="gtin13" content="{$product->ean13}" />
      </div>
      <div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
        <meta itemprop="reviewCount" content="3" />
        <meta itemprop="ratingValue" content="5" />
      </div>
      <div itemprop="review" itemtype="http://schema.org/Review" itemscope>
        <div itemprop="author" itemtype="http://schema.org/Person" itemscope>
          <meta itemprop="name" content="{$customer_name}" />
        </div>
        <div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
          <meta itemprop="ratingValue" content="3" />
          <meta itemprop="bestRating" content="5" />
        </div>
      </div>
      <meta itemprop="sku" content="{$product.reference_to_display}" />
      <div itemprop="brand" itemtype="http://schema.org/Brand" itemscope>
        <meta itemprop="name" content="{$product.manufacturer_name}" />
      </div>
  
    <div class="thumbnail-container">
      {block name='product_thumbnail'}
        {if $product.cover}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img
              src="{$product.cover.bySize.home_default.url}"
              alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}"
              data-full-size-image-url="{$product.cover.large.url}"
              />
          </a>
        {else}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img src="{$urls.no_picture_image.bySize.home_default.url}" />
          </a>
        {/if}
      {/block}

      <div class="product-description">
        {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:60:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h2>
          {/if}
        {/block}

        {block name='product_price_and_shipping'}
          {if $product.show_price}
            <div class="product-price-and-shipping">
              {if $product.has_discount}
                {hook h='displayProductPriceBlock' product=$product type="old_price"}

                <span class="regular-price" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span>
                {if $product.discount_type === 'percentage'}
                  <span class="discount-percentage discount-product">{$product.discount_percentage}</span>
                {elseif $product.discount_type === 'amount'}
                  <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span>
                {/if}
              {/if}

              {hook h='displayProductPriceBlock' product=$product type="before_price"}

              <span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span>
              <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="invisible">
                <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
                <meta itemprop="price" content="{$product.price_amount}" />
				<link itemprop="url" href="{$product.url}" />		
				<meta itemprop="availability" content="{$product.seo_availability}" />
				<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
              </div>

              {hook h='displayProductPriceBlock' product=$product type='unit_price'}

              {hook h='displayProductPriceBlock' product=$product type='weight'}
            </div>
          {/if}
        {/block}

        {block name='product_reviews'}
          {hook h='displayProductListReviews' product=$product}
        {/block}
      </div>

      {include file='catalog/_partials/product-flags.tpl'}

      <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
        {block name='quick_view'}
          <a class="quick-view" href="#" data-link-action="quickview">
            <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
          </a>
        {/block}

        {block name='product_variants'}
          {if $product.main_variants}
            {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
          {/if}
        {/block}
      </div>
    </div>
  </article>
</div>
{/block}

The only thing I would like to automatically leave would be the evaluations:

<div itemprop = "aggregateRating" itemtype = "http://schema.org/AggregateRating" itemscope>
        <meta itemprop = "reviewCount" content = "3" />
        <meta itemprop = "ratingValue" content = "5" />
      </div>

Does anyone know which path we can put in the "content" field to make it automatic and not write manually?

 

Mauricio Molina

Mauricio Molina

Hello people,

I'm from Brazil, I followed this topic for a while trying to resolve errors and warnings and I was 100% successful.

As I used the help of many here, I will contribute to help everyone in need.

As alterações são apenas no "product.tpl"

Way:

themes / classic / templates / catalog / _partials / miniatures / product.tpl

Full code:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{block name='product_miniature_item'}
<div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  {if isset($position)}<meta itemprop="position" content="{$position}" />{/if}
  <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemprop="item" itemscope itemtype="https://schema.org/Product">
  
	  <meta itemprop="mpn" content="{$product->reference}" />
      <meta itemprop="name" content="{$product.manufacturer_name}" />
      <link itemprop="image" href="{$product.cover.large.url}" />      
      <meta itemprop="description" content="{$page.meta.description}" />
      <div itemprop="offers" itemtype="http://schema.org/AggregateOffer" itemscope>
		<link itemprop="url" href="{$product.url}" />		
        <meta itemprop="availability" content="{$product.seo_availability}" />	
		<meta itemprop="itemCondition" content="Novo" />        
        <meta itemprop="price" content="{$product.price_amount}" />
        <meta itemprop="lowPrice" content="{$product.price_amount}" />
        <meta itemprop="highPrice" content="{$product.regular_price_amount}" />
		<meta itemprop="offerCount" content="6" />
        
        <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
		<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
		<meta itemprop="gtin13" content="{$product->ean13}" />
      </div>
      <div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
        <meta itemprop="reviewCount" content="3" />
        <meta itemprop="ratingValue" content="5" />
      </div>
      <div itemprop="review" itemtype="http://schema.org/Review" itemscope>
        <div itemprop="author" itemtype="http://schema.org/Person" itemscope>
          <meta itemprop="name" content="{$customer_name}" />
        </div>
        <div itemprop="reviewRating" itemtype="http://schema.org/Rating" itemscope>
          <meta itemprop="ratingValue" content="3" />
          <meta itemprop="bestRating" content="5" />
        </div>
      </div>
      <meta itemprop="sku" content="{$product.reference_to_display}" />
      <div itemprop="brand" itemtype="http://schema.org/Brand" itemscope>
        <meta itemprop="name" content="{$product.manufacturer_name}" />
      </div>
  
    <div class="thumbnail-container">
      {block name='product_thumbnail'}
        {if $product.cover}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img
              src="{$product.cover.bySize.home_default.url}"
              alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}"
              data-full-size-image-url="{$product.cover.large.url}"
              />
          </a>
        {else}
          <a href="{$product.url}" class="thumbnail product-thumbnail">
            <img src="{$urls.no_picture_image.bySize.home_default.url}" />
          </a>
        {/if}
      {/block}

      <div class="product-description">
        {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:60:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h2>
          {/if}
        {/block}

        {block name='product_price_and_shipping'}
          {if $product.show_price}
            <div class="product-price-and-shipping">
              {if $product.has_discount}
                {hook h='displayProductPriceBlock' product=$product type="old_price"}

                <span class="regular-price" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span>
                {if $product.discount_type === 'percentage'}
                  <span class="discount-percentage discount-product">{$product.discount_percentage}</span>
                {elseif $product.discount_type === 'amount'}
                  <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span>
                {/if}
              {/if}

              {hook h='displayProductPriceBlock' product=$product type="before_price"}

              <span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span>
              <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="invisible">
                <meta itemprop="priceCurrency" content="{$currency.iso_code}" />
                <meta itemprop="price" content="{$product.price_amount}" />
				<link itemprop="url" href="{$product.url}" />		
				<meta itemprop="availability" content="{$product.seo_availability}" />
				<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
              </div>

              {hook h='displayProductPriceBlock' product=$product type='unit_price'}

              {hook h='displayProductPriceBlock' product=$product type='weight'}
            </div>
          {/if}
        {/block}

        {block name='product_reviews'}
          {hook h='displayProductListReviews' product=$product}
        {/block}
      </div>

      {include file='catalog/_partials/product-flags.tpl'}

      <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
        {block name='quick_view'}
          <a class="quick-view" href="#" data-link-action="quickview">
            <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
          </a>
        {/block}

        {block name='product_variants'}
          {if $product.main_variants}
            {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
          {/if}
        {/block}
      </div>
    </div>
  </article>
</div>
{/block}

The only thing I would like to automatically leave would be the evaluations:

<div itemprop = "aggregateRating" itemtype = "http://schema.org/AggregateRating" itemscope>
        <meta itemprop = "reviewCount" content = "3" />
        <meta itemprop = "ratingValue" content = "5" />
      </div>

Does anyone know which path we can put in the "content" field to make it automatic and not write manually?

 

×
×
  • Create New...