Kosstas
Хранитель порядка
- Регистрация
- 9 Мар 2014
- Сообщения
- 489
- Реакции
- 889
product.tpl найтиЭто отображение рейтинга на главной странице на карточке товара. С Google Snippets не работает. Что вписать кто в курсе?
Код:<a class="rating_box leo-rating-{$product.id_product}" href="#" rel="{$product.id_product}" style="display:none"> <i class="fa fa-star-o"></i> <i class="fa fa-star-o"></i> <i class="fa fa-star-o"></i> <i class="fa fa-star-o"></i> <i class="fa fa-star-o"></i> </a>
</div> <!-- end views-block -->
<!-- end thumbnails -->
После него вставить код
PHP:
<!-- Start Richsnipets -->
{if !empty($bColStyle)}<div style="width: 100% !important;">{/if}
{*<div {if !empty($sBadgeFreeStyle)}style="{$sBadgeFreeStyle}"{else}class="GSRBadge_{$sBadgeStyle} GSRBadge"{/if}>*}
<div {if !empty($sBadgeFreeStyle)}style="{$sBadgeFreeStyle}"{/if} class="GSRBadge_{$sBadgeStyle} GSRBadge">
<div class="GSRMedal"></div>
{*<div id="GSRMClose">x</div>*}
{* DISPLAY RICH SNIPPETS *}
{if !empty($sBadgeStyle) && ($sBadgeStyle == "bottom" || $sBadgeStyle == "top")}
{assign var="sGsrSeparator" value=" - "}
{assign var="sGsrSeparatorTop" value=""}
{else}
{assign var="sGsrSeparator" value="<br />"}
{assign var="sGsrSeparatorTop" value="<br />"}
{/if}
<div id="GSRReviewSnippets">
<div itemscope itemtype="http://data-vocabulary.org/Product">
<strong><span itemprop="name">{$aProduct.name|escape:'htmlall'}{$sGsrSeparator}</span></strong>
{if $bUseBrand == true && !empty($aProduct.manufacturer_name)}<span itemprop="brand">{$aProduct.manufacturer_name|escape:'htmlall'}</span>{$sGsrSeparator}{/if}
{*if !empty($aProduct.imgUrl)} <img itemprop="image" src="{$aProduct.imgUrl}">{$sGsrSeparator} {/if*}
{if !empty($aProduct.googleDesc) && !empty($bUseDesc)}<span itemprop="description">{$aProduct.googleDesc|escape:'htmlall'|truncate:60:"..."}</span>{$sGsrSeparator}{/if}
{if !empty($aProduct.category) && !empty($bUseCat)}{l s='Category' mod='gsnippetsreviews'} : <span itemprop="category" content="{$aProduct.category|escape:'htmlall'}">{$aProduct.category}</span>{$sGsrSeparator}{/if}
{if $bUseIdentifier == true && (!empty($aProduct.ean13) || !empty($aProduct.upc))}
{l s='Product GTIN' mod='gsnippetsreviews'} :
{if !empty($aProduct.ean13)}
<span itemprop="identifier" content="upc:{$aProduct.ean13}">{$aProduct.ean13}{$sGsrSeparator}</span>
{elseif !empty($aProduct.upc)}
<span itemprop="identifier" content="upc:{$aProduct.upc}">{$aProduct.upc}{$sGsrSeparator}</span>
{/if}
{if !empty($aProduct.reference)}
{l s='Product Ref' mod='gsnippetsreviews'} : <span itemprop="identifier" content="sku:{$aProduct.reference}">{$aProduct.reference}</span>{$sGsrSeparator}
{/if}
{/if}
{if $bUseSupplier == true && !empty($aProduct.supplier_reference)}
{l s='Supplier Ref' mod='gsnippetsreviews'} : <span itemprop="identifier" content="mpn:{$aProduct.supplier_reference}">{$aProduct.supplier_reference}</span>{$sGsrSeparator}
{/if}
{* Offer Aggregate *}
{if !empty($aProduct.combinations) && !empty($bOfferAggregate)}
<span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer-aggregate">
{if !empty($aProduct.highestPrice) && !empty($bUseHighPrice) && $aProduct.highestPrice > $aProduct.lowestPrice}{l s='From' mod='gsnippetsreviews'} {/if}{$aProduct.currencyPrefix} <span itemprop="lowPrice" content="{$aProduct.lowestPrice}">{$aProduct.lowestPrice}</span> {$aProduct.currencySuffix}
{if !empty($aProduct.highestPrice) && !empty($bUseHighPrice) && $aProduct.highestPrice > $aProduct.lowestPrice} {l s='to' mod='gsnippetsreviews'} {$aProduct.currencyPrefix} <span itemprop="highPrice" content="{$aProduct.highestPrice}">{$aProduct.highestPrice}</span> {$aProduct.currencySuffix} {/if}{$sGsrSeparator}
<meta itemprop="currency" content="{$aProduct.currency}">
{if !empty($aProduct.offerCount) && !empty($bUseOfferCount)}<meta itemprop="offerCount" content="{$aProduct.offerCount}">{/if}
{if !empty($bUseCondition)}
{l s='Condition' mod='gsnippetsreviews'} :
<span itemprop="condition" content="{$aProduct.condition}">
{if $aProduct.condition == "used"}
{l s='Used' mod='gsnippetsreviews'}
{elseif $aProduct.condition == "refurbished"}
{l s='Refurbished' mod='gsnippetsreviews'}
{else}
{l s='New' mod='gsnippetsreviews'}
{/if}
</span>
{/if}
</span>
{* Offer *}
{else}
<span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
<meta itemprop="currency" content="{$aProduct.currency}">
{l s='Price' mod='gsnippetsreviews'} : {$aProduct.currencyPrefix} <span itemprop="price">{$aProduct.price}</span> {$aProduct.currencySuffix} {$sGsrSeparator}
{if !empty($aProduct.untilDate) && !empty($bUseUntilDate)}
({l s='Sale ends' mod='gsnippetsreviews'} <time itemprop="priceValidUntil" datetime="{$aProduct.untilDate}">{$aProduct.untilDateHuman}</time>){$sGsrSeparator}
{/if}
{if !empty($aProduct.seller) && !empty($bUseSeller)}
{l s='Available from' mod='gsnippetsreviews'} <span itemprop="seller"> "{$aProduct.sSeller|escape:'htmlall'}"</span>{$sGsrSeparator}
{/if}
{if !empty($bUseCondition)}
{l s='Condition' mod='gsnippetsreviews'} :
<span itemprop="condition" content="{$aProduct.condition}">
{if $aProduct.condition == "used"}
{l s='Used' mod='gsnippetsreviews'}
{elseif $aProduct.condition == "refurbished"}
{l s='Refurbished' mod='gsnippetsreviews'}
{else}
{l s='New' mod='gsnippetsreviews'}
{/if}
</span>{$sGsrSeparator}
{/if}
{if !empty($bUseAvailability)}
{l s='Stock:' mod='gsnippetsreviews'}
{if $aProduct.quantity > 0 || $aProduct.stockManagement == 0}
<span itemprop="availability" content="in_stock">{l s='In Stock' mod='gsnippetsreviews'}</span>{$sGsrSeparatorTop}
{else}
<span itemprop="availability" content="out_of_stock">{l s='Out of Stock' mod='gsnippetsreviews'}</span>{$sGsrSeparatorTop}
{/if}
{/if}
{if !empty($bUseStock)}{l s='Quantity' mod='gsnippetsreviews'} : <span itemprop="quantity" content="{$aProduct.quantity}">{$aProduct.quantity}</span>{/if}
</span>
{/if}
<br />
{include file="`$sIncludeReviewSnippets`" bProductPage=true}
</div>
</div>
{* /DISPLAY RICH SNIPPETS *}
<!-- End Richsnipets -->
</div>