Jump to content

Recommended Posts

There are several ways to include ratings in reviews.

 

Example: File: blockcart.tpl. Module: Blockcart:

 

<div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">

<br />

<img itemprop="photo" alt="Puntuación tuverano.com" src="http://images.tuverano.com/img/logo-puntuacion.jpg" /><br />

<span itemprop="itemreviewed">tuverano.com</span>

<span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating"><br />

<span itemprop="average">9.3</span> de <span itemprop="best">10</span>

</span>sobre <span itemprop="votes">24</span> puntuaciones.<br />

<span itemprop="count">Más de 8</span> <a href="/content/8-tu-opinion-es-importante/" title="Opiniones clientes" rel="nofollo

w">Comentarios de clientes</a><br /><br />

</div>

 

Attach file google search "spa hinchable".

 

 

Regards,

Jpe Franco

post-103662-0-94305000-1335629528_thumb.jpg

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

You can give Google detailed product information we can use to display rich snippets right on our search results pages.

 

Example: File: product.tpl

 

 

<div itemscope itemtype="http://data-vocabulary.org/Product">

<span itemprop="name">{$product->name}</span>

<span itemprop="description">{$product->description_short}</span>

<img itemprop="image" src="http://www.tuverano.com{$link->getImageLink($product->link_rewrite,$cover.id_image,'small')}" />

<span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">

<meta itemprop="currency" content="EUR" />

<br />

<span itemprop="price">{$product->getPrice(true, $smarty.const.NULL, 2)} euros (IVA incluido)</span>

<!-- <span itemprop="availability" content="in_stock">¡Haz tu pedido mientras aún está disponible!</span> -->

</span>

</div>

 

Example google search: "spa camaro"

 

Regards,

Jpe Franco

Blog: crear tienda online

Edited by tuverano.com (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Organization information that is marked up in the body of a web page can help Google understand location information.

 

Example: File: footer.tpl.

 

<div itemscope itemtype="http://data-vocabulary.org/Organization">

<span itemprop="name">Soluciones eCommerce Innova S.L.</span><br />

<span itemprop="address" itemscope

itemtype="http://data-vocabulary.org/Address">

<span itemprop="street-address">Calle Ulises 13</span> - 

<span itemprop="locality">Sevilla</span> - 

<span itemprop="postal-code">41020</span> - 

<span itemprop="region">Sevilla</span> - 

</span>

Tel: <span itemprop="tel">637-766-202  619-381-995</span><br />

<a href="http://www.tuverano.com/" itemprop="url">http://www.tuverano.com</a>

</div>

<br />

 

 

Regards,

Jpe Franco

Edited by Mike Kranzler
Any artificial signatures will be removed. Abuse will result in a ban. (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Rich snippets with Breadcrumbs:

 

Update file: classes/Tools.php

 

static public function getPath($id_category, $path = '', $linkOntheLastItem = false)

{

global $link, $cookie;

$category = new Category(intval($id_category), intval($cookie->id_lang));

if (!Validate::isLoadedObject($category))

die (self::displayError());

if ($category->id == 1)

return $path;

$pipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PI

PE') : '>');

$category_name = Category::hideCategoryPosition($category->name);

// htmlentitiezed because this method generates some view

if ($path != $category_name)

{

$displayedPath = '';

if ($category->active)

$displayedPath .='<span typeof="v:Breadcrumb"><a href="'.self::safeOutput($link->getCategoryLink($categ

ory)).'/"'.' rel="v:url" property="v:title">';

$displayedPath .= htmlentities($category_name, ENT_NOQUOTES, 'UTF-8');

if ($category->active)

$displayedPath .= '</a> > ';

$displayedPath .= '</span>'.$path;

}

else

 

$displayedPath = ($linkOntheLastItem ? '<span typeof="v:Breadcrumb"><a href="'.s

elf::safeOutput($link->getCategoryLink($category)).'/"'.' rel="v:url" property="v:title">' : '').htmlent

ities($path, ENT_NOQUOTES, 'UTF-8').($linkOntheLastItem ? '</a></span>' : '');

return self::getPath(intval($category->id_parent), $displayedPath);

}

 

static public function getFullPath($id_category, $end)

{

global $cookie;

 

$pipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PI

PE') : '>');

$category = new Category(intval($id_category), intval($cookie->id_lang));

if (!Validate::isLoadedObject($category))

die(self::displayError());

if ($id_category == 1)

return htmlentities($end, ENT_NOQUOTES, 'UTF-8');

return self::getPath($id_category, Category::hideCategoryPosition($category->name), true

);

}

 

Update file: breadcrumb.tpl

 

<!-- Breadcrumb -->

{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}

<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#">

{if $path}{$path}{/if}

</div>

<!-- /Breadcrumb -->

post-103662-0-30068300-1338546802_thumb.jpg

Edited by tuverano.com (see edit history)
Link to comment
Share on other sites

  • 5 months later...

hi,

thaks a lot for these informations, i'm working on my own products description, and i want to add itempop="category", but i don't know what to put in my product.tpt html code.

i started by:

<span itemprop="category" content="I DON'T KNOW">COSMETIC PRODUCTS</span>

I HAVE TO PUT SOMETHING between brakets (i don't know) in order t have th right order of categries example: skin care>green clay

WHEN i submit my product decription to Google Structured Data Testing Tool i have this:messsage:

Avertissement : Page contains property "category" which is not part of the schema.

 

thanks for your response.

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

{$product->category}

thank you for your response, i mut your code juste here:

 

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

<meta itemprop="priceCurrency" content="MAD" />

<span itemprop="price"class="our_price_display">

<span itemprop="seller" content="arganu.ma"></span>

<span itemprop="itemCondition" content="new"> </span>

<span itemprop="availability" content="in_stock"> </span>

<span itemprop="category">{$product->category}</span>

</div>

 

and google still shows the same avertissment.

Link to comment
Share on other sites

You are not closing your span tags, and you are not putting any information in them. You have to have the smarty variable for price and thing like that in the tags.

 

first thanks for your response, yes i know that i'm not putting any information in the tags because i don't want loose custemors who will find that my price is too expensive, so i'd like that they take a look on my store. and keeping my rich snippets allows me to give some information to google robot in order to make me upper in googleresearch.

You are not closing your span tags, and you are not putting any information in them. You have to have the smarty variable for price and thing like that in the tags. do you think that is right?

what must i to do in order to close them

 

Here is a topic I started on this a while back with links to some tools and info from google on how to do the rich snippets thing for what its worth...

 

http://www.prestasho...101#entry917101

thanks for you info, i took a look on your previous post, I know that it is the same bt i am using schema.org it's a little bit different, that's why I have some difficult to insert category in my schema.org/offer
Link to comment
Share on other sites

Well, if they are blank google will disregard them. To close them use

</span>

 

But by being blank, google will get no information and throw them out.

 

okay, I just finish to complete blanks by this way:

 

 

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

<span itemprop="priceCurrency" content="MAD" />{$currencySign|html_entity_decode:2:"UTF-8"}</span>

<span itemprop="price"class="our_price_display">our_price_display</span>

<span itemprop="seller" content="arganu.ma"></span>

<span itemprop="itemCondition" content="new">Nouveau</span>

<span itemprop="availability" content="in_stock">En stock</span>

<span itemprop="category">{$product->category}</span>

 

and when I come back to my product page description i found

DH our_price_display Nouveau home 140,00DH TTC this on my price :s

 

help!

Link to comment
Share on other sites

this is my original product.tpl

 

 

 

{include file="$tpl_dir./errors.tpl"}

{if $errors|@count == 0}

<script type="text/javascript">

// <![CDATA[

 

// PrestaShop internal settings

var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';

var currencyRate = '{$currencyRate|floatval}';

var currencyFormat = '{$currencyFormat|intval}';

var currencyBlank = '{$currencyBlank|intval}';

var taxRate = {$tax_rate|floatval};

var jqZoomEnabled = {if $jqZoomEnabled}true{else}false{/if};

 

//JS Hook

var oosHookJsCodeFunctions = new Array();

 

// Parameters

var id_product = '{$product->id|intval}';

var productHasAttributes = {if isset($groups)}true{else}false{/if};

var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};

var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};

var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};

var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';

var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';

var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};

var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};

var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};

var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};

var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};

var group_reduction = '{$group_reduction}';

var default_eco_tax = {$product->ecotax};

var ecotaxTax_rate = {$ecotaxTax_rate};

var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';

var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};

var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};

var displayPrice = {$priceDisplay};

var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';

var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};

var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';

var productUnitPriceRatio = '{$product->unit_price_ratio}';

var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};

 

// Customizable field

var img_ps_dir = '{$img_ps_dir}';

var customizationFields = new Array();

{assign var='imgIndex' value=0}

{assign var='textFieldIndex' value=0}

{foreach from=$customizationFields item='field' name='customizationFields'}

{assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"}

customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();

customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';

customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if};

{/foreach}

 

// Images

var img_prod_dir = '{$img_prod_dir}';

var combinationImages = new Array();

 

{if isset($combinationImages)}

{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}

combinationImages[{$combinationId}] = new Array();

{foreach from=$combination item='image' name='f_combinationImage'}

combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval};

{/foreach}

{/foreach}

{/if}

 

combinationImages[0] = new Array();

{if isset($images)}

{foreach from=$images item='image' name='f_defaultImages'}

combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image};

{/foreach}

{/if}

 

// Translations

var doesntExist = '{l s='The product does not exist in this model. Please choose another.' js=1}';

var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}';

var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' js=1}';

var uploading_in_progress = '{l s='Uploading in progress, please wait...' js=1}';

var fieldRequired = '{l s='Please fill in all required fields' js=1}';

 

{if isset($groups)}

// Combinations

{foreach from=$combinations key=idCombination item=combination}

addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity});

{/foreach}

// Colors

{if $colors|@count > 0}

{if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if}

{/if}

{/if}

//]]>

</script>

 

{include file="$tpl_dir./breadcrumb.tpl"}

<h1>{$product->name|escape:'htmlall':'UTF-8'}</h1>

 

<div id="primary_block" class="clearfix">

 

{if isset($adminActionDisplay) && $adminActionDisplay}

<div id="admin-action">

<p>{l s='This product is not visible to your customers.'}

<input type="hidden" id="admin-action-product-id" value="{$product->id}" />

<input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 0)"/>

<input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 1)"/>

</p>

<div class="clear" ></div>

<p id="admin-action-result"></p>

</p>

</div>

{/if}

 

{if isset($confirmation) && $confirmation}

<p class="confirmation">

{$confirmation}

</p>

{/if}

 

<!-- right infos-->

<div id="pb-right-column">

 

{if $product->online_only}

<span class="online_only">{l s='Online only'} !</span>

{/if}

 

{if isset($colors) && $colors}

<!-- colors -->

<div id="color_picker">

<p>{l s='Pick a color:' js=1}</p>

<div class="clear"></div>

<ul id="color_to_pick_list">

{foreach from=$colors key='id_attribute' item='color'}

<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background:{$color.value}" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>

{/foreach}

</ul>

<div class="clear"></div>

</div>

{/if}

 

<!-- product img-->

<div id="image-block">

{if $have_image}

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}"

{if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

{else}

<img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" />

{/if}

</div>

 

<!-- usefull links-->

<ul id="usefull_link_block">

{if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

<li><a href="javascript:print();">{l s='Print'}</a><br class="clear" /></li>

{if $have_image && !$jqZoomEnabled}

<li><span id="view_full_size" class="span_link">{l s='View full size'}</span></li>

{/if}

</ul>

 

<div class="clear"></div>

 

{if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}

 

</div>

 

<!-- left infos-->

<div id="pb-left-column">

 

{if $product->description_short OR $packItems|@count > 0}

<div id="short_description_block">

{if $product->description_short}

<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>

{/if}

{*{if $product->description}

<p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>

{/if}*}

{if $packItems|@count > 0}

<h3>{l s='Pack content'}</h3>

{foreach from=$packItems item=packItem}

<div class="pack_content">

{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>

{*<p>{$packItem.description_short}</p>*}

</div>

{/foreach}

{/if}

</div>

{/if}

 

{if isset($images) && count($images) > 0}

<!-- thumbnails -->

<div id="views_block" {if isset($images) && count($images) < 2}class="hidden"{/if}>

{if isset($images) && count($images) > 4}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if}

<div id="thumbs_list">

<ul id="thumbs_list_frame">

{if isset($images)}

{foreach from=$images item=image name=thumbnails}

{assign var=imageIds value="`$product->id`-`$image.id_image`"}

<li id="thumbnail_{$image.id_image}">

<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">

<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" />

</a>

</li>

{/foreach}

{/if}

</ul>

</div>

{if isset($images) && count($images) > 4}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if}

</div>

{/if}

{if isset($images) && count($images) > 1}<p class="clear" style="float:right;width:360px;margin-top:-25px;margin-right:5px;text-align:right"><span id="wrapResetImages" style="display:none"><img src="{$img_dir}icon/cancel_16x18.gif" alt="{l s='Cancel'}" width="16" height="18"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if}

 

{if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}

<!-- add to cart form-->

<form id="buy_block" class="{if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}hidden{else}jqtransform{/if}" action="{$link->getPageLink('cart.php')}" method="post">

 

<div id="buy_block_top">

 

<!-- hidden datas -->

<p class="hidden">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />

<input type="hidden" name="add" value="1" />

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

</p>

 

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

 

{foreach from=$groups key=id_attribute_group item=group}

{if $group.attributes|@count}

<p>

<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

{assign var="groupName" value="group_$id_attribute_group"}

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>

{/foreach}

</select>

</p>

{/if}

{/foreach}

</div>

{/if}

 

<!-- prices -->

{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

<p class="price">

{if !$priceDisplay || $priceDisplay == 2}

{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}

{elseif $priceDisplay == 1}

{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}

{/if}

{if $product->on_sale}

{*<img src="{$img_dir}onsale_{$lang_iso}.png" alt="{l s='On sale'}" class="on_sale_img"/>*}

<span class="on_sale">{l s='On sale'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}

<span class="discount">{l s='Reduced price'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{/if}

<span class="our_price_display">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

<span id="our_price_display">{convertPrice price=$productPrice}</span>

{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

</span>

{if $priceDisplay == 2}

<span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>

{/if}

</p>

{if $product->specificPrice AND $product->specificPrice.reduction}

<p id="old_price"><span class="bold">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

{if $productPriceWithoutRedution > $productPrice}

{l s='instead of'} <span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>

{if $tax_enabled && $display_tax_label == 1}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

{/if}

</span>

</p>

{/if}

{if $packItems|@count}

<p class="pack_price">{l s='instead of'} <span style="text-decoration:line-through">{convertPrice price=$product->getNoPackPrice()}</span></p>

{/if}

{if $product->ecotax != 0}

<p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'}

{if $product->specificPrice AND $product->specificPrice.reduction}

<br />{l s='(not impacted by the discount)'}

{/if}

</p>

{/if}

{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p>

{/if}

{*close if for show price*}

{/if}

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display:none"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

<!-- minimal quantity wanted -->

<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>{l s='You must add '}<b id="minimal_quantity_label">{$product->minimal_quantity}</b>{l s=' as a minimum quantity to buy this product.'}</p>

{if $product->minimal_quantity > 1}

<script type="text/javascript">

checkMinimalQuantity();

</script>

{/if}

 

<!-- availability -->

<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<span id="availability_label">{l s='Availability:'}</span>

<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>

{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

</span>

</p>

 

<!-- number of item in stock -->

{if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)}

<p id="pQuantityAvailable"{if $product->quantity <= 0} style="display:none"{/if}>

<span id="quantityAvailable">{$product->quantity|intval}</span>

<span {if $product->quantity > 1} style="display:none"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span>

<span {if $product->quantity == 1} style="display:none"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span>

</p>

{/if}

<!-- Out of stock hook -->

<p id="oosHook"{if $product->quantity > 0} style="display:none"{/if}>

{$HOOK_PRODUCT_OOS}

</p>

 

<p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if} >{l s='Warning: Last items in stock!'}</p>

 

</div>

 

<div id="buy_block_bottom">

 

<!-- quantity wanted -->

<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<label>{l s='Quantity :'}</label>

<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

</p>

 

<p{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} style="display:none"{/if} id="add_to_cart"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}

<div class="clear"></div>

</div>

</form>

{/if}

</div>

</div>

 

{if $quantity_discounts}

<!-- quantity discount -->

<ul class="idTabs">

<li><a class="selected">{l s='Quantity discount'}</a></li>

</ul>

<div id="quantityDiscount">

<table class="std">

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<th>{$quantity_discount.quantity|intval}

{if $quantity_discount.quantity|intval > 1}

{l s='quantities'}

{else}

{l s='quantity'}

{/if}

</th>

{/foreach}

</tr>

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<td>

{if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'}

-{convertPrice price=$quantity_discount.real_value|floatval}

{else}

-{$quantity_discount.real_value|floatval}%

{/if}

</td>

{/foreach}

</tr>

</table>

</div>

{/if}

 

 

<!-- description and features -->

{if $product->description || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments}

<div id="more_info_block" class="clear" {if isset($accessories) AND $accessories}style="width:470px;float:left"{/if}>

<ul id="more_info_tabs" class="idTabs idTabsShort">

{if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if}

{if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if}

{if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if}

</ul>

<div id="more_info_sheets" class="sheets align_justify">

{if $product->description}

<!-- full description -->

<div id="idTab1" class="rte">{$product->description}</div>

{/if}

{if $features}

<!-- product's features -->

<ul id="idTab2" class="bullet">

{foreach from=$features item=feature}

<li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

{if $attachments}

<ul id="idTab9" class="bullet">

{foreach from=$attachments item=attachment}

<li><a href="{$link->getPageLink('attachment.php', true)}?id_attachment={$attachment.id_attachment}">{$attachment.name|escape:'htmlall':'UTF-8'}</a><br />{$attachment.description|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

</div>

</div>

{/if}

 

{if isset($accessories) AND $accessories}

<div id="accessories_block">

<ul class="idTabs idTabsShort">

<li><a href="#idTab4">{l s='Accessories'}</a></li>

</ul>

<!-- accessories -->

<ul id="idTab4" class="bullet"><li style="background:none;margin:0;padding:0">

<div class="block products_block accessories_block clearfix">

<div class="block_content">

<ul>

{foreach from=$accessories item=accessory name=accessories_list}

{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">

{if isset($accessory.online_only) && $accessory.online_only}<span class="online_only">{l s='Online only'} !</span>{/if}

<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'small')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" /></a>

<h5>{if isset($accessory.new) && $accessory.new == 1}<span class="new">{l s='new'}</span>{/if}<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.name|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:55:'...':true|escape:'htmlall':'UTF-8'}</a></h5>

{*<div class="product_desc"><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:35:'...'}</a></div>*}

<div>

{if isset($accessory.on_sale) && $accessory.on_sale && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale'} !</span>

{elseif isset($accessory.reduction) && $accessory.reduction && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Promotion'} !</span>{/if}

{*<p class="product_accessories_price">*}

{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span></p>{else}<div style="height:27px"></div>{/if}

<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>

{if $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

{if ($accessory.allow_oosp || $accessory.quantity > 0)}

<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

{else}

<span class="exclusive">{l s='Add to cart'}</span>

{*<span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>*}

{/if}

{/if}

{*</p>*}

</div>

</li>

{/foreach}

</ul>

</div>

</div>

</li></ul>

</div>

{/if}

 

<!-- Customizable products -->

{if $product->customizable}

<ul class="idTabs clear">

<li><a class="selected">{l s='Product customization'}</a></li>

</ul>

<div class="customization_block">

<form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm">

<p>

<img src="{$img_dir}icon/infos.gif" alt="Informations" />

{l s='After saving your customized product, remember to add it to your cart.'}

{if $product->uploadable_files}<br />{l s='Allowed file formats are: GIF, JPG, PNG'}{/if}

</p>

{if $product->uploadable_files|intval}

<h3>{l s='Pictures'}</h3>

<ul id="uploadable_files">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 0}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

{if isset($pictures.$key)}<div class="customizationUploadBrowse">

<img src="{$pic_dir}{$pictures.$key}_small" alt="" />

<a href="{* $link->getProductDeletePictureLink($product,{$field.id_customization_field})*}" title="{l s='Delete'}" >

<img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />

</a>

</div>{/if}

<div class="customizationUploadBrowse"><input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your hard drive'}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<div class="clear"></div>

{if $product->text_fields|intval}

<h3>{l s='Texts'}</h3>

<ul id="text_fields">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 1}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

<div class="customizationUploadBrowse"><textarea type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="2" cols="50" class="customization_block_input" />{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<p style="clear:left" id="customizedDatas">

<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />

<input type="hidden" name="submitCustomizedDatas" value="1" />

<input type="button" class="button" value="{l s='Save'}" onclick="javascript:saveCustomization()" />

<span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span>

</p>

</form>

<p class="clear required"><sup>*</sup> {l s='Required field'}</p>

</div>

{/if}

 

{if $packItems|@count > 0}

<div id="pack">

<h2>{l s='Pack content'}</h2>

{include file="$tpl_dir./product-list.tpl" products=$packItems}

</div>

{/if}

 

{if $HOOK_PRODUCT_TAB}

<div id="hook_product_tab">

<ul class="idTabs idTabsShort clear">

{$HOOK_PRODUCT_TAB}

</ul>

<div class="sheets align_justify">

{$HOOK_PRODUCT_TAB_CONTENT}

</div>

</div>

{/if}

 

{/if}

{$HOOK_PRODUCT_FOOTER}

 

 

 

 

 

and this is my product.tpl modified

 

 

{include file="$tpl_dir./errors.tpl"}

{if $errors|@count == 0}

<script type="text/javascript">

// <![CDATA[

 

// PrestaShop internal settings

var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';

var currencyRate = '{$currencyRate|floatval}';

var currencyFormat = '{$currencyFormat|intval}';

var currencyBlank = '{$currencyBlank|intval}';

var taxRate = {$tax_rate|floatval};

var jqZoomEnabled = {if $jqZoomEnabled}true{else}false{/if};

 

//JS Hook

var oosHookJsCodeFunctions = new Array();

 

// Parameters

var id_product = '{$product->id|intval}';

var productHasAttributes = {if isset($groups)}true{else}false{/if};

var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};

var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};

var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};

var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';

var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';

var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};

var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};

var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};

var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};

var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};

var group_reduction = '{$group_reduction}';

var default_eco_tax = {$product->ecotax};

var ecotaxTax_rate = {$ecotaxTax_rate};

var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';

var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};

var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};

var displayPrice = {$priceDisplay};

var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';

var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};

var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';

var productUnitPriceRatio = '{$product->unit_price_ratio}';

var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};

 

// Customizable field

var img_ps_dir = '{$img_ps_dir}';

var customizationFields = new Array();

{assign var='imgIndex' value=0}

{assign var='textFieldIndex' value=0}

{foreach from=$customizationFields item='field' name='customizationFields'}

{assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"}

customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();

customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';

customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if};

{/foreach}

 

// Images

var img_prod_dir = '{$img_prod_dir}';

var combinationImages = new Array();

 

{if isset($combinationImages)}

{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}

combinationImages[{$combinationId}] = new Array();

{foreach from=$combination item='image' name='f_combinationImage'}

combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval};

{/foreach}

{/foreach}

{/if}

 

combinationImages[0] = new Array();

{if isset($images)}

{foreach from=$images item='image' name='f_defaultImages'}

combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image};

{/foreach}

{/if}

 

// Translations

var doesntExist = '{l s='The product does not exist in this model. Please choose another.' js=1}';

var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}';

var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' js=1}';

var uploading_in_progress = '{l s='Uploading in progress, please wait...' js=1}';

var fieldRequired = '{l s='Please fill in all required fields' js=1}';

 

{if isset($groups)}

// Combinations

{foreach from=$combinations key=idCombination item=combination}

addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity});

{/foreach}

// Colors

{if $colors|@count > 0}

{if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if}

{/if}

{/if}

//]]>

</script>

 

{include file="$tpl_dir./breadcrumb.tpl"}

<div itemscope itemtype="http://schema.org/product">

<h1 itemprop="name">{$product->name|escape:'htmlall':'UTF-8'}</h1>

 

 

<div id="primary_block" class="clearfix">

 

{if isset($adminActionDisplay) && $adminActionDisplay}

<div id="admin-action">

<p>{l s='This product is not visible to your customers.'}

<input type="hidden" id="admin-action-product-id" value="{$product->id}" />

<input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 0)"/>

<input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 1)"/>

</p>

<div class="clear" ></div>

<p id="admin-action-result"></p>

</p>

</div>

{/if}

 

{if isset($confirmation) && $confirmation}

<p class="confirmation">

{$confirmation}

</p>

{/if}

 

<!-- right infos-->

<div id="pb-right-column">

 

{if $product->online_only}

<span class="online_only">{l s='Online only'} !</span>

{/if}

 

{if isset($colors) && $colors}

<!-- colors -->

<div id="color_picker">

<p>{l s='Pick a color:' js=1}</p>

<div class="clear"></div>

<ul id="color_to_pick_list">

{foreach from=$colors key='id_attribute' item='color'}

<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background:{$color.value}" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>

{/foreach}

</ul>

<div class="clear"></div>

</div>

{/if}

 

<!-- product img-->

<div id="image-block">

{if $have_image}

<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}"

{if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

{else}

<img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" />

{/if}

</div>

 

<!-- usefull links-->

<ul id="usefull_link_block">

{if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

<li><a href="javascript:print();">{l s='Print'}</a><br class="clear" /></li>

{if $have_image && !$jqZoomEnabled}

<li><span id="view_full_size" class="span_link">{l s='View full size'}</span></li>

{/if}

</ul>

 

<div class="clear"></div>

 

{if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}

 

</div>

 

<!-- left infos-->

<div id="pb-left-column">

 

{if $product->description_short OR $packItems|@count > 0}

<div id="short_description_block">

{if $product->description_short}

<div itemprop="description" id="short_description_content" class="rte align_justify">{$product->description_short}</div>

<span itemprop="category" content=""> </span>

{/if}

<p class="buttons_bottom_block"><a href="javascript:{}" class="button" rel="nofollow">Plus de détails</a></p>

{if $packItems|@count > 0}

<h3>{l s='Pack content'}</h3>

{foreach from=$packItems item=packItem}

<div class="pack_content">

{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>

{*<p>{$packItem.description_short}</p>*}

</div>

{/foreach}

{/if}

</div>

{/if}

 

{if isset($images) && count($images) > 0}

<!-- thumbnails -->

<div id="views_block" {if isset($images) && count($images) < 2}class="hidden"{/if}>

{if isset($images) && count($images) > 4}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if}

<div id="thumbs_list">

<ul id="thumbs_list_frame">

{if isset($images)}

{foreach from=$images item=image name=thumbnails}

{assign var=imageIds value="`$product->id`-`$image.id_image`"}

<li id="thumbnail_{$image.id_image}">

<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">

<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" />

</a>

</li>

{/foreach}

{/if}

</ul>

</div>

{if isset($images) && count($images) > 4}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if}

</div>

{/if}

{if isset($images) && count($images) > 1}<p class="clear" style="float:right;width:360px;margin-top:-25px;margin-right:5px;text-align:right"><span id="wrapResetImages" style="display:none"><img src="{$img_dir}icon/cancel_16x18.gif" alt="{l s='Cancel'}" width="16" height="18"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if}

 

{if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}

<!-- add to cart form-->

<form id="buy_block" class="{if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}hidden{else}jqtransform{/if}" action="{$link->getPageLink('cart.php')}" method="post">

 

<div id="buy_block_top">

 

<!-- hidden datas -->

<p class="hidden">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />

<input type="hidden" name="add" value="1" />

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

</p>

 

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

 

{foreach from=$groups key=id_attribute_group item=group}

{if $group.attributes|@count}

<p>

<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

{assign var="groupName" value="group_$id_attribute_group"}

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>

{/foreach}

</select>

</p>

{/if}

{/foreach}

</div>

{/if}

 

<!-- prices -->

{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

<p class="price">

{if !$priceDisplay || $priceDisplay == 2}

{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}

{elseif $priceDisplay == 1}

{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}

{/if}

{if $product->on_sale}

{*<img src="{$img_dir}onsale_{$lang_iso}.png" alt="{l s='On sale'}" class="on_sale_img"/>*}

<span class="on_sale">{l s='On sale'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}

<span class="discount">{l s='Reduced price'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{/if}

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

<meta itemprop="priceCurrency" content="MAD" />

<span itemprop="price"class="our_price_display">

<span itemprop="seller" content="Arganu.ma"></span>

<span itemprop="itemCondition" content="new"> </span>

<span itemprop="availability" content="in_stock"> </span>

{if $priceDisplay >= 0 && $priceDisplay <= 2}

<span id="our_price_display">{convertPrice price=$productPrice}</span>

{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

</span>

{if $priceDisplay == 2}

<span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>

{/if}

</p>

{if $product->specificPrice AND $product->specificPrice.reduction}

<p id="old_price"><span class="bold">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

{if $productPriceWithoutRedution > $productPrice}

{l s='instead of'} <span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>

{if $tax_enabled && $display_tax_label == 1}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

{/if}

</span>

</p>

{/if}

{if $packItems|@count}

<p class="pack_price">{l s='instead of'} <span style="text-decoration:line-through">{convertPrice price=$product->getNoPackPrice()}</span></p>

{/if}

{if $product->ecotax != 0}

<p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'}

{if $product->specificPrice AND $product->specificPrice.reduction}

<br />{l s='(not impacted by the discount)'}

{/if}

</p>

{/if}

{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p>

{/if}

{*close if for show price*}

{/if}

</div>

 

<p itemprop="productID" id="product_reference" {if isset($groups) OR !$product->reference}style="display:none"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

<!-- minimal quantity wanted -->

<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>{l s='You must add '}<b id="minimal_quantity_label">{$product->minimal_quantity}</b>{l s=' as a minimum quantity to buy this product.'}</p>

{if $product->minimal_quantity > 1}

<script type="text/javascript">

checkMinimalQuantity();

</script>

{/if}

 

<!-- availability -->

<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<span id="availability_label">{l s='Availability:'}</span>

<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>

{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

</span>

</p>

 

<!-- number of item in stock -->

{if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)}

<p id="pQuantityAvailable"{if $product->quantity <= 0} style="display:none"{/if}>

<span id="quantityAvailable">{$product->quantity|intval}</span>

<span {if $product->quantity > 1} style="display:none"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span>

<span {if $product->quantity == 1} style="display:none"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span>

</p>

{/if}

<!-- Out of stock hook -->

<p id="oosHook"{if $product->quantity > 0} style="display:none"{/if}>

{$HOOK_PRODUCT_OOS}

</p>

 

<p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if} >{l s='Warning: Last items in stock!'}</p>

 

</div>

 

<div id="buy_block_bottom">

 

<!-- quantity wanted -->

<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<label>{l s='Quantity :'}</label>

<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

</p>

 

<p{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} style="display:none"{/if} id="add_to_cart"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}

<div class="clear"></div>

</div>

</form>

{/if}

</div>

</div>

</div>

 

{if $quantity_discounts}

<!-- quantity discount -->

<ul class="idTabs">

<li><a class="selected">{l s='Quantity discount'}</a></li>

</ul>

<div id="quantityDiscount">

<table class="std">

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<th>{$quantity_discount.quantity|intval}

{if $quantity_discount.quantity|intval > 1}

{l s='quantities'}

{else}

{l s='quantity'}

{/if}

</th>

{/foreach}

</tr>

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<td>

{if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'}

-{convertPrice price=$quantity_discount.real_value|floatval}

{else}

-{$quantity_discount.real_value|floatval}%

{/if}

</td>

{/foreach}

</tr>

</table>

</div>

{/if}

 

 

<!-- description and features -->

{if $product->description || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments}

<div id="more_info_block" class="clear" {if isset($accessories) AND $accessories}style="width:470px;float:left"{/if}>

<ul id="more_info_tabs" class="idTabs idTabsShort">

{if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if}

{if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if}

{if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if}

</ul>

<div id="more_info_sheets" class="sheets align_justify">

{if $product->description}

<!-- full description -->

<div id="idTab1" class="rte">{$product->description}</div>

{/if}

{if $features}

<!-- product's features -->

<ul id="idTab2" class="bullet">

{foreach from=$features item=feature}

<li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

{if $attachments}

<ul id="idTab9" class="bullet">

{foreach from=$attachments item=attachment}

<li><a href="{$link->getPageLink('attachment.php', true)}?id_attachment={$attachment.id_attachment}">{$attachment.name|escape:'htmlall':'UTF-8'}</a><br />{$attachment.description|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

</div>

</div>

{/if}

 

{if isset($accessories) AND $accessories}

<div id="accessories_block">

<ul class="idTabs idTabsShort">

<li><a href="#idTab4">{l s='Accessories'}</a></li>

</ul>

<!-- accessories -->

<ul id="idTab4" class="bullet"><li style="background:none;margin:0;padding:0">

<div class="block products_block accessories_block clearfix">

<div class="block_content">

<ul>

{foreach from=$accessories item=accessory name=accessories_list}

{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">

{if isset($accessory.online_only) && $accessory.online_only}<span class="online_only">{l s='Online only'} !</span>{/if}

<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'small')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" /></a>

<h5>{if isset($accessory.new) && $accessory.new == 1}<span class="new">{l s='new'}</span>{/if}<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.name|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:55:'...':true|escape:'htmlall':'UTF-8'}</a></h5>

{*<div class="product_desc"><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:35:'...'}</a></div>*}

<div>

{if isset($accessory.on_sale) && $accessory.on_sale && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale'} !</span>

{elseif isset($accessory.reduction) && $accessory.reduction && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Promotion'} !</span>{/if}

{*<p class="product_accessories_price">*}

{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span></p>{else}<div style="height:27px"></div>{/if}

<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>

{if $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

{if ($accessory.allow_oosp || $accessory.quantity > 0)}

<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

{else}

<span class="exclusive">{l s='Add to cart'}</span>

{*<span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>*}

{/if}

{/if}

{*</p>*}

</div>

</li>

{/foreach}

</ul>

</div>

</div>

</li></ul>

</div>

{/if}

 

<!-- Customizable products -->

{if $product->customizable}

<ul class="idTabs clear">

<li><a class="selected">{l s='Product customization'}</a></li>

</ul>

<div class="customization_block">

<form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm">

<p>

<img src="{$img_dir}icon/infos.gif" alt="Informations" />

{l s='After saving your customized product, remember to add it to your cart.'}

{if $product->uploadable_files}<br />{l s='Allowed file formats are: GIF, JPG, PNG'}{/if}

</p>

{if $product->uploadable_files|intval}

<h3>{l s='Pictures'}</h3>

<ul id="uploadable_files">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 0}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

{if isset($pictures.$key)}<div class="customizationUploadBrowse">

<img src="{$pic_dir}{$pictures.$key}_small" alt="" />

<a href="{* $link->getProductDeletePictureLink($product,{$field.id_customization_field})*}" title="{l s='Delete'}" >

<img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />

</a>

</div>{/if}

<div class="customizationUploadBrowse"><input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your hard drive'}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<div class="clear"></div>

{if $product->text_fields|intval}

<h3>{l s='Texts'}</h3>

<ul id="text_fields">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 1}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

<div class="customizationUploadBrowse"><textarea type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="2" cols="50" class="customization_block_input" />{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<p style="clear:left" id="customizedDatas">

<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />

<input type="hidden" name="submitCustomizedDatas" value="1" />

<input type="button" class="button" value="{l s='Save'}" onclick="javascript:saveCustomization()" />

<span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span>

</p>

</form>

<p class="clear required"><sup>*</sup> {l s='Required field'}</p>

</div>

{/if}

 

{if $packItems|@count > 0}

<div id="pack">

<h2>{l s='Pack content'}</h2>

{include file="$tpl_dir./product-list.tpl" products=$packItems}

</div>

{/if}

 

{if $HOOK_PRODUCT_TAB}

<div id="hook_product_tab">

<ul class="idTabs idTabsShort clear">

{$HOOK_PRODUCT_TAB}

</ul>

<div class="sheets align_justify">

{$HOOK_PRODUCT_TAB_CONTENT}

</div>

</div>

{/if}

 

{/if}

{$HOOK_PRODUCT_FOOTER}

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

Sorry, I didn't understand the trouble in English :(

 

My problem is that i want to add rich snippets to my product.tpl file, so, I chose schema.org http://www.schema.or...l#microdata_how), the problem is i don't know exactly how to add theses properties on my product.tpl code.

that's why i send to you my original product.tpl file, hopping to have the correct codes.

 

Since it has no size and it is inheriting, you don't need to hide it. Also google will get wise to that and black list your site.

Correct DH.. the docs specifically say if you have hidden text it wont work.

 

yes i agree with you both, but how can I add rich snippets on my product.tpl file.

thank you a lt for your help.

 

This is my original Product.tpl :

{include file="$tpl_dir./errors.tpl"}

{if $errors|@count == 0}

<script type="text/javascript">

// <![CDATA[

 

// PrestaShop internal settings

var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';

var currencyRate = '{$currencyRate|floatval}';

var currencyFormat = '{$currencyFormat|intval}';

var currencyBlank = '{$currencyBlank|intval}';

var taxRate = {$tax_rate|floatval};

var jqZoomEnabled = {if $jqZoomEnabled}true{else}false{/if};

 

//JS Hook

var oosHookJsCodeFunctions = new Array();

 

// Parameters

var id_product = '{$product->id|intval}';

var productHasAttributes = {if isset($groups)}true{else}false{/if};

var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};

var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};

var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};

var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';

var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';

var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};

var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};

var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};

var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};

var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};

var group_reduction = '{$group_reduction}';

var default_eco_tax = {$product->ecotax};

var ecotaxTax_rate = {$ecotaxTax_rate};

var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';

var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};

var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};

var displayPrice = {$priceDisplay};

var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';

var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};

var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';

var productUnitPriceRatio = '{$product->unit_price_ratio}';

var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};

 

// Customizable field

var img_ps_dir = '{$img_ps_dir}';

var customizationFields = new Array();

{assign var='imgIndex' value=0}

{assign var='textFieldIndex' value=0}

{foreach from=$customizationFields item='field' name='customizationFields'}

{assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"}

customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();

customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';

customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if};

{/foreach}

 

// Images

var img_prod_dir = '{$img_prod_dir}';

var combinationImages = new Array();

 

{if isset($combinationImages)}

{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}

combinationImages[{$combinationId}] = new Array();

{foreach from=$combination item='image' name='f_combinationImage'}

combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval};

{/foreach}

{/foreach}

{/if}

 

combinationImages[0] = new Array();

{if isset($images)}

{foreach from=$images item='image' name='f_defaultImages'}

combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image};

{/foreach}

{/if}

 

// Translations

var doesntExist = '{l s='The product does not exist in this model. Please choose another.' js=1}';

var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}';

var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' js=1}';

var uploading_in_progress = '{l s='Uploading in progress, please wait...' js=1}';

var fieldRequired = '{l s='Please fill in all required fields' js=1}';

 

{if isset($groups)}

// Combinations

{foreach from=$combinations key=idCombination item=combination}

addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity});

{/foreach}

// Colors

{if $colors|@count > 0}

{if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if}

{/if}

{/if}

//]]>

</script>

 

{include file="$tpl_dir./breadcrumb.tpl"}

<h1>{$product->name|escape:'htmlall':'UTF-8'}</h1>

 

<div id="primary_block" class="clearfix">

 

{if isset($adminActionDisplay) && $adminActionDisplay}

<div id="admin-action">

<p>{l s='This product is not visible to your customers.'}

<input type="hidden" id="admin-action-product-id" value="{$product->id}" />

<input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 0)"/>

<input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 1)"/>

</p>

<div class="clear" ></div>

<p id="admin-action-result"></p>

</p>

</div>

{/if}

 

{if isset($confirmation) && $confirmation}

<p class="confirmation">

{$confirmation}

</p>

{/if}

 

<!-- right infos-->

<div id="pb-right-column">

 

{if $product->online_only}

<span class="online_only">{l s='Online only'} !</span>

{/if}

 

{if isset($colors) && $colors}

<!-- colors -->

<div id="color_picker">

<p>{l s='Pick a color:' js=1}</p>

<div class="clear"></div>

<ul id="color_to_pick_list">

{foreach from=$colors key='id_attribute' item='color'}

<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background:{$color.value}" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>

{/foreach}

</ul>

<div class="clear"></div>

</div>

{/if}

 

<!-- product img-->

<div id="image-block">

{if $have_image}

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}"

{if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

{else}

<img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" />

{/if}

</div>

 

<!-- usefull links-->

<ul id="usefull_link_block">

{if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

<li><a href="javascript:print();">{l s='Print'}</a><br class="clear" /></li>

{if $have_image && !$jqZoomEnabled}

<li><span id="view_full_size" class="span_link">{l s='View full size'}</span></li>

{/if}

</ul>

 

<div class="clear"></div>

 

{if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}

 

</div>

 

<!-- left infos-->

<div id="pb-left-column">

 

{if $product->description_short OR $packItems|@count > 0}

<div id="short_description_block">

{if $product->description_short}

<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>

{/if}

{*{if $product->description}

<p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>

{/if}*}

{if $packItems|@count > 0}

<h3>{l s='Pack content'}</h3>

{foreach from=$packItems item=packItem}

<div class="pack_content">

{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>

{*<p>{$packItem.description_short}</p>*}

</div>

{/foreach}

{/if}

</div>

{/if}

 

{if isset($images) && count($images) > 0}

<!-- thumbnails -->

<div id="views_block" {if isset($images) && count($images) < 2}class="hidden"{/if}>

{if isset($images) && count($images) > 4}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if}

<div id="thumbs_list">

<ul id="thumbs_list_frame">

{if isset($images)}

{foreach from=$images item=image name=thumbnails}

{assign var=imageIds value="`$product->id`-`$image.id_image`"}

<li id="thumbnail_{$image.id_image}">

<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">

<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" />

</a>

</li>

{/foreach}

{/if}

</ul>

</div>

{if isset($images) && count($images) > 4}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if}

</div>

{/if}

{if isset($images) && count($images) > 1}<p class="clear" style="float:right;width:360px;margin-top:-25px;margin-right:5px;text-align:right"><span id="wrapResetImages" style="display:none"><img src="{$img_dir}icon/cancel_16x18.gif" alt="{l s='Cancel'}" width="16" height="18"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if}

 

{if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}

<!-- add to cart form-->

<form id="buy_block" class="{if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}hidden{else}jqtransform{/if}" action="{$link->getPageLink('cart.php')}" method="post">

 

<div id="buy_block_top">

 

<!-- hidden datas -->

<p class="hidden">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />

<input type="hidden" name="add" value="1" />

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

</p>

 

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

 

{foreach from=$groups key=id_attribute_group item=group}

{if $group.attributes|@count}

<p>

<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

{assign var="groupName" value="group_$id_attribute_group"}

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>

{/foreach}

</select>

</p>

{/if}

{/foreach}

</div>

{/if}

 

<!-- prices -->

{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

<p class="price">

{if !$priceDisplay || $priceDisplay == 2}

{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}

{elseif $priceDisplay == 1}

{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}

{/if}

{if $product->on_sale}

{*<img src="{$img_dir}onsale_{$lang_iso}.png" alt="{l s='On sale'}" class="on_sale_img"/>*}

<span class="on_sale">{l s='On sale'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}

<span class="discount">{l s='Reduced price'} ! {if $product->specificPrice.reduction_type == 'percentage'}<span class="reduction">-{$product->specificPrice.reduction*100}%</span>{/if}{if $product->specificPrice.reduction_type == 'amount'}<span class="reduction">-{$product->specificPrice.reduction|round:2}{$currency->sign}</span>{/if}</span>

{/if}

<span class="our_price_display">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

<span id="our_price_display">{convertPrice price=$productPrice}</span>

{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

</span>

{if $priceDisplay == 2}

<span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>

{/if}

</p>

{if $product->specificPrice AND $product->specificPrice.reduction}

<p id="old_price"><span class="bold">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

{if $productPriceWithoutRedution > $productPrice}

{l s='instead of'} <span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>

{if $tax_enabled && $display_tax_label == 1}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

{/if}

</span>

</p>

{/if}

{if $packItems|@count}

<p class="pack_price">{l s='instead of'} <span style="text-decoration:line-through">{convertPrice price=$product->getNoPackPrice()}</span></p>

{/if}

{if $product->ecotax != 0}

<p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'}

{if $product->specificPrice AND $product->specificPrice.reduction}

<br />{l s='(not impacted by the discount)'}

{/if}

</p>

{/if}

{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p>

{/if}

{*close if for show price*}

{/if}

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display:none"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

<!-- minimal quantity wanted -->

<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>{l s='You must add '}<b id="minimal_quantity_label">{$product->minimal_quantity}</b>{l s=' as a minimum quantity to buy this product.'}</p>

{if $product->minimal_quantity > 1}

<script type="text/javascript">

checkMinimalQuantity();

</script>

{/if}

 

<!-- availability -->

<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<span id="availability_label">{l s='Availability:'}</span>

<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>

{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

</span>

</p>

 

<!-- number of item in stock -->

{if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)}

<p id="pQuantityAvailable"{if $product->quantity <= 0} style="display:none"{/if}>

<span id="quantityAvailable">{$product->quantity|intval}</span>

<span {if $product->quantity > 1} style="display:none"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span>

<span {if $product->quantity == 1} style="display:none"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span>

</p>

{/if}

<!-- Out of stock hook -->

<p id="oosHook"{if $product->quantity > 0} style="display:none"{/if}>

{$HOOK_PRODUCT_OOS}

</p>

 

<p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if} >{l s='Warning: Last items in stock!'}</p>

 

</div>

 

<div id="buy_block_bottom">

 

<!-- quantity wanted -->

<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display:none"{/if}>

<label>{l s='Quantity :'}</label>

<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

</p>

 

<p{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} style="display:none"{/if} id="add_to_cart"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}

<div class="clear"></div>

</div>

</form>

{/if}

</div>

</div>

 

{if $quantity_discounts}

<!-- quantity discount -->

<ul class="idTabs">

<li><a class="selected">{l s='Quantity discount'}</a></li>

</ul>

<div id="quantityDiscount">

<table class="std">

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<th>{$quantity_discount.quantity|intval}

{if $quantity_discount.quantity|intval > 1}

{l s='quantities'}

{else}

{l s='quantity'}

{/if}

</th>

{/foreach}

</tr>

<tr>

{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}

<td>

{if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'}

-{convertPrice price=$quantity_discount.real_value|floatval}

{else}

-{$quantity_discount.real_value|floatval}%

{/if}

</td>

{/foreach}

</tr>

</table>

</div>

{/if}

 

 

<!-- description and features -->

{if $product->description || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments}

<div id="more_info_block" class="clear" {if isset($accessories) AND $accessories}style="width:470px;float:left"{/if}>

<ul id="more_info_tabs" class="idTabs idTabsShort">

{if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if}

{if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if}

{if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if}

</ul>

<div id="more_info_sheets" class="sheets align_justify">

{if $product->description}

<!-- full description -->

<div id="idTab1" class="rte">{$product->description}</div>

{/if}

{if $features}

<!-- product's features -->

<ul id="idTab2" class="bullet">

{foreach from=$features item=feature}

<li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

{if $attachments}

<ul id="idTab9" class="bullet">

{foreach from=$attachments item=attachment}

<li><a href="{$link->getPageLink('attachment.php', true)}?id_attachment={$attachment.id_attachment}">{$attachment.name|escape:'htmlall':'UTF-8'}</a><br />{$attachment.description|escape:'htmlall':'UTF-8'}</li>

{/foreach}

</ul>

{/if}

</div>

</div>

{/if}

 

{if isset($accessories) AND $accessories}

<div id="accessories_block">

<ul class="idTabs idTabsShort">

<li><a href="#idTab4">{l s='Accessories'}</a></li>

</ul>

<!-- accessories -->

<ul id="idTab4" class="bullet"><li style="background:none;margin:0;padding:0">

<div class="block products_block accessories_block clearfix">

<div class="block_content">

<ul>

{foreach from=$accessories item=accessory name=accessories_list}

{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">

{if isset($accessory.online_only) && $accessory.online_only}<span class="online_only">{l s='Online only'} !</span>{/if}

<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'small')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" /></a>

<h5>{if isset($accessory.new) && $accessory.new == 1}<span class="new">{l s='new'}</span>{/if}<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.name|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:55:'...':true|escape:'htmlall':'UTF-8'}</a></h5>

{*<div class="product_desc"><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:35:'...'}</a></div>*}

<div>

{if isset($accessory.on_sale) && $accessory.on_sale && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale'} !</span>

{elseif isset($accessory.reduction) && $accessory.reduction && isset($accessory.show_price) && $accessory.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Promotion'} !</span>{/if}

{*<p class="product_accessories_price">*}

{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span></p>{else}<div style="height:27px"></div>{/if}

<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>

{if $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

{if ($accessory.allow_oosp || $accessory.quantity > 0)}

<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

{else}

<span class="exclusive">{l s='Add to cart'}</span>

{*<span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>*}

{/if}

{/if}

{*</p>*}

</div>

</li>

{/foreach}

</ul>

</div>

</div>

</li></ul>

</div>

{/if}

 

<!-- Customizable products -->

{if $product->customizable}

<ul class="idTabs clear">

<li><a class="selected">{l s='Product customization'}</a></li>

</ul>

<div class="customization_block">

<form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm">

<p>

<img src="{$img_dir}icon/infos.gif" alt="Informations" />

{l s='After saving your customized product, remember to add it to your cart.'}

{if $product->uploadable_files}<br />{l s='Allowed file formats are: GIF, JPG, PNG'}{/if}

</p>

{if $product->uploadable_files|intval}

<h3>{l s='Pictures'}</h3>

<ul id="uploadable_files">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 0}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

{if isset($pictures.$key)}<div class="customizationUploadBrowse">

<img src="{$pic_dir}{$pictures.$key}_small" alt="" />

<a href="{* $link->getProductDeletePictureLink($product,{$field.id_customization_field})*}" title="{l s='Delete'}" >

<img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />

</a>

</div>{/if}

<div class="customizationUploadBrowse"><input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your hard drive'}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<div class="clear"></div>

{if $product->text_fields|intval}

<h3>{l s='Texts'}</h3>

<ul id="text_fields">

{counter start=0 assign='customizationField'}

{foreach from=$customizationFields item='field' name='customizationFields'}

{if $field.type == 1}

<li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}

<div class="customizationUploadBrowse"><textarea type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="2" cols="50" class="customization_block_input" />{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>{if $field.required}<sup>*</sup>{/if}

<div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{/if}</div></div>

</li>

{counter}

{/if}

{/foreach}

</ul>

{/if}

<p style="clear:left" id="customizedDatas">

<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />

<input type="hidden" name="submitCustomizedDatas" value="1" />

<input type="button" class="button" value="{l s='Save'}" onclick="javascript:saveCustomization()" />

<span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span>

</p>

</form>

<p class="clear required"><sup>*</sup> {l s='Required field'}</p>

</div>

{/if}

 

{if $packItems|@count > 0}

<div id="pack">

<h2>{l s='Pack content'}</h2>

{include file="$tpl_dir./product-list.tpl" products=$packItems}

</div>

{/if}

 

{if $HOOK_PRODUCT_TAB}

<div id="hook_product_tab">

<ul class="idTabs idTabsShort clear">

{$HOOK_PRODUCT_TAB}

</ul>

<div class="sheets align_justify">

{$HOOK_PRODUCT_TAB_CONTENT}

</div>

</div>

{/if}

 

{/if}

{$HOOK_PRODUCT_FOOTER}

Link to comment
Share on other sites

Check this out, hopefully it will shed some light on the rich snippets for you. It has a downloadable product.tpl too http://blog.dh42.com...-rich-snippets/

 

thank you a lot, I follow ed the tuto, and I used the testing tools of structed data, it's perfect thanks a lot, i advice to don't use schema.org it is not very interesting, it bugs lol

 

thanks guys for your help

Link to comment
Share on other sites

  • 3 months later...

I don't think its possible to do it with a module, because you need to update <div> tags in template (html) files,

You can probably do it with Javascript but I don't think its a good way.

 

But again maybe I am wrong.... :)

Link to comment
Share on other sites

  • 3 weeks later...

Hello

 

I got those folloing error in google testing tool

 

Avertissement : Missing required field "name (fn)".

Avertissement : Incomplete microdata with schema.org.

 

Here is my code :

 

(in red what i added)

 

{include file="$tpl_dir./errors.tpl"}

{if $errors|@count == 0}

<script type="text/javascript">

// <![CDATA[

var linkimage ="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}";

 

// PrestaShop internal settings

var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';

var currencyRate = '{$currencyRate|floatval}';

var currencyFormat = '{$currencyFormat|intval}';

var currencyBlank = '{$currencyBlank|intval}';

var taxRate = {$tax_rate|floatval};

var jqZoomEnabled = {if $jqZoomEnabled}true{else}false{/if};

 

//JS Hook

var oosHookJsCodeFunctions = new Array();

 

// Parameters

var id_product = '{$product->id|intval}';

var productHasAttributes = {if isset($groups)}true{else}false{/if};

var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};

var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};

var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};

var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';

var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';

var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};

var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};

var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};

var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};

var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};

var group_reduction = '{$group_reduction}';

var default_eco_tax = {$product->ecotax};

var ecotaxTax_rate = {$ecotaxTax_rate};

var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';

var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};

var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};

var displayPrice = {$priceDisplay};

var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';

var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};

var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';

var productUnitPriceRatio = '{$product->unit_price_ratio}';

var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};

 

// Customizable field

var img_ps_dir = '{$img_ps_dir}';

var customizationFields = new Array();

{assign var='imgIndex' value=0}

{assign var='textFieldIndex' value=0}

{foreach from=$customizationFields item='field' name='customizationFields'}

{assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"}

customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array();

customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}';

customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if};

{/foreach}

 

// Images

var img_prod_dir = '{$img_prod_dir}';

var combinationImages = new Array();

 

{if isset($combinationImages)}

{foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'}

combinationImages[{$combinationId}] = new Array();

{foreach from=$combination item='image' name='f_combinationImage'}

combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval};

{/foreach}

{/foreach}

{/if}

 

combinationImages[0] = new Array();

{if isset($images)}

{foreach from=$images item='image' name='f_defaultImages'}

combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image};

{/foreach}

{/if}

 

// Translations

var doesntExist = '{l s='The product does not exist in this model. Please choose another.' js=1}';

var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}';

var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' js=1}';

var uploading_in_progress = '{l s='Uploading in progress, please wait...' js=1}';

var fieldRequired = '{l s='Please fill in all required fields' js=1}';

 

{if isset($groups)}

// Combinations

{foreach from=$combinations key=idCombination item=combination}

addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity});

{/foreach}

// Colors

{if $colors|@count > 0}

{if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if}

{/if}

{/if}

//]]>

</script>

{include file="$tpl_dir./product-sort.tpl"}

<div class="block_category">

{include file="$tpl_dir./breadcrumb.tpl"}

<div id="primary_block" class="clearfix">

{if isset($adminActionDisplay) && $adminActionDisplay}

<div id="admin-action">

<p>{l s='This product is not visible to your customers.'}

<input type="hidden" id="admin-action-product-id" value="{$product->id}" />

<input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 0)"/>

<input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 1)"/>

</p>

<div class="clear" ></div>

<p id="admin-action-result"></p>

</p>

</div>

{/if}

 

{if isset($confirmation) && $confirmation}

<p class="confirmation">

{$confirmation}

</p>

{/if}

 

<!-- right infos-->

<div id="pb-right-column">

<!-- product img-->

 

<div itemscope itemtype="http://schema.org/Product" id="image-block">

{if $have_image}

<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}"

{if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} itemprop="name" title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

{else}

<img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" />

{/if}

</div>

 

{if isset($images) && count($images) > 0}

<!-- thumbnails -->

<div id="views_block" {if isset($images) && count($images) < 2}class="hidden"{/if}>

{if isset($images) && count($images) > 3}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if}

<div id="thumbs_list">

<ul id="thumbs_list_frame">

{if isset($images)}

{foreach from=$images item=image name=thumbnails}

{assign var=imageIds value="`$product->id`-`$image.id_image`"}

<li id="thumbnail_{$image.id_image}">

<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">

<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'small')}" alt="{$image.legend|htmlspecialchars}" />

</a>

</li>

{/foreach}

{/if}

</ul>

</div>

{if isset($images) && count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if}

</div>

{/if}

{if isset($images) && count($images) > 1}<p class="align_center clear"><span id="wrapResetImages" style="display: none;"><img src="{$img_dir}icon/cancel_16x18.gif" alt="{l s='Cancel'}" width="16" height="18"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if}

<!-- usefull links

<ul id="usefull_link_block">

{if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

<li><a href="javascript:print();">{l s='Print'}</a><br class="clear" /></li>

{if $have_image && !$jqZoomEnabled}

<li><span id="view_full_size" class="span_link">{l s='View full size'}</span></li>

{/if}

</ul>-->

</div>

 

<!-- left infos-->

<div id="pb-left-column">

 

<h1 itemprop="name"> {$product->name|escape:'htmlall':'UTF-8'}</h1>

{$HOOK_FACEBOOK_LIKE}

<!--<a href="" title=""><span id="like_it"></span></a>

--><div class="clear"></div>

{if $product->description}

<div id="description_block">{$product->description}</div>

{/if}

<!--{if isset($colors) && $colors}

<!-- colors

<div id="color_picker">

<p>{l s='Pick a color:' js=1}</p>

<div class="clear"></div>

<ul id="color_to_pick_list">

{foreach from=$colors key='id_attribute' item='color'}

<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>

{/foreach}

</ul>

<div class="clear"></div>

</div>

{/if}-->

 

{if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}

<!-- add to cart form-->

<!-- add to cart form-->

<form id="buy_block" {if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post">

 

<!-- hidden datas -->

<p class="hidden">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />

<input type="hidden" name="add" value="1" />

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

</p>

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

{foreach from=$group_ext key=id_attribute_group item=group}

<p>

<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

{assign var="groupName" value="group_$id_attribute_group"}

<select style="display:none;" name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute->name|escape:'htmlall':'UTF-8'}">{$group_attribute->name|escape:'htmlall':'UTF-8'}</option>

{/foreach}

</select>

</p>

<ul {if isset($group.isColor)}id="attr_color" {else} id="attr_size" {/if} rel="group_{$id_attribute_group|intval}" >

 

{if isset($group.isColor)}

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<li style="background-color:{$group_attribute->color};" rel="{$id_attribute|intval}" >

<input type="hidden" id="image_{$id_attribute|intval}" value="{foreach from=$images_ext item=image}{if $id_attribute == $image.id_attribute}{$image.id_image}{/if}{/foreach}"/>

</li>

{/foreach}

{else}

{foreach from=$size_arr item=tall_name}

{foreach from=$group.attributes key=id_attribute item=group_attribute}

{if $tall_name == $group_attribute->name}

<li rel="{$id_attribute|intval}">

<span>

<a href="javascript:void(0)" title="">{$group_attribute->name}</a>

</span>

</li>

{/if}

{/foreach}

{/foreach}

{/if}

</ul>

<p class="clear"></p>

{/foreach}

</div>

{/if}

 

<!-- quantity wanted -->

<div class="clear"></div>

<div id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity == 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>

<label>{l s='Quantity :'}</label>

<div class="select" id="select_quantity">

<select class="selectPrductSort" name="qty">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

<option value="5">5</option>

<option value="6">6</option>

</select>

</div>

<!--<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

--></div>

 

<!-- minimal quantity wanted -->

<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>{l s='You must add '}<b id="minimal_quantity_label">{$product->minimal_quantity}</b>{l s=' as a minimum quantity to buy this product.'}</p>

{if $product->minimal_quantity > 1}

<script type="text/javascript">

checkMinimalQuantity();

</script>

{/if}

 

<!-- availability -->

<p id="availability_statut"{if ($product->quantity == 0 && !$product->available_later) OR ($product->quantity != 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>

<span id="availability_label">{l s='Availability:'}</span>

<span id="availability_value"{if $product->quantity == 0} class="warning-inline"{/if}>

{if $product->quantity == 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

</span>

</p>

 

<!-- number of item in stock

{if ($product->quantity <= $last_qties OR isset($combination.list))}

<p id="pQuantityAvailable"{if $display_qties != 1 OR $product->quantity <= 0 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>

<span id="quantityAvailable">{$product->quantity|intval}</span>

<span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span>

<span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span>

</p>

{/if}-->

<!-- Out of stock hook -->

<p id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}>

{$HOOK_PRODUCT_OOS}

</p>

{if $product->online_only}

<p>{l s='Online only'}</p>

{/if}

<!-- prices -->

{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}

<p itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="price">

{if !$priceDisplay || $priceDisplay == 2}

{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}

{elseif $priceDisplay == 1}

{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)}

{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}

{/if}

{if $product->on_sale}

<img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>

<span class="on_sale">{l s='On sale!'}</span>

{elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice}

<span class="discount">{l s='Reduced price!'}</span>

{/if}

<br />

<span class="our_price_display">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

<span itemprop="price" id="our_price_display">{convertPrice price=$productPrice}</span>

{/if}

</span>

{if $priceDisplay == 2}

<br />

<span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>

{/if}

<br />

</div>

{if $product->specificPrice AND $product->specificPrice.reduction}

<p id="old_price"><span class="bold">

{if $priceDisplay >= 0 && $priceDisplay <= 2}

{if $productPriceWithoutRedution > $productPrice}

<span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span>

{if $tax_enabled}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}

{/if}

{/if}

</span>

</p>

{/if}

{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}

<p id="reduction_percent">{l s='(price reduced by'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}</span> %{l s=')'}</p>

{/if}

{if $packItems|@count}

<p class="pack_price">{l s='instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>

<br class="clear" />

{/if}

{if $product->ecotax != 0}

<p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'}

{if $product->specificPrice AND $product->specificPrice.reduction}

<br />{l s='(not impacted by the discount)'}

{/if}

</p>

{/if}

{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p>

{/if}

{*close if for show price*}

{/if}

 

<p{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} style="display: none;"{/if} id="add_to_cart" class="buttons_bottom_block">

<input type="submit" name="Submit" value="{l s='Add to cart'}" class="button_add_cart" /></p>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}

<div class="clear"></div>

</form>

{/if}

{if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}

</div>

{if isset($categories1)}

<div id="category_product">

<h2 id="title_category">{l s='Informations sur la catégorie '}<span>{$categories1->name}</span></h2>

<div id="category_description">

{$categories1->description}

</div>

</div>

{/if}

{if isset($same_products)}

<div id="same_block">

<h2>{l s='Produits similaires'}</h2>

 

<div id="list_product">

<!-- Products list -->

<ul class="product_list">

{foreach from=$same_products item=product name=products}

<li {if $smarty.foreach.products.last}class="last_item"{/if}>

<span class="name">{$product.name}</span>

<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'category')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>

<p>

<span class="price_pro1">{convertPrice price=$product.price}</span>

<span class="view_detail1"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="">{l s='Voir détails'}</a></span>

</p>

</li>

{/foreach}

</ul>

<!-- /Products list -->

</div>

</div>

{/if}

</div>

{/if}

 

</div>

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

  • 4 months later...

That article the Dh42 posted (by Lesley Paone) was a great post for products! Very easy to follow and has screenshots with highlighted changes.

 

The issue I was having was with the breadcrumbs (using v1.4.6). In this post op (tuverano.com) did a great job of highlighting certain areas that needed to be edited but I believe he was using quite an old version.

 

Below is the code that helped me get Rich Snippets into 1.4.6.

 

Open file classes/tools.php - replace lines 846 - 855

 

foreach ($categories AS $category)
{
 $fullPath .=
 (($n < $nCategories OR $linkOntheLastItem) ? '<span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="'.self::safeOutput($link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'])).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'" itemprop="url">' : '').
 (($n < $nCategories OR $linkOntheLastItem) ? '<span itemprop="title">':'').
 htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').
 (($n < $nCategories OR $linkOntheLastItem) ? '</span>' : '').
 (($n < $nCategories OR $linkOntheLastItem) ? '</a></span>' : '').
 (($n++ != $nCategories OR !empty($path)) ? '<span class="navigation-pipe">'.$pipe.'</span>' : '');
}

 

Now you will need to edit the breadcrumbs.tpl file in your theme folder (yourtheme/breadcrumbs.tpl). editing code between line 29 - 33 - (Warning each theme is different, this was applied to original PrestaShop Theme)

 

<div class="breadcrumb">
<div itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
 <a href="{$base_dir}" title="{l s='return to'} {l s='Home'}" itemprop="url"><span itemprop="title">{l s='Home'}</span></a>{if isset($path) AND $path}<span class="navigation-pipe">{$navigationPipe|escape:html:'UTF-8'}</span>{if !$path|strpos:'span'}<span class="navigation_page">{$path}</span>{else}{$path}{/if}{/if}
</div>
</div>

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

×
×
  • Create New...