Jump to content
  • 0

Nie wyświetlająca się cena w rich snippet


kazunarii

Question

8 answers to this question

Recommended Posts

  • 0

Od razu się wyświetlać nie będzie. Spróbuj zaindeksować nowy produkt w wyszukiwarce jeżeli dane strukturalne są ok. 

 

Niestety tyczy się to produktów zarówno nowo zaindeksowanych, jak również tych które są na sklepie od kilku miesięcy.

Link to comment
Share on other sites

  • 0

Raczej WSZYSTKO nie jest w porządku:

https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fmedpak.com.pl%2Fswanson-cynk-zinc-glukonian-30-mg-250-tabletek

Są dwa błędy z modułu komentarze produktu.

Jeśli wszystkie dane strukturalne są poprawne, to wtedy produkt zostaje zaindeksowany, a nie trochę dobrze, a trochę do kitu :).

 

Masa szablonów ma niechlujnie zrobione templatki jeśli chodzi o rich snippety.

Reklamacja do developera szablonu, niech to poprawia.

Link to comment
Share on other sites

  • 0

@e_com Akurat w tym przypadku jest to wina źle zaprojektowanych snippetów we wtyczce productcomments oraz productcomments-extra ;) Domyślnie miałem ten sam problem z modułem komentarzy i tylko ręczne całkowite przebudowanie struktury wyświetlania pomogło, ale zrobiłem to dla siebie i raczej pod inne templatki to nie będzie pasować. 

Powiem tylko tyle, że sporo czasu zajęło mi ogarnięcie dlaczego również i mi nie wyświetlały się dane strukturalne i to właśnie ten moduł najwięcej namodził, więc to ten element niech pierwszy zareklamuje - jak tylko to naprawi to wszystko zadziała i trzeba uważać, ponieważ domyślnie narzędzie do testowania snippetów nie pokaże błędów w productcomments (bez extra) a snippety dalej by nie działały.

Może komuś zawartość tych plików pomoże sprawdzić jak powinna wyglądać ta struktura.

productcomments.pl
 

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (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:
* http://opensource.org/licenses/afl-3.0.php
* 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 newersend_friend_form_content
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<div id="idTab5">
	<div id="product_comments_block_tab">
		{if $comments}
			{foreach from=$comments item=comment}
				{if $comment.content}
				<div class="comment row" itemprop="review" itemscope itemtype="https://schema.org/Review">
					<div class="comment_author col-sm-2">

						<div class="comment_author_infos">
							<i class="icon-user t34 cgrey4 mtb13"></i>
							<strong itemprop="author">{$comment.customer_name|escape:'html':'UTF-8'}</strong>
							<em itemprop="datePublished">{dateFormat date=$comment.date_add|escape:'html':'UTF-8' full=0}</em>
						</div>
					</div> <!-- .comment_author -->

					<div class="comment_details col-sm-8">
						<h5 itemprop="name" class="title_block"><i class="icon-quote-left mr13"></i>{$comment.title}   <i class="icon-quote-right"></i></h5>
						<p itemprop="description">{$comment.content|escape:'html':'UTF-8'|nl2br}</i></p>

					</div><!-- .comment_details -->
					<div class="col-sm-2">
						<div class="star_content" itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating">
							<span>Ocena </span>
							<meta itemprop="worstRating" content = "1">
							<span itemprop="ratingValue">{$comment.grade}</span><span>/</span><span itemprop="bestRating">5</span><br>
							{section name="i" start=0 loop=5 step=1}
								{if $comment.grade le $smarty.section.i.index}
									<div class="star"></div>
								{else}
									<div class="star star_on"></div>
								{/if}
							{/section}
							<br>
							<div class="t14 mt13">
								{if $comment.total_advice > 0}
										{l s='%1$d out of %2$d people found this review useful.' sprintf=[$comment.total_useful,$comment.total_advice] mod='productcomments'}

								{/if}
								{if $is_logged}
									<hr class="mt5 mb8">
									{if !$comment.customer_advice}
											{l s='Was this comment useful to you?' mod='productcomments'}<br>
											<button class="btn btn-default button button-small" data-is-usefull="1" data-id-product-comment="{$comment.id_product_comment}">
												<span>{l s='Yes' mod='productcomments'}</span>
											</button>
											<button class="btn btn-default button button-small" data-is-usefull="0" data-id-product-comment="{$comment.id_product_comment}">
												<span>{l s='No' mod='productcomments'}</span>
											</button>
									{/if}
									{*{if !$comment.customer_report}
									<span class="report_btn" data-id-product-comment="{$comment.id_product_comment}">
										{l s='Report abuse' mod='productcomments'}
									</span>
									{/if}*}
								{/if}
							</div>


						</div>
					</div>
				</div> <!-- .comment -->
				{/if}
			{/foreach}
			{if (!$too_early AND ($is_logged OR $allow_guests))}
			<p class="align_center">
				<a id="new_comment_tab_btn" class="btn btn-default open-comment-form" href="#new_comment_form">
					<i class="icon-pencil cdarkgreen mr13"></i><span>{l s='Write your review!' mod='productcomments'}</span>
				</a>
			</p>
			{/if}
		{else}
			{if (!$too_early AND ($is_logged OR $allow_guests))}
			<p class="align_center">
				<a id="new_comment_tab_btn" class="mybtn grey open-comment-form" href="#new_comment_form">
					<span><i class="icon-pencil mr8 cdarkgreen hvrwhite"></i> {l s='Be the first to write your review!' mod='productcomments'}</span>
				</a>
			</p>
			{else}
			<p class="align_center">{l s='No customer reviews for the moment.' mod='productcomments'}</p>
			{/if}
		{/if}
	</div> <!-- #product_comments_block_tab -->
</div>

<!-- Fancybox -->
<div style="display: none;">
	<div id="new_comment_form">
		<form id="id_new_comment_form" action="#">
			<h2 class="page-subheading">
				{l s='Write a review' mod='productcomments'}
			</h2>
			<div class="row">
				{if isset($product) && $product}
					<div class="product clearfix  col-xs-12 col-sm-6">
						<img src="{$productcomment_cover_image}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product->name|escape:'html':'UTF-8'}" />
						<div class="product_desc">
							<p class="product_name">
								<strong>{$product->name}</strong>
							</p>
							{*{$product->description_short}*}
						</div>
					</div>
				{/if}
				<div class="new_comment_form_content col-xs-12 col-sm-6">
					<div id="new_comment_form_error" class="error" style="display: none; padding: 15px 25px">
						<ul></ul>
					</div>
					{if $criterions|@count > 0}
						<ul id="criterions_list">
						{foreach from=$criterions item='criterion'}
							<li>
								<label>Jakość: </label>
								<div class="star_content">
									<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />
									<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="2" />
									<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="3" />
									<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="4" />
									<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" checked="checked" />
								</div>
							</li>
						{/foreach}
						</ul>
					{/if}
					<label for="comment_title">
						{l s='Title:' mod='productcomments'} <sup class="required">*</sup>
					</label>
					<input id="comment_title" name="title" type="text" value=""/>
					<label for="content">
						{l s='Comment:' mod='productcomments'} <sup class="required">*</sup>
					</label>
					<textarea id="content" name="content"></textarea>
					{if $allow_guests == true && !$is_logged}
						<label>
							{l s='Your name:' mod='productcomments'} <sup class="required">*</sup>
						</label>
						<input id="commentCustomerName" name="customer_name" type="text" value=""/>
					{/if}
					<div id="new_comment_form_footer">
						<input id="id_product_comment_send" name="id_product" type="hidden" value='{$id_product_comment_form}' />
						<p class="required"><sup>*</sup> {l s='Required fields' mod='productcomments'}</p>
						<p>
							<button id="submitNewMessage" name="submitMessage" type="submit" class="btn button button-small">
								<span>{l s='Submit' mod='productcomments'}</span>
							</button> 
							{l s='or' mod='productcomments'} 
							<a class="closefb" href="#">
								{l s='Cancel' mod='productcomments'}
							</a>
						</p>
						<div class="clearfix"></div>
					</div> <!-- #new_comment_form_footer -->
				</div>
			</div>
		</form><!-- /end new_comment_form_content -->
	</div>
</div>
<!-- End fancybox -->
{strip}
{addJsDef productcomments_controller_url=$productcomments_controller_url|@addcslashes:'\''}
{addJsDef moderation_active=$moderation_active|boolval}
{addJsDef productcomments_url_rewrite=$productcomments_url_rewriting_activated|boolval}
{addJsDef secure_key=$secure_key}

{addJsDefL name=confirm_report_message}{l s='Are you sure that you want to report this comment?' mod='productcomments' js=1}{/addJsDefL}
{addJsDefL name=productcomment_added}{l s='Your comment has been added!' mod='productcomments' js=1}{/addJsDefL}
{addJsDefL name=productcomment_added_moderation}{l s='Your comment has been added and will be available once approved by a moderator.' mod='productcomments' js=1}{/addJsDefL}
{addJsDefL name=productcomment_title}{l s='New comment' mod='productcomments' js=1}{/addJsDefL}
{addJsDefL name=productcomment_ok}{l s='OK' mod='productcomments' js=1}{/addJsDefL}
{/strip}

productcomments-extra.tpl

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (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:
* http://opensource.org/licenses/afl-3.0.php
* 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 http://www.prestashop.com for more information.
* H:\www\prestashop\themes\default-bootstrap\modules\productcomments\productcomments-extra.tpl
H:\www\prestashop\modules\productcomments\productcomments.php
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2015 PrestaShop SA
*  @version  Release: $Revision$
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if (!$content_only && (($nbComments == 0 && $too_early == false && ($is_logged || $allow_guests)) || ($nbComments != 0)))}
	<div id="product_comments_block_extra" class="no-print">
		<div {if $countvotes.grade > 0} itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"{/if}>
			{if $countvotes.grade > 0}
				<div class="comments_note clearfix">
					<div class="star_content fl mr13">
						{section name="i" start=0 loop=5 step=1}
							{if $myaverage.grade|round:1 le $smarty.section.i.index}
								<div class="star"></div>
							{else}
								<div class="star star_on"></div>
							{/if}
						{/section}
					</div>
					<div class="fl t16 cgrey6">{l s='Rating' mod='productcomments'} <span itemprop="ratingValue" class="cgrey1">{$myaverage.grade|round:1}</span> spośród
						<span itemprop="ratingCount">{$countvotes.grade}</span> {if $countvotes.grade == 1 }oceny
						{elseif $countvotes.grade >= 2}ocen{/if}
					</div>
				</div> <!-- .comments_note -->
				<meta itemprop="worstRating" content = "1" />
				<meta itemprop="bestRating" content = "5" />
			{/if}
			<ul class="comments_advices">
				{if $countvotes.grade > 0}
					<li>
						<a href="#idTab5" class="reviews">
							{l s='Read reviews' mod='productcomments'} (<span itemprop="reviewCount">{$countvotes.grade}</span>)
						</a>
					</li>
				{/if}
				{if ($too_early == false AND ($is_logged OR $allow_guests))}
					<li>
						<a class="open-comment-form" href="#new_comment_form">
							{l s='Write a review' mod='productcomments'}
						</a>
					</li>
				{/if}
			</ul>
		</div>
	</div>
{/if}
<!--  /Module ProductComments -->

  • Like 1
Link to comment
Share on other sites

  • 0

@krzysiuus - tak, istnieje jeszcze zjawisko w którym google uzna, że wyniki prezentowane na Twojej stronie nie pokrywają się ze snippetami i dostajesz filtr. Co najśmieszniejsze, u mnie dopiero po około tygodniu od wprowadzenia zmian według wzorców dopiero zaczęły snippety działać, nawet pomimo ręcznego przesyłania do indeksu przez web webmaster Tools. To jednak temat na inną działkę.

Do "dobrego wdrożenia" to nawet jeśli tester nie wykaże błędów nie oznacza, że dane są poprawne. Całe schema.org jest bardzo otwarte na interpretację i jak dla mnie jedyną drogą na poprawne ustawienie tych wartości było testowanie stron na których te snippety po prostu działają i kopiowanie od nich struktury. Za dużo czasu straciłem na czytaniu analiz na wielu blogach odnośnie pewnego schematu, w którym każdy autor twierdził, że jego metoda jest skuteczna.

Edited by hakeryk2 (see edit history)
Link to comment
Share on other sites

  • 0

Wczesne wersje "default-bootstrap" miały właśnie sknocone templatki modułu komentarzy jeśli chodzi o rich snippery, a szabloniarze po prostu je przekopiowali dodając tylko swoje uślicznienia.

Ale to było tak dawno, że do dziś mogli by to poprawić.

@hateryk2 ja z modyfikacją swoich templatek w tym module poszedłem jeszcze dalej. Nie chce mi się pisać samemu komentarzy w swoim sklepie (jak robią to wszyscy), to zrobiłem tak, że czy mam jakieś komentarze, czy ich nie mam, to u wujka googla i tak mam same piątki :D

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...