218 lines
11 KiB
Smarty
Executable File
218 lines
11 KiB
Smarty
Executable File
{*
|
|
* 2007-2014 PrestaShop
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/afl-3.0.php
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
* versions in the future. If you wish to customize PrestaShop for your
|
|
* needs please refer to http://www.prestashop.com for more information.
|
|
*
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
|
* @copyright 2007-2014 PrestaShop SA
|
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
|
* International Registered Trademark & Property of PrestaShop SA
|
|
*}
|
|
<div class="crossseling-content">
|
|
{if $remaining_for_free_shipping}
|
|
<p id='remaining_for_free_shipping' class='crossseling-free-shipping hidden'><span class='exclam-img'></span>{l s='Il ne vous reste plus que' mod='blockcart'} <span>{convertPrice price=$remaining_for_free_shipping}</span> {l s='TTC d\'achat pour bénéficier de la livraison gratuite' mod='blockcart'}</p>
|
|
{literal}
|
|
<script>
|
|
if($('.info-free-shipping').length<1)
|
|
$("<div class='info-free-shipping'><p class='crossseling-free-shipping'></p></div>").insertBefore('#layer_cart .button-container');
|
|
$('.info-free-shipping .crossseling-free-shipping').html($('#remaining_for_free_shipping').html());
|
|
</script>
|
|
{/literal}
|
|
{elseif $notEligible}
|
|
{literal}
|
|
<script>
|
|
$('.info-free-shipping').remove();
|
|
</script>
|
|
{/literal}
|
|
{else}
|
|
<p id='remaining_for_free_shipping' class='crossseling-free-shipping hidden'><span class='exclam-img'></span>{l s='Livraison offerte sur votre commande' mod='blockcart'}</p>
|
|
{literal}
|
|
<script>
|
|
if($('.info-free-shipping').length<1)
|
|
$("<div class='info-free-shipping'><p class='crossseling-free-shipping'></p></div>").insertBefore('#layer_cart .button-container');
|
|
$('.info-free-shipping .crossseling-free-shipping').html($('#remaining_for_free_shipping').html());
|
|
</script>
|
|
{/literal}
|
|
{/if}
|
|
{if isset($otherProducts) && count($otherProducts) > 3}
|
|
<h2>{l s='Découvrez aussi...' mod='blockcart' }</h2>
|
|
<!-- Products list crossselling.tpl -->
|
|
<ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">
|
|
{foreach from=$otherProducts item='product' name=product}
|
|
<li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-12 col-sm-3{else} col-xs-12 col-sm-3{/if}" >
|
|
<div class="product-container" itemscope itemtype="http://schema.org/Product">
|
|
<div class="left-block">
|
|
<div class="product-image-container">
|
|
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
|
|
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
|
|
</a>
|
|
{if $cookie->logged}
|
|
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
|
<div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
|
|
<span itemprop="price" class="price product-price">
|
|
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
|
|
</span>
|
|
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
|
|
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
|
|
|
|
<span class="old-price product-price">
|
|
{$product.price_without_reduction}
|
|
</span>
|
|
{if $product.specific_prices.reduction_type == 'percentage'}
|
|
<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
|
|
{/if}
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
{*if $cookie->logged}
|
|
{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
|
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
|
|
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
|
|
{if ($product.allow_oosp || $product.quantity > 0)}
|
|
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
|
|
<span class="available-dif">
|
|
<link itemprop="availability" href="http://schema.org/LimitedAvailability" />{l s='Product available with different options' mod='blockcart'}
|
|
</span>
|
|
{else}
|
|
<span class="out-of-stock">
|
|
<link itemprop="availability" href="http://schema.org/OutOfStock" />{l s='Out of stock'}
|
|
</span>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
|
|
{if $product.specific_prices.reduction_type == 'percentage'}
|
|
<div class="price-percent-reduction">
|
|
<span>-{$product.specific_prices.reduction * 100}%</span>
|
|
</div>
|
|
{/if}
|
|
{/if*}
|
|
</div>
|
|
<div class="right-block">
|
|
<div class="manufacturer-name">
|
|
{$product.manufacturer_name|truncate:35:'...'|escape:'htmlall':'UTF-8'}
|
|
</div>
|
|
<h5 itemprop="name">
|
|
{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
|
|
<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
|
|
{$product.name|truncate:36:'...'|escape:'html':'UTF-8'}
|
|
</a>
|
|
</h5>
|
|
<div class="shape-red"></div>
|
|
|
|
<p class="product-desc" itemprop="description">
|
|
{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
|
|
</p>
|
|
{if $cookie->logged}
|
|
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
|
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="content_price">
|
|
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
|
|
<span itemprop="price" class="price product-price">
|
|
{if !$priceDisplay}
|
|
{convertPrice price=$product.price} <sup>{l s='TTC'}</sup>
|
|
{else}
|
|
{convertPrice price=$product.price_tax_exc} <sup>{l s='HT'}</sup>
|
|
{/if}
|
|
</span><br/>
|
|
{if $product.price_without_reduction|round:2 > $product.price}
|
|
{l s='au lieu de' mod='blockcart'}
|
|
<span class="old-price product-price">
|
|
{if !$priceDisplay}
|
|
{convertPrice price=$product.price_without_reduction} <sup>{l s='TTC'}</sup>
|
|
{else}
|
|
{convertPrice price=$product.price_without_reduction} <sup>{l s='HT'}</sup>
|
|
{/if}
|
|
</span>
|
|
|
|
{/if}<br/>
|
|
|
|
{if !$priceDisplay || $priceDisplay == 2}
|
|
{assign var='productPrice' value=$product.price}
|
|
{elseif $priceDisplay == 1}
|
|
{assign var='productPrice' value=$product.price_tax_exc}
|
|
{/if}
|
|
{if $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">{l s='soit'} {convertPrice price=$unit_price} {l s='l\'unité'}</p>
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
{*if isset($product.color_list)}
|
|
<div class="color-list-container">{$product.color_list}</div>
|
|
{/if
|
|
<div class="product-flags">
|
|
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
|
{if isset($product.online_only) && $product.online_only}
|
|
<span class="online_only">{l s='Online only' mod='blockcart'}</span>
|
|
{/if}
|
|
{/if}
|
|
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
|
|
{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
|
|
<span class="discount">{l s='Reduced price!' mod='blockcart'}</span>
|
|
{/if}
|
|
</div>*}
|
|
<div class="container-button">
|
|
<a itemprop="url" class="button-grey button-white button-product-list" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
|
|
<span>{l s='Découvrir ce produit'}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span class="diamond_border"></span>
|
|
|
|
<div class="clearfix"></div>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</div>
|
|
|
|
{if isset($orderProducts) && count($orderProducts) > 0}
|
|
<div class="crossseling-content">
|
|
<h2>{l s='Customers who bought this product also bought:' mod='blockcart'}</h2>
|
|
<div id="blockcart_list">
|
|
<ul id="blockcart_caroucel">
|
|
{foreach from=$orderProducts item='orderProduct' name=orderProduct}
|
|
<li>
|
|
<div class="product-image-container">
|
|
<a href="{$orderProduct.link|escape:'html':'UTF-8'}" title="{$orderProduct.name|htmlspecialchars}" class="lnk_img">
|
|
<img class="img-responsive" src="{$orderProduct.image}" alt="{$orderProduct.name|htmlspecialchars}" />
|
|
</a>
|
|
</div>
|
|
<p class="product-name">
|
|
<a href="{$orderProduct.link|escape:'html':'UTF-8'}" title="{$orderProduct.name|htmlspecialchars}">
|
|
{$orderProduct.name|truncate:15:'...'|escape:'html':'UTF-8'}
|
|
</a>
|
|
</p>
|
|
{if $orderProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
|
<span class="price_display">
|
|
<span class="price">{convertPrice price=$orderProduct.displayed_price}</span>
|
|
</span>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{/if} |