54 lines
3.4 KiB
Smarty
Raw Normal View History

2017-08-29 10:46:12 +02:00
{if isset($badge)}
{$badge}
{/if}
{if !isset($display_reviews)}
{if !isset($priceDisplayPrecision)}
{assign var='priceDisplayPrecision' value=2}
{/if}
<div itemscope itemtype="http://data-vocabulary.org/Product" class="reviewsAgregate">
<strong><span itemprop="name">{$product->name|escape:'htmlall'}</span></strong><br/>
{if !empty($product->manufacturer_name)}<span itemprop="brand">{$product->manufacturer_name|escape:'htmlall'}</span><br/>{/if}
{if !empty($product->meta_description)}<span itemprop="description">{$product->meta_description|escape:'htmlall'|truncate:60:"..."}</span><br/>{/if}
{if !empty($product->category)}{l s='Category' mod='ekomi'} : <span itemprop="category" content="{$product->category|escape:'htmlall'}">{$product->category}</span><br/>{/if}
{if (!empty($product->ean13) || !empty($product->upc))}
{l s='Product GTIN' mod='ekomi'} :
{if !empty($product->ean13)}
<span itemprop="identifier" content="upc:{$product->ean13}">{$product->ean13}</span><br/>
{elseif !empty($product->upc)}
<span itemprop="identifier" content="upc:{$product->upc}">{$product->upc}</span><br/>
{/if}
{if !empty($product->reference)}
{l s='Product Ref' mod='ekomi'} : <span itemprop="identifier" content="sku:{$product->reference}">{$product->reference}</span><br/>
{/if}
{/if}
<span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
<meta itemprop="currency" content="{$currencyIso}">
{l s='Price' mod='ekomi'} : <span itemprop="price">{$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {$currencySign|html_entity_decode:2:"UTF-8"}</span><br/>
{l s='Stock:' mod='ekomi'}
{if $product->quantity > 0 || $product->stockManagement == 1}
<span itemprop="availability" content="in_stock">{l s='In Stock' mod='ekomi'}</span><br/>
{else}
<span itemprop="availability" content="out_of_stock">{l s='Out of Stock' mod='ekomi'}</span>
{/if}
</span>
<br />
{if $count}
<strong>{l s='Rating(s) and review(s)' mod='ekomi'} :</strong>
<span itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
<span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating">
<span class="ekomiBadgeRateBg" style="background: url({$pathStar}) repeat-x;">
{section name="stars" loop=$rating}
<span class="ekomiBadgeRateElement" style="background: url({$pathStar}) no-repeat 0px -32px;"></span>
{/section}
</span>
<br/>
{l s='Average:' mod='ekomi'} <span itemprop="average">{$rating|round:"1"}</span> / <span itemprop="best">5</span>
</span>
{if !empty($count)}{l s='Based on' mod='ekomi'} <span itemprop="votes">{$count}</span> {l s='rating(s)' mod='ekomi'}{/if}
{if !empty($count)}{l s='and' mod='ekomi'}{else}{l s='Based on' mod='ekomi'} {/if} <span itemprop="count">{$count}</span> {l s='user review(s)' mod='ekomi'}.
</span>
{/if}
</div>
{/if}