{}
Google Search Console rightly complains about all product listing pages that in some way incorporate themes/classic/templates/catalog/_partials/miniatures/product.tpl
, because it incorrectly specifies itemtype="http://schema.org/Product"
for each "miniature" product on the product listing page. Specifically, Google Search Console reports the error (not warning) "Either 'ratingCount' or 'reviewCount' should be specified" for every listing page. What is really meant here is that itemtype="http://schema.org/Product"
should not be specified at all because it is not meant to be used on listing pages, according to Google:
Use markup for a specific product, not a category or list of products. For example, “shoes in our shop” is not a specific product.
Steps to reproduce the behavior:
Additional information
PrestaShop version: 1.7.5.0
PHP version: 7.0
Efectivamente me pasa lo mismo en la vervión 1.7.5.0. se ha corregido para la 1.7.5.1?
Hi @watou,
Thank you for your report.
We'll first try to reproduce it and we'll come back to you if we need more information.
Thanks!
Hi,
I tried with this link: https://search.google.com/search-console/about to check PS1.7.5.1 shop, but I need to wait to get details
https://search.google.com/search-console/about
Thanks!
This report from GSC, Either 'ratingCount' or 'reviewCount' should be specified
, is immediately the result of a code problem in a 3rd party module ttproductcomments
, and my earlier interpretation of the advice from Google Use markup for a specific product, not a category or list of products. For example, “shoes in our shop” is not a specific product.
may be an incorrect interpretation.
For these reasons you may want to consider closing this problem report.
@watou, thanks for your feedback.
I close the issue, feel free to open a new one when needed.
Thanks!
Hi @khouloudbelguith , I recommend this issue be re-opened, as other information strongly suggests that this is actually a real concern due to recent changes in the Google Search Console. Have a look at https://github.com/woocommerce/woocommerce/issues/22896 for a very similar issue opened and being worked there, where the current working thinking is similar to my comments at the top of this issue. Essentially Google Search Console is now flagging errors (not warnings) for incorrectly structured Product schema, which is still the case with themes/classic/templates/catalog/_partials/miniatures/product.tpl
:
I recommend a thorough review of the schema markup to ensure proper rules compliance, or these new errors are going to be flagged in Google Search Console against all recent PrestaShop instances.
El problema sigue igual..
@watou, I will re-open the issue.
But to reproduce the issue with PS1.7.5.1 shop, I need to wait to get details
https://search.google.com/search-console/about
Thanks!
Hi,
I checked today, I need to wait to get details.
Thanks for your understanding!
Hi @khouloudbelguith thank you.
So we need to wait to get this problem resolved ?
Hi @morghy1992,
We need to reproduce the issue first.
Thanks for your understanding, we'll come back to you if we need more information.
Thank you!
@morghy1992, you could proceed in a "bleeding edge" and "maybe right but also maybe wrong" approach by commenting out or removing itemscope itemtype="http://schema.org/Product"
in themes/classic/templates/catalog/_partials/miniatures/product.tpl
like this:
--- a/themes/classic/templates/catalog/_partials/miniatures/product.tpl
+++ b/themes/classic/templates/catalog/_partials/miniatures/product.tpl
@@ -23,7 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{block name='product_miniature_item'}
- <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
+ <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}"{* itemscope itemtype="http://schema.org/Product" *}>
<div class="thumbnail-container">
{block name='product_thumbnail'}
{if $product.cover}
BUT THIS MIGHT NOT BE A PROPER FIX AND COULD MAKE MATTERS WORSE. Also, you might head down that path and other issues could arise and there could be no support at all. So proceed at your own risk! 😣
@watou thank you for your advice.
I prefer to wait the proper fix to avoid risks 😊
Hi all,
I manage to reproduce the issue with PS1.7.5.1.
I tried with this shop: http://presta1and1.com/prestashop_1.7.5.1/index.php
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
I think there are a number of templates and modules that add structured Product data to miniature products that appear in listings, and I frankly don't have the resources to properly scope and test a full and proper fix. I _believe_ the proper implementation of a fix is to remove all schema.org/Product and related information from all product listing pages, but how to do that properly and test it properly is currently beyond my resources to offer a PR. Sorry!
@khouloudbelguith thank you for letting us know. I still have same problem I could't find any solution.
Hope to resolve the issue soon.
@khouloudbelguith how can I fix the problem on the search console? Any update about it?
Thank you ;)
Hi @morghy1992,
Sorry not yet, it is added to our bug roadmap.
But PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.
Thanks!
Could you please provide the bug ID or a link to which we can track the progress of that? Or should we check this thread?
@tanasi, you should check this ticket.
Thanks!
hi, any update on this bug fixing?
thanks on update
@lelethered I am still waiting too.
Still having a lot of problems with Search Console not good for SEO.
I'm also waiting for an answer... I have more than 9000 Errors due to this issue. Any update or fix?
Are you guys having problem also with SEO?
I think google is penalizing my products for this problem.
i @morghy1992, i have the same doubt! I start the project both with wordpress and prestashop for same client (wp for corporate site and presta for shop) and the result is completly different! So for me the number in analytics it's clear: this issue on prestashop is much more extensive and also generates problems on SEO result
@lelethered I have the same experience. Wordpress (and woocommerce to that extend) provide updates more frequently and thus seem to have fixed some of those issues. So, my wordpress sites were "healed" automatically - I didn't do anything else apart from updates.
In my prestashop case those errors were generated by all elements that had a product shema and they shouldn't have (according to google update). e.g. I had a mega menu showing products. Checking the .tpl file of that mega menu widget I found that product schema was included. I removed that and errors started to decrease. I had similar results on product tabs, related products and any other place the product schema was inlcuded and it shouldn't.
Just to mention that I applied those to my custom (paid) theme, so I guess the issue must be twofold: Prestashop and also theme updates are needed.
dear @khouloudbelguith and dear all,
i think this bug need to be changed for the status; the problem caused by this bug has a big impact on the performance of entire project and i think need be considered more than minor.
According to my customer's requirement, i would like to understand if there are some time scheduling for this resolution; otherwise i'll need to reconsider the CMS software selection. I understand the capabilities of Prestashop, but this issue is really a bottleneck for this project startup.
It would be appreciated if is possible to understand the timeline for assignment, milestone and ipotetical resolution
best regards
hi Guys, i fixed this is by fix @watou has given. I removed it from two files, the product.tpl and product-line.tpl. All errors were gone from search console when i did a live test
Hi, I have the same problem. Could not find the @watou fix. What should I remove then for the product.tpl and product-line.tpl? Thanks.
Hi, I have the same problem. Could not find the @watou fix. What should I remove then for the product.tpl and product-line.tpl? Thanks.
hi @Wanna333,
find this line:
<article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
Change it to below, you need to comment out "itemscope itemtype="http://schema.org/Product" in both the files
<article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" {* itemscope itemtype="http://schema.org/Product" *}>
Hi @tyrelle, would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/PrestaShop/tree/develop
Thank you!
@khouloudbelguith I would be concerned that a pull request that only comments out code would not represent a sufficiently robust attempt at addressing this issue. It would be so much better to have a well researched and comprehensive solution we could all have faith in. I know this is an open source project (with heavy influence from a private company that maybe has resources?) but I don't think a stop-gap approach would be a proper approach, IMHO.
Buenos días. Estoy yo también afectada por este problema, por mas que hago pruebas tocando aquí y allí el codigo no encuentro solucion. me quedo por aqui atenta a ver si alguien lo ve.
GRacias
@tyrelle Hi, would you please explain me how to find product.tpl and product-line.tpl?
Is my first time. Hope you can help me.
@PrestaShop/prestashop-core-developers @eternoendless What do you think about this one ? Is it major ? Easy or hard to fix ? We need more infos for prioritization
@PrestaShop/prestashop-core-developers @eternoendless What do you think about this one ? Is it major ? Easy or hard to fix ? We need more infos for prioritization
There are 2 things that can be done to solve the issue:
1) Quite easy: remove the dedicated Schema.org informations in templates in order to avoid Google to flag it as not valid and trigger SEO penalties.
2) Longer, but better: examine each FO template with Schema.org markup and make sure it is valid according to Google
I dont think this is complex, but it requires an extensive search through the FO to make sure every Schema.org markup is valid.
There are some discussions on the forum about this topic 😉
@marionf If Google says the Product
schema is not to be used in listings, then removing the metadata should be easy.
have you find any solution ?
@tyrelle Hi, would you please explain me how to find product.tpl and product-line.tpl?
Is my first time. Hope you can help me.
@morghy1992
themes/classic/templates/catalog/_partials/miniatures/product.tpl
please replace "classic" with your theme name
I also had the same problem.
In my premium theme at themes/TEMAPREMIUM/templates/catalog /_partials /miniatures/product.tpl
I modified this piece of code:
{block name='product_price_and_shipping'}
{if $product.show_price}
<div class="product-price-and-shipping pricehv">
in this way:
{block name='product_price_and_shipping'}
{if $product.show_price}
<div class="product-price-and-shipping pricehv" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
Then I requested the validation of the error resolution to Google Search Console that accepted the resolution.
Hello, this problem has been resolved ?
Still got errors on my google search console.
@morghy1992 this problem has been fixed by PR https://github.com/PrestaShop/PrestaShop/pull/14558
If you want the issue to be solved on your shop, you must either apply the patch or wait for next PS version to be released
@matks thank you for replying. Was reading #14558 but I can't find how to resolve the problem on my store. Could you help me? thank you very much
You are probably interested in the changes the PR brings for the files:
The PR adds the required items needed by Google. You need to check your shop theme, and add/update the same items to your theme 😉 . Are you using Classic Theme ?
@matks thank you for helping me I am new in this :) should I ad the green label? I use a leo theme.
@morghy1992 You need found Red Line in your .tpl and replace by Green Line but The PR is to fix "Classic Theme" of Prestahop.
The "Leo Theme" is maybe a bit different, you need to ask to the dev of the theme if you have a problem to apply the modification by yourself.
Hi @BenTen yes the lines are different for my theme. Unfortunately I do not have any support for the theme because is expired. Do you think can anyone here can help me if I attache screenshot of my files ?
Hi Everyone
I thought i will share my experince with all of you, It might be useful for some of you.
I have followed the guide suggested above, but it did not solve my issue at all only the price and currency issue.
I have Prestashop 1.7.6.4.
I have made additional modification on the product.tpl file
Can be found here:
/public_html/themes/classic/templates/catalog/_partials/miniatures/product.tpl
What i managed to achive is that i have only left: 3 issues and looking forward if someone might see what i did not. Please have a look at my screenshot.
I am looking for solution for the "global identifier issue" and "All values provided for url must point to the same page."
Thank you in advance
Hello,
I tested it too - I applied the fixes in 1.7.6.1 version. The reviews are probably ok - those are optional and should be visible if you have real reviews (depending on module you use for it - if it has structured data). But I got red error for ItemList too - "all values provided must point to the same page"
https://www.dropbox.com/s/8j0h0ixkh7xn5d1/Screenshot%202019-11-22%2014.57.10.png?dl=0
That might be bug left to resolve?
Hi Everyone
I managed to get rid of all of the errors and warnings on my site and I thought I will share what I have done until now.
I have Prestashop 1.7.6.1
I have modified 4 files.
{**
* 2007-2019 PrestaShop and Contributors
*
* 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.txt.
* 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://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2019 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{block name='product_miniature_item'}
<article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" style="display:none">
<span itemprop="ratingValue">5</span>
<span itemprop="ratingCount">1</span>
</div>
<meta itemprop="image" content="{$product.cover.large.url}" />
<meta itemprop="description" content="{$product.name}" />
<meta itemprop="sku" content="{$product->id}" />
<meta itemprop="gtin13" content="{$product->ean13}" />
<meta itemprop="mpn" content="{$product->reference}" />
<meta itemprop="description" content="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" />
<div itemprop="review" itemscope itemtype="http://schema.org/Review" style="display:none">
<span itemprop="author">{Configuration::get('PS_SHOP_NAME')}</span>,
<meta itemprop="datePublished" content="{'Y'|date}-{'m'|date}-{'d'|date}">
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1"/>
<span itemprop="ratingValue">5</span>/
<span itemprop="bestRating">5</span>
</div>
<span itemprop="description"></span>
</div>
<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
<meta itemprop="url" content="{$product.url}" />
<meta itemprop="availability" content="https://schema.org/InStock" />
<meta itemprop="priceCurrency" content="{$currency.iso_code}" />
<meta itemprop="itemCondition" content="New" />
<meta itemprop="price" content="{$product.price_amount}" />
<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31" />
{*<meta itemprop="aggregateRating" content="{FALSE}" />*}
<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
<meta itemprop="name" content="{$shop.name}" />
</div>
</div>
<div class="thumbnail-container">
{block name='product_thumbnail'}
{if $product.cover}
<a href="{$product.canonical_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.canonical_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.canonical_url}">{$product.name|truncate:30:'...'}</a></h3>
{else}
<h2 class="h3 product-title" itemprop="name"><a href="{$product.canonical_url}">{$product.name|truncate:30:'...'}</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="sr-only">{l s='Regular price' d='Shop.Theme.Catalog'}</span>
<span class="regular-price">{$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="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
<span class="price">{$product.price}</span>
<meta itemprop="brand" content="{if !empty(Manufacturer::getnamebyid($product.id_manufacturer))}{Manufacturer::getnamebyid($product.id_manufacturer)}{else}{Configuration::get('PS_SHOP_NAME')}{/if}">
{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>
<!-- @todo: use include file='catalog/_partials/product-flags.tpl'} -->
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.flags item=flag}
<li class="product-flag {$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
<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"></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>
{/block}_
I removed " itemscope itemtype="http://schema.org/ItemList ",
because it was giving multiple mark up error on the same page.
{**
* 2007-2019 PrestaShop and Contributors
*
* 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.txt.
* 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://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2019 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="products{if !empty($cssClass)} {$cssClass}{/if}">
{foreach from=$products item="product" key="position"}
{include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
{/foreach}
</div>
{**
* 2007-2019 PrestaShop and Contributors
*
* 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.txt.
* 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://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2019 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file=$layout}
{block name='head_seo' prepend}
<link rel="canonical" href="{$product.canonical_url}">
{/block}
{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}">
{if $product.show_price}
<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}">
{/if}
{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}
{block name='content'}
<section id="main" itemscope itemtype="https://schema.org/Product">
<meta itemprop="url" content="{$product.url}">
<div class="row">
<div class="col-md-6">
{block name='page_content_container'}
<section class="page-content" id="content">
{block name='page_content'}
<!-- @todo: use include file='catalog/_partials/product-flags.tpl'} -->
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.flags item=flag}
<li class="product-flag {$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
{block name='product_cover_thumbnails'}
{include file='catalog/_partials/product-cover-thumbnails.tpl'}
{/block}
<div class="scroll-box-arrows">
<i class="material-icons left"></i>
<i class="material-icons right"></i>
</div>
{/block}
</section>
{/block}
</div>
<div class="col-md-6">
{block name='page_header_container'}
{block name='page_header'}
<h1 class="h1" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1>
{/block}
{/block}
{block name='product_prices'}
{include file='catalog/_partials/product-prices.tpl'}
{/block}
<div class="product-information">
{block name='product_description_short'}
<div id="product-description-short-{$product.id}" itemprop="description">{$product.description_short nofilter}</div>
{/block}
{if $product.is_customizable && count($product.customizations.fields)}
{block name='product_customization'}
{include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
{/block}
{/if}
<div class="product-actions">
{block name='product_buy'}
<form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
<input type="hidden" name="token" value="{$static_token}">
<input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
<input type="hidden" name="id_customization" value="{$product.id_customization}" id="product_customization_id">
{block name='product_variants'}
{include file='catalog/_partials/product-variants.tpl'}
{/block}
{block name='product_pack'}
{if $packItems}
<section class="product-pack">
<p class="h4">{l s='This pack contains' d='Shop.Theme.Catalog'}</p>
{foreach from=$packItems item="product_pack"}
{block name='product_miniature'}
{include file='catalog/_partials/miniatures/pack-product.tpl' product=$product_pack}
{/block}
{/foreach}
</section>
{/if}
{/block}
{block name='product_discounts'}
{include file='catalog/_partials/product-discounts.tpl'}
{/block}
{block name='product_add_to_cart'}
{include file='catalog/_partials/product-add-to-cart.tpl'}
{/block}
{block name='product_additional_info'}
{include file='catalog/_partials/product-additional-info.tpl'}
{/block}
{* Input to refresh product HTML removed, block kept for compatibility with themes *}
{block name='product_refresh'}{/block}
</form>
{/block}
</div>
{block name='hook_display_reassurance'}
{hook h='displayReassurance'}
{/block}
{block name='product_tabs'}
<div class="tabs">
<ul class="nav nav-tabs" role="tablist">
{if $product.description}
<li class="nav-item">
<a
class="nav-link{if $product.description} active{/if}"
data-toggle="tab"
href="#description"
role="tab"
aria-controls="description"
{if $product.description} aria-selected="true"{/if}>{l s='Description' d='Shop.Theme.Catalog'}</a>
</li>
{/if}
<li class="nav-item">
<a
class="nav-link{if !$product.description} active{/if}"
data-toggle="tab"
href="#product-details"
role="tab"
aria-controls="product-details"
{if !$product.description} aria-selected="true"{/if}>{l s='Product Details' d='Shop.Theme.Catalog'}</a>
</li>
{if $product.attachments}
<li class="nav-item">
<a
class="nav-link"
data-toggle="tab"
href="#attachments"
role="tab"
aria-controls="attachments">{l s='Attachments' d='Shop.Theme.Catalog'}</a>
</li>
{/if}
{foreach from=$product.extraContent item=extra key=extraKey}
<li class="nav-item">
<a
class="nav-link"
data-toggle="tab"
href="#extra-{$extraKey}"
role="tab"
aria-controls="extra-{$extraKey}">{$extra.title}</a>
</li>
{/foreach}
</ul>
<div class="tab-content" id="tab-content">
<div class="tab-pane fade in{if $product.description} active{/if}" id="description" role="tabpanel">
{block name='product_description'}
<div class="product-description">{$product.description nofilter}</div>
{/block}
</div>
{block name='product_details'}
{include file='catalog/_partials/product-details.tpl'}
{/block}
{block name='product_attachments'}
{if $product.attachments}
<div class="tab-pane fade in" id="attachments" role="tabpanel">
<section class="product-attachments">
<p class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</p>
{foreach from=$product.attachments item=attachment}
<div class="attachment">
<h4><a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">{$attachment.name}</a></h4>
<p>{$attachment.description}</p
<a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">
{l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
</a>
</div>
{/foreach}
</section>
</div>
{/if}
{/block}
{foreach from=$product.extraContent item=extra key=extraKey}
<div class="tab-pane fade in {$extra.attr.class}" id="extra-{$extraKey}" role="tabpanel" {foreach $extra.attr as $key => $val} {$key}="{$val}"{/foreach}>
{$extra.content nofilter}
</div>
{/foreach}
</div>
</div>
{/block}
</div>
</div>
</div>
{block name='product_accessories'}
{if $accessories}
<section class="product-accessories clearfix">
<p class="h5 text-uppercase">{l s='You might also like' d='Shop.Theme.Catalog'}</p>
<div class="products">
{foreach from=$accessories item="product_accessory"}
{block name='product_miniature'}
{include file='catalog/_partials/miniatures/product.tpl' product=$product_accessory}
{/block}
{/foreach}
</div>
</section>
{/if}
{/block}
{block name='product_footer'}
{hook h='displayFooterProduct' product=$product category=$category}
{/block}
{block name='product_images_modal'}
{include file='catalog/_partials/product-images-modal.tpl'}
{/block}
{block name='page_footer_container'}
<footer class="page-footer">
{block name='page_footer'}
<!-- Footer content -->
{/block}
</footer>
{/block}
</section>
{/block}
4.\themes\classic\templates\catalog_partials\product-prices.tpl
`
{**
{block name='product_price'}
<div
class="product-price h5 {if $product.has_discount}has-discount{/if}"
itemprop="offers"
itemscope
itemtype="https://schema.org/Offer"
>
<link itemprop="availability" href="{$product.seo_availability}"/>
<meta itemprop="priceCurrency" content="{$currency.iso_code}">
<meta itemprop="priceValidUntil" content="{'Y'|date+1}-12-31">
<meta itemprop="url" content="{$link->getProductLink($smarty.get.id_product)|escape:'htmlall':'UTF-8'}">
<div class="current-price">
<span itemprop="price" content="{$product.price_amount}">{$product.price}</span>
{if $product.has_discount}
{if $product.discount_type === 'percentage'}
<span class="discount discount-percentage">{l s='Save %percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</span>
{else}
<span class="discount discount-amount">
{l s='Save %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
</span>
{/if}
{/if}
</div>
{block name='product_unit_price'}
{if $displayUnitPrice}
<p class="product-unit-price sub">{l s='(%unit_price%)' d='Shop.Theme.Catalog' sprintf=['%unit_price%' => $product.unit_price_full]}</p>
{/if}
{/block}
</div>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" style="display:none">
<span itemprop="ratingValue">5</span>
<span itemprop="ratingCount">1</span> </div>
<meta itemprop="brand" content="{if !empty(Manufacturer::getnamebyid($product.id_manufacturer))}{Manufacturer::getnamebyid($product.id_manufacturer)}{else}{Configuration::get('PS_SHOP_NAME')}{/if}">
<meta itemprop="image" content="{$product.cover.bySize.home_default.url}">
<meta itemprop="sku" content="{$product->id}" />
<meta itemprop="mpn" content="{$product->reference}" />
<div itemprop="review" itemscope itemtype="http://schema.org/Review" style="display:none">
<span itemprop="author">{Configuration::get('PS_SHOP_NAME')}</span>,
<meta itemprop="datePublished" content="{'Y'|date}-{'m'|date}-{'d'|date}">
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1"/>
<span itemprop="ratingValue">5</span>/
<span itemprop="bestRating">5</span>
</div>
<span itemprop="description"></span>
</div>
{* --- *}
{/block}
{block name='product_without_taxes'}
{if $priceDisplay == 2}
<p class="product-without-taxes">{l s='%price% tax excl.' d='Shop.Theme.Catalog' sprintf=['%price%' => $product.price_tax_exc]}</p>
{/if}
{/block}
{block name='product_pack_price'}
{if $displayPackPrice}
<p class="product-pack-price"><span>{l s='Instead of %price%' d='Shop.Theme.Catalog' sprintf=['%price%' => $noPackPrice]}</span></p>
{/if}
{/block}
{block name='product_ecotax'}
{if $product.ecotax.amount > 0}
<p class="price-ecotax">{l s='Including %amount% for ecotax' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.ecotax.value]}
{if $product.has_discount}
{l s='(not impacted by the discount)' d='Shop.Theme.Catalog'}
{/if}
</p>
{/if}
{/block}
{hook h='displayProductPriceBlock' product=$product type="weight" hook_origin='product_sheet'}
<div class="tax-shipping-delivery-label">
{if !$configuration.taxes_enabled}
{l s='No tax' d='Shop.Theme.Catalog'}
{elseif $configuration.display_taxes_label}
{$product.labels.tax_long}
{/if}
{hook h='displayProductPriceBlock' product=$product type="price"}
{hook h='displayProductPriceBlock' product=$product type="after_price"}
{if $product.additional_delivery_times == 1}
{if $product.delivery_information}
<span class="delivery-information">{$product.delivery_information}</span>
{/if}
{elseif $product.additional_delivery_times == 2}
{if $product.quantity > 0}
<span class="delivery-information">{$product.delivery_in_stock}</span>
{* Out of stock message should not be displayed if customer can't order the product. *}
{elseif $product.quantity <= 0 && $product.add_to_cart_url}
<span class="delivery-information">{$product.delivery_out_stock}</span>
{/if}
{/if}
</div>
Special thanks to Jaep and Webbax, without their guides, I would not make it :)
https://shotwithlove.dk/en/botanic/green-banana-leaves-poster.html
Hello,
I tried to resolve the problem by following your solution, i am also on PS 1.7.6.1 but amazingly i cannot find the file /public_html/themes/classic/templates/catalog/_partials | productlist.tpl . I verified several times but it is not there. Anyone can help out what i'm missing?
Best regards,
Maniot
hi
the ItemList is a wrong solution, because it is possible to use just one time in a page, if there are some carousels will be presente some errors.
@maniot at this moment productlist.tpl is not present in the classic theme, you need to create it
bye
Hi Maniot / Maofree
I agree with maofree that removing itemlist is not a proper solution. I have also got an error later on "A value for the itemListElement field is required." It is definitely something still has to be resolved.
@maniot: In order to have the productlist.tpl , go to your hosting provider, create a file in the desired folder and paste the following code into it.
themes/classic/templates/catalog/_partials/productlist.tpl
{**
* 2007-2019 PrestaShop and Contributors
*
* 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.txt.
* 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://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2019 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
{foreach from=$products item="product" key="position"}
{include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
{/foreach}
</div>
In additional have a look at the link below:
https://github.com/PrestaShop/PrestaShop/pull/14558/files#diff-81d8fb082229455fb3663bf270c7f15e
Hi Maofree / Jenci666,
Thanks for your fast respons,
I'm trying to get my products on Facebook Ads by a facebook pixel, Facebook was complaining about quite a lot of missing micro data which for the most parts have been solved. There is one still missing which blocks Facebook Ads; The warning is:
_A required field is missing: id
Products without "id" information can't be uploaded. Please check that this field is included for each product in a separate, labeled column_
Regards Maniot
Hi Maniot
I am sorry but, I am not familiar with Facebook pixel. I cannot help you with this ID issue.
hi
fixed 2 microdata errors
https://github.com/PrestaShop/PrestaShop/issues/17739
https://github.com/PrestaShop/PrestaShop/issues/17737
bye
@Jenci666,
Thanks anyway.
@maofree ,
I followed your fixes #17739 and #17737 , but i am not sure i've done it correctly,
{if isset($product.reference_to_display) && $product.reference_to_display neq ''}
<div class="product-reference">
<label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label>
<span itemprop="mpn">{$product.reference_to_display}</span>
<meta itemprop="sku" content="{$product.id}" />
</div>
{/if}
I'm still getting errors, please look at the Google tool:https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fthe-dreamstore.com%2Fjurkjes-en-rokjes%2F289-tuniek-oud-roze-rib.html
Regards,
Maniot
Hi Maniot
Can you share your shop URL?
Hi,
Sure, https://the-dreamstore.com
Can you share your product.tpl file?
You should find it here.
/public_html/themes/classic/templates/catalog/_partials/miniatures | product.tpl
here's the product.tpl:
`{**
{block name='product_miniature_item'}
{}
<div class="thumbnail-container">
{block name='product_thumbnail'}
{if $product.cover}
<a href="{$product.canonical_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.canonical_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.canonical_url}">{$product.name|truncate:30:'...'}</a></h3>
{else}
<h2 class="h3 product-title" itemprop="name"><a href="{$product.canonical_url}">{$product.name|truncate:30:'...'}</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="sr-only">{l s='Regular price' d='Shop.Theme.Catalog'}</span>
<span class="regular-price">{$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="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
<span class="price">{$product.price}</span>
<meta itemprop="brand" content="{if !empty(Manufacturer::getnamebyid($product.id_manufacturer))}{Manufacturer::getnamebyid($product.id_manufacturer)}{else}{Configuration::get('PS_SHOP_NAME')}{/if}">
{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>
<!-- @todo: use include file='catalog/_partials/product-flags.tpl'} -->
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.flags item=flag}
<li class="product-flag {$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
<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"></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>
{/block}_
`
hi @maniot
the https://github.com/PrestaShop/PrestaShop/issues/17737 is very simple to fix you need only you need only to remove the itemprop="description" and itemprop="image" from 2 tpl files
the other for sku and mpn I suggest a solution
Hi @maofree ,
The fix #17737 , i've already put it in place. Thanks
For me rests the problem of the missing ID.
Can you confirm that for the #17739 fix i've added the right lines:
{if isset($product.reference_to_display) && $product.reference_to_display neq ''} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="mpn">{$product.reference_to_display}</span> <meta itemprop="sku" content="{$product.id}" /> </div> {/if}
I've added the result from the google testing tool
Thanks
@maniot
go in product-details.tpl and add this line under the {/if} of the reference block
<meta itemprop="sku" content="{$product.id}{if isset($product.id_product_attribute) && $product.id_product_attribute}-{$product.id_product_attribute}{/if}" />
also from this file change from
<span itemprop="sku">{$product.reference_to_display}</span>
to
<span itemprop="mpn">{$product.reference_to_display}</span>
then add the brand microdata
{if isset($product_manufacturer->id) && $product_manufacturer->name}
<meta itemprop="brand" content="{$product_manufacturer->name}" />
{/if}
@maofree,
I made the changes and i'm now on 0 errors and 6 warnings in the google test tool. However Facebook ads is still complaining that there is an error : missing ID.
Could it be the general ID mentioned on the bottom of the google test tool report?
Thanks
@maniot
brand and mpn are missed (you need to look better the image above)
however I'm no expert of socials (I use this solution on sku to show the same sku of google shopping feed), I made modules for other things
I suggest you to have a look here and ask to the developer before to buy something is you need one of them
https://mypresta.eu/modules/social-networks/
bye
@maofree,
I already use two of Vekia's modules, i'm using the module facebookpixel to add a catalog to Facebook. The module works perfect, there's only the problem of the missing microdata ID
According to docs from facebook this is what they need:
follow my suggestions above
set mpn like I said
<span itemprop="sku">{$product.reference_to_display}</span>
to
<span itemprop="mpn">{$product.reference_to_display}</span>
or ask to Vekia how to solve this problem
@maofree ,
I think i've correctly copied the code, however i didn't have a reference or brand for this product, after giving it a reference the mpn works as expected. Unfortunally it's not what facebook wants.
Thanks for your help. I will ask Vekia for support
Best regards,
Maniot
@maniot
sorry the correct like for sku (I have removed neq ' ') is
<meta itemprop="sku" content="{$product.id}{if isset($product.id_product_attribute) && $product.id_product_attribute}-{$product.id_product_attribute}{/if}" />
Hi @maniot
I have just realized that there is another file alltogether 4 what needs to be modified in order to get the same results as I got. Try to set back everything as it was and follow my guide to modify 3 files and create 1.
I have updated my first post...
I have been sruggling with the same issue a long time, I am sure that it should work for you too.
You will need to modify the product-prices.tpl this is what I missed.
what you will find here:
\themes\classic\templates\catalog_partials\product-prices.tpl
If you cannot succeed, send me all 3 original template files I mentioned above and I will make the modification for you.
@Jenci666 / @maofree ,
Finally i managed to get it right so that it's accepted by Facebook ads by adding <meta itemprop="productID" content="{$product.id}{if isset($product.id_product_attribute) && $product.id_product_attribute}-{$product.id_product_attribute}{/if}" />
in product-details.tpl
so i think my problem is solved, probably not as it should be done and not for all pages but it works.
Thanks to both off you, i learned already a lot about structured data now.
@maniot
good news
can you create a new topic on github to ask to prestashop to fix this problem?
@maniot
Great news, I am glad you managed :)
Hello there,
What is the version of PrestaShop to install in order to fix this Google ""Either 'ratingCount' or 'reviewCount' should be specified"" things ?
Thanks,
Hello there,
What is the version of PrestaShop to install in order to fix this Google ""Either 'ratingCount' or 'reviewCount' should be specified"" things ?
Thanks,
This is controlled by your theme. If you are using the Classic Theme or a theme based on it, the bugfix is available for PS 1.7.7.0 which is not released yet (should be available in April/May 2020). However you can see the needed changes for Classic Theme in PR https://github.com/PrestaShop/PrestaShop/pull/14558.
If your theme is done by a 3rd party developer you must ask the developer or do it yourself
@matks Any chance you can release this fix in the up coming 1.7.6.4?
Hello, I looked at the previous tutorial page regarding google search console errors. But despite having modified the files, product.tpl, product-price.tpl, product-details.tpl, productlist.tpl, etc ...
I still have a problem with "brand", "name" and "extract of opinion" I am on prestashop 1.7.6.4
@vadrien1999 This issue has been fixed on the 177x branch.
@ vadrien1999 Ce problème a été corrigé sur la branche 177x.
would you have a link? because I followed the tutorial to this letter to the letter but I still have a problem with brand, name and opinion extract. the rest I have no problem
@vadrien1999 The related PR is #14558
@vadrien1999 The related PR is #14558
thank you very much I managed to solve the name and extract of the opinion problems. But I still have a problem with brand. Could you help me please
@vadrien1999 The related PR is #14558
thank you very much I managed to solve the name and extract of the opinion problems. But I still have a problem with brand. Could you help me please
Please open a new issue :)
Most helpful comment
Hi @khouloudbelguith , I recommend this issue be re-opened, as other information strongly suggests that this is actually a real concern due to recent changes in the Google Search Console. Have a look at https://github.com/woocommerce/woocommerce/issues/22896 for a very similar issue opened and being worked there, where the current working thinking is similar to my comments at the top of this issue. Essentially Google Search Console is now flagging errors (not warnings) for incorrectly structured Product schema, which is still the case with
themes/classic/templates/catalog/_partials/miniatures/product.tpl
:I recommend a thorough review of the schema markup to ensure proper rules compliance, or these new errors are going to be flagged in Google Search Console against all recent PrestaShop instances.