Merge branch '1.6' of https://github.com/PrestaShop/PrestaShop into 1.6
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
<title>{$shop_name} {if $meta_title != ''}{if isset($navigationPipe)}{$navigationPipe|escape:'html':'UTF-8'}{else}>{/if} {$meta_title}{/if}</title>
|
||||
{if $display_header}
|
||||
<script type="text/javascript">
|
||||
|
||||
var help_class_name = '{$controller_name|@addcslashes:'\''}';
|
||||
var iso_user = '{$iso_user|@addcslashes:'\''}';
|
||||
var country_iso_code = '{$country_iso_code|@addcslashes:'\''}';
|
||||
@@ -44,13 +43,13 @@
|
||||
var helpboxes = {$help_box|intval};
|
||||
var roundMode = {$round_mode|intval};
|
||||
{if isset($shop_context)}
|
||||
{if $shop_context == Shop::CONTEXT_ALL}
|
||||
{if $shop_context == Shop::CONTEXT_ALL}
|
||||
var youEditFieldFor = '{l s='A modification of this field will be applied for all shops' js=1}';
|
||||
{elseif $shop_context == Shop::CONTEXT_GROUP}
|
||||
{elseif $shop_context == Shop::CONTEXT_GROUP}
|
||||
var youEditFieldFor = '{l s='A modification of this field will be applied for all shops of group' js=1} <b>{$shop_name|@addcslashes:'\''}</b>';
|
||||
{else}
|
||||
{else}
|
||||
var youEditFieldFor = '{l s='A modification of this field will be applied for the shop' js=1} <b>{$shop_name|@addcslashes:'\''}</b>';
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
var youEditFieldFor = '';
|
||||
{/if}
|
||||
@@ -102,7 +101,6 @@
|
||||
{/if}
|
||||
</head>
|
||||
|
||||
|
||||
{if $display_header}
|
||||
<body class="{if $employee->bo_menu}page-sidebar {* page-sidebar-closed *}{else}page-topbar{/if} {$smarty.get.controller|escape|strtolower}">
|
||||
{* begin HEADER *}
|
||||
@@ -314,7 +312,7 @@
|
||||
</li>
|
||||
{/if}
|
||||
<li id="employee_infos" class="dropdown">
|
||||
<a href='#' class="employee_name dropdown-toggle" data-toggle="dropdown">
|
||||
<a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&id_employee={$employee->id}&updateemployee" class="employee_name dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="employee_avatar_small">{$employee_avatar}</span>
|
||||
{$first_name} {$last_name}
|
||||
<i class="caret"></i>
|
||||
|
||||
@@ -379,7 +379,7 @@ class AddressFormatCore extends ObjectModel
|
||||
$addressText .= (!empty($tmpText)) ? $tmpText.$newLine: '';
|
||||
}
|
||||
|
||||
$addressText = rtrim($addressText, $newLine);
|
||||
$addressText = preg_replace('/'.preg_quote($newLine,'/').'$/i', '', $addressText);
|
||||
$addressText = rtrim($addressText, $separator);
|
||||
|
||||
return $addressText;
|
||||
|
||||
@@ -91,6 +91,7 @@ class SearchControllerCore extends FrontController
|
||||
$this->productSort();
|
||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||
$original_query = Tools::safeOutput($query);
|
||||
$query = Tools::replaceAccentedChars(urldecode($query));
|
||||
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
foreach ($search['result'] as &$product)
|
||||
@@ -105,7 +106,7 @@ class SearchControllerCore extends FrontController
|
||||
'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
|
||||
'search_products' => $search['result'],
|
||||
'nbProducts' => $search['total'],
|
||||
'search_query' => $query,
|
||||
'search_query' => $original_query,
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
|
||||
}
|
||||
elseif (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag))
|
||||
|
||||
@@ -23,24 +23,23 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if !$content_only}
|
||||
</div> <!-- #center_column -->
|
||||
{if isset($right_column_size) && !empty($right_column_size)}
|
||||
<!-- Right -->
|
||||
<div id="right_column" class="col-xs-12 col-sm-3 column">
|
||||
{$HOOK_RIGHT_COLUMN}
|
||||
</div>
|
||||
{/if}
|
||||
</div> <!-- .row -->
|
||||
</div> <!-- #center_column -->
|
||||
{if isset($right_column_size) && !empty($right_column_size)}
|
||||
<div id="right_column" class="col-xs-12 col-sm-3 column">
|
||||
{$HOOK_RIGHT_COLUMN}
|
||||
</div>
|
||||
{/if}
|
||||
</div> <!-- .row -->
|
||||
</div> <!-- #columns -->
|
||||
</div> <!-- .columns-container -->
|
||||
</div> <!-- .columns-container -->
|
||||
<!-- Footer -->
|
||||
<div class="footer-container">
|
||||
<div class="container">
|
||||
<footer id="footer" class="row">
|
||||
{$HOOK_FOOTER}
|
||||
</footer>
|
||||
</div>
|
||||
</div> <!-- .footer-container -->
|
||||
<div class="container">
|
||||
<footer id="footer" class="row">
|
||||
{$HOOK_FOOTER}
|
||||
</footer>
|
||||
</div>
|
||||
</div> <!-- .footer-container -->
|
||||
</div> <!-- #page -->
|
||||
{/if}
|
||||
</body>
|
||||
|
||||
@@ -44,12 +44,12 @@
|
||||
|
||||
<link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />
|
||||
<link href="{$css_dir}bootstrap_lib/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
|
||||
<link href="{$css_dir}font-awesome.css" rel="stylesheet" type="text/css" media="all" />
|
||||
<link href="{$css_dir}jquery/uniform.default.css" rel="stylesheet" type="text/css" media="all" />
|
||||
<link href="{$css_dir}highdpi.css" rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2)" />
|
||||
<link href="{$css_dir}jquery/footable.core.css" rel="stylesheet" type="text/css" media="all" />
|
||||
<link href="{$css_dir}jquery/jquery.bxslider.css" rel="stylesheet" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="{$css_dir}bootstrap_lib/bootstrap.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="{$css_dir}font-awesome.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="{$css_dir}jquery/uniform.default.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="{$css_dir}highdpi.css" media="only screen and (-webkit-min-device-pixel-ratio: 2)" />
|
||||
<link rel="stylesheet" href="{$css_dir}jquery/footable.core.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="{$css_dir}jquery/jquery.bxslider.css" type="text/css" media="all" />
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,400italic,300italic,300,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css' />
|
||||
{if isset($css_files)}
|
||||
{foreach from=$css_files key=css_uri item=media}
|
||||
@@ -62,11 +62,10 @@
|
||||
var viewport = document.querySelector("meta[name=viewport]");
|
||||
viewport.setAttribute('content', 'initial-scale=1.0,maximum-scale=1.0,user-scalable=0,width=device-width,height=device-height');
|
||||
}
|
||||
if(navigator.userAgent.match(/Android/i)){
|
||||
if(navigator.userAgent.match(/Android/i)){
|
||||
window.scrollTo(0,1);
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
}
|
||||
|
||||
var baseDir = '{$content_dir|addslashes}';
|
||||
var baseUri = '{$base_uri|addslashes}';
|
||||
var static_token = '{$static_token|addslashes}';
|
||||
@@ -111,9 +110,9 @@
|
||||
|
||||
<div id="header_user_info">
|
||||
{if $logged}
|
||||
<a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out'}" class="logout" rel="nofollow">{l s='Sign out'}</a>
|
||||
<a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" rel="nofollow" title="{l s='Log me out'}">{l s='Sign out'}</a>
|
||||
{else}
|
||||
<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account'}" class="login" rel="nofollow">{l s='Sign in'}</a>
|
||||
<a class="login" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Login to your customer account'}">{l s='Sign in'}</a>
|
||||
{/if}
|
||||
</div> <!-- #header_user_info -->
|
||||
|
||||
@@ -128,23 +127,23 @@
|
||||
{/if}
|
||||
{/foreach}
|
||||
<ul id="first-languages" class="countries_ul toogle_content">
|
||||
{foreach from=$languages key=k item=language name="languages"}
|
||||
<li {if $language.iso_code == $lang_iso}class="selected"{/if}>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
{assign var=indice_lang value=$language.id_lang}
|
||||
{if isset($lang_rewrite_urls.$indice_lang)}
|
||||
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
|
||||
{else}
|
||||
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">
|
||||
|
||||
{foreach from=$languages key=k item=language name="languages"}
|
||||
<li {if $language.iso_code == $lang_iso}class="selected"{/if}>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
{assign var=indice_lang value=$language.id_lang}
|
||||
{if isset($lang_rewrite_urls.$indice_lang)}
|
||||
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
|
||||
{else}
|
||||
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
<span>{$language.name}</span>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
<span>{$language.name}</span>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- #languages-block-top -->
|
||||
@@ -177,7 +176,7 @@
|
||||
<ul id="first-currencies" class="currencies_ul toogle_content">
|
||||
{foreach from=$currencies key=k item=f_currency}
|
||||
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}>
|
||||
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{$f_currency.name}</a>
|
||||
<a href="javascript:setCurrency({$f_currency.id_currency});" rel="nofollow" title="{$f_currency.name}">{$f_currency.name}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
@@ -58,11 +58,12 @@ function addToCompare(productId){
|
||||
|
||||
function compareButtonsStatusRefresh(){
|
||||
$('.addToCompare').each(function() {
|
||||
if ($.inArray(parseInt($(this).prop('rel')),comparedProductsIds)!= -1){
|
||||
console.log($(this).data('id-product'));
|
||||
if ($.inArray(parseInt($(this).data('id-product')),comparedProductsIds)!= -1){
|
||||
$(this).addClass('checked');
|
||||
}
|
||||
else {
|
||||
$(this).removeClass('checked');
|
||||
$(this).removeClass('checked');
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -74,19 +75,19 @@ function totalValue(value) {
|
||||
reloadProductComparison = function() {
|
||||
$('a.cmp_remove').click(function(){
|
||||
|
||||
var idProduct = $(this).prop('rel').replace('ajax_id_product_', '');
|
||||
var idProduct = $(this).data('id-product');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(){
|
||||
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(){
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
compareButtonsStatusRefresh();
|
||||
compareButtonsStatusRefresh();
|
||||
});
|
||||
@@ -48,89 +48,177 @@
|
||||
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
|
||||
{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
|
||||
<li class="ajax_block_product {if $page_name == 'index' || $page_name == 'product'}col-xs-12 col-sm-4 col-md-3{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)}last-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0}last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1}first-item-of-tablet-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0}last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1}first-item-of-mobile-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)}last-mobile-line{/if}">
|
||||
<div class="product-container">
|
||||
<div class="product-container" itemscope itemtype="http://schema.org/Product">
|
||||
<div class="left-block">
|
||||
<div class="product-image-container">
|
||||
<a href="{$product.link|escape:'html':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'html':'UTF-8'}">
|
||||
<img itemprop="image" class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" 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} />
|
||||
<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'}"
|
||||
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 isset($quick_view) && $quick_view}<a href="#" rel="{$product.link|escape:'html':'UTF-8'}" class="quick-view"><span>Quick view</span></a>{/if}
|
||||
{if isset($quick_view) && $quick_view}
|
||||
<a
|
||||
class="quick-view"
|
||||
href="#"
|
||||
rel="{$product.link|escape:'html':'UTF-8'}">
|
||||
<span>Quick view</span>
|
||||
</a>
|
||||
{/if}
|
||||
{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">
|
||||
<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 class="price product-price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>
|
||||
<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="{$priceDisplay}" />
|
||||
{if isset($product.specific_prices) && $product.specific_prices}
|
||||
<span class="old-price product-price">{displayWtPrice p=$product.price_without_reduction}</span>
|
||||
{if isset($product.specific_prices.reduction) && $product.specific_prices.reduction && $product.specific_prices.reduction_type == 'percentage'}<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>{/if}
|
||||
<span class="old-price product-price">
|
||||
{displayWtPrice p=$product.price_without_reduction}
|
||||
</span>
|
||||
{if isset($product.specific_prices.reduction) && $product.specific_prices.reduction && $product.specific_prices.reduction_type == 'percentage'}
|
||||
<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($product.new) && $product.new == 1}<span class="new-box"><span class="new-label">{l s='New'}</span></span>{/if}
|
||||
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="sale-box"><span class="sale-label">{l s='Sale!'}</span></span>{/if}
|
||||
{if isset($product.new) && $product.new == 1}
|
||||
<span class="new-box">
|
||||
<span class="new-label">{l s='New'}</span>
|
||||
</span>
|
||||
{/if}
|
||||
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
|
||||
<span class="sale-box">
|
||||
<span class="sale-label">{l s='Sale!'}</span>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-block">
|
||||
<h5>{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'}">{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}</a></h5>
|
||||
<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:45:'...'|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</h5>
|
||||
|
||||
{hook h='displayProductListReviews' product=$product}
|
||||
<p class="product-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</p>
|
||||
|
||||
<p class="product-desc" itemprop="description">
|
||||
{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
|
||||
</p>
|
||||
|
||||
{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">
|
||||
<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 class="price product-price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>
|
||||
<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="{$priceDisplay}" />
|
||||
{if isset($product.specific_prices) && $product.specific_prices}
|
||||
<span class="old-price product-price">{displayWtPrice p=$product.price_without_reduction}</span>
|
||||
{if isset($product.specific_prices.reduction) && $product.specific_prices.reduction && $product.specific_prices.reduction_type == 'percentage'}<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>{/if}
|
||||
<span class="old-price product-price">
|
||||
{displayWtPrice p=$product.price_without_reduction}
|
||||
</span>
|
||||
{if isset($product.specific_prices.reduction) && $product.specific_prices.reduction && $product.specific_prices.reduction_type == 'percentage'}
|
||||
<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="button-container">
|
||||
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
|
||||
{if ($product.allow_oosp || $product.quantity > 0)}
|
||||
{if isset($static_token)}
|
||||
<a
|
||||
class="button ajax_add_to_cart_button btn btn-default"
|
||||
rel="nofollow"
|
||||
data-id-product="{$product.id_product|intval}"
|
||||
href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}"
|
||||
title="{l s='Add to cart'}">
|
||||
rel="nofollow"
|
||||
title="{l s='Add to cart'}"
|
||||
data-id-product="{$product.id_product|intval}"
|
||||
token={$static_token}", false)|escape:'html'}">
|
||||
<span>{l s='Add to cart'}</span>
|
||||
</a>
|
||||
{else}
|
||||
<a
|
||||
class="button ajax_add_to_cart_button btn btn-default"
|
||||
rel="nofollow"
|
||||
data-id-product="{$product.id_product|intval}"
|
||||
href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}"
|
||||
title="{l s='Add to cart'}">
|
||||
rel="nofollow"
|
||||
title="{l s='Add to cart'}"
|
||||
data-id-product="{$product.id_product|intval}">
|
||||
<span>{l s='Add to cart'}</span>
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
<span class="button ajax_add_to_cart_button btn btn-default disabled"><span>{l s='Add to cart'}</span></span>
|
||||
<span class="button ajax_add_to_cart_button btn btn-default disabled">
|
||||
<span>{l s='Add to cart'}</span>
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
<a class="button lnk_view btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}"><span>{l s='More'}</span></a>
|
||||
<a itemprop="url" class="button lnk_view btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
|
||||
<span>{l s='More'}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{if isset($product.color_list)}<div class="color-list-container">{$product.color_list} </div>{/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'}</span>{/if}
|
||||
{if isset($product.online_only) && $product.online_only}
|
||||
<span class="online_only">{l s='Online only'}</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!'}</span>{/if}
|
||||
</div>
|
||||
{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
|
||||
<span class="discount">{l s='Reduced price!'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if (!$PS_CATALOG_MODE AND ((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)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}<span class="available-now">{l s='In Stock'}</span>{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}<span class="available-dif">{l s='Product available with different options'}</span>{else}<span class="out-of-stock">{l s='Out of stock'}</span>{/if}</span>{/if}
|
||||
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
|
||||
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
|
||||
{if ($product.allow_oosp || $product.quantity > 0)}
|
||||
<span class="available-now">
|
||||
<link itemprop="availability" href="http://schema.org/InStock" />{l s='In Stock'}
|
||||
</span>
|
||||
{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'}
|
||||
</span>
|
||||
{else}
|
||||
<span class="out-of-stock">
|
||||
<link itemprop="availability" href="http://schema.org/OutOfStock" />{l s='Out of stock'}
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="functional-buttons clearfix">
|
||||
{hook h='displayProductListFunctionalButtons' product=$product}
|
||||
{if isset($comparator_max_item) && $comparator_max_item}
|
||||
<div class="compare">
|
||||
<a href="#" rel="{$product.id_product}" class="addToCompare" onClick="addToCompare('{$product.id_product|intval}'); return false;">{l s='Add to Compare'}</a>
|
||||
<a class="addToCompare" href="#" data-id-product="{$product.id_product}" onClick="addToCompare('{$product.id_product|intval}'); return false;">{l s='Add to Compare'}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<td width="{$width}%" class="ajax_block_product comparison_infos product-block">
|
||||
<div class="remove">
|
||||
<a class="cmp_remove" href="{$link->getPageLink('products-comparison', true)|escape:'html'}" title="{l s='Remove'}" rel="ajax_id_product_{$product->id}"><i class="icon-trash"></i></a>
|
||||
<a class="cmp_remove" href="{$link->getPageLink('products-comparison', true)|escape:'html'}" title="{l s='Remove'}" data-id-product="{$product->id}"><i class="icon-trash"></i></a>
|
||||
</div>
|
||||
<div class="product-image-block">
|
||||
<a href="{$product->getLink()}" title="{$product->name|escape:html:'UTF-8'}" class="product_image" >
|
||||
@@ -115,7 +115,7 @@
|
||||
{if ($product->quantity > 0 OR $product->allow_oosp)}
|
||||
<a
|
||||
class="button ajax_add_to_cart_button btn btn-default"
|
||||
data-id-product="ajax_id_product_{$product->id}"
|
||||
data-id-product="{$product->id}"
|
||||
href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$product->id}&token={$static_token}&add")|escape:'html'}"
|
||||
title="{l s='Add to cart'}">
|
||||
<span>{l s='Add to cart'}</span>
|
||||
|
||||
Reference in New Issue
Block a user