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;
|
||||
|
||||
@@ -946,6 +946,39 @@ class CategoryCore extends ObjectModel
|
||||
AND c.`id_parent` = '.(int)$id_parent_category);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search with Pathes for categories
|
||||
*
|
||||
* @param integer $id_lang Language ID
|
||||
* @param string $path of category
|
||||
* @param boolean $object_to_create a category
|
||||
* * @param boolean $method_to_create a category
|
||||
* @return array Corresponding categories
|
||||
*/
|
||||
public static function searchByPath($id_lang, $path, $object_to_create = false, $method_to_create = false)
|
||||
{
|
||||
$categories = explode('/', trim($path));
|
||||
$category = $id_parent_category = false;
|
||||
|
||||
if (is_array($categories) && count($categories))
|
||||
foreach($categories as $category_name)
|
||||
{
|
||||
if ($id_parent_category)
|
||||
$category = Category::searchByNameAndParentCategoryId($id_lang, $category_name, $id_parent_category);
|
||||
else
|
||||
$category = Category::searchByName($id_lang,$category_name,true);
|
||||
|
||||
if (!$category && $object_to_create && $method_to_create)
|
||||
{
|
||||
call_user_func_array(array($object_to_create, $method_to_create), array($id_lang, $category_name , $id_parent_category));
|
||||
$category = Category::searchByPath($id_lang, $category_name);
|
||||
}
|
||||
if (isset($category['id_category']) && $category['id_category'])
|
||||
$id_parent_category = (int)$category['id_category'];
|
||||
}
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Each parent category of this category until the root category
|
||||
*
|
||||
|
||||
@@ -1357,6 +1357,13 @@ class AdminImportControllerCore extends AdminController
|
||||
$product->id_category[] = (int)$value;
|
||||
else
|
||||
{
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$category_to_create->name[$default_language_id],
|
||||
(isset($category_to_create->id) && !empty($category_to_create->id))? $category_to_create->id : 'null'
|
||||
);
|
||||
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||
Db::getInstance()->getMsgError();
|
||||
$category_to_create = new Category();
|
||||
$category_to_create->id = (int)$value;
|
||||
$category_to_create->name = AdminImportController::createMultiLangField($value);
|
||||
@@ -1381,35 +1388,11 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
else if (is_string($value) && !empty($value))
|
||||
{
|
||||
$category = Category::searchByName($id_lang, trim($value), true);
|
||||
$category = Category::searchByPath($default_language_id, trim($value), $this, 'productImportCreateCat');
|
||||
if ($category['id_category'])
|
||||
$product->id_category[] = (int)$category['id_category'];
|
||||
else
|
||||
{
|
||||
$category_to_create = new Category();
|
||||
if (!Shop::isFeatureActive())
|
||||
$category_to_create->id_shop_default = 1;
|
||||
else
|
||||
$category_to_create->id_shop_default = (int)Context::getContext()->shop->id;
|
||||
$category_to_create->name = AdminImportController::createMultiLangField(trim($value));
|
||||
$category_to_create->active = 1;
|
||||
$category_to_create->id_parent = (int)Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create
|
||||
$category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]);
|
||||
$category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite);
|
||||
if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||
($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add())
|
||||
$product->id_category[] = (int)$category_to_create->id;
|
||||
else
|
||||
{
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$category_to_create->name[$default_language_id],
|
||||
(isset($category_to_create->id) && !empty($category_to_create->id))? $category_to_create->id : 'null'
|
||||
);
|
||||
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||
Db::getInstance()->getMsgError();
|
||||
}
|
||||
}
|
||||
$this->errors[] = sprintf(Tools::displayError('%1$s cannot be saved'), trim($value));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1724,6 +1707,33 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->closeCsvFile($handle);
|
||||
}
|
||||
|
||||
public function productImportCreateCat($default_language_id, $category_name, $id_parent_category=null)
|
||||
{
|
||||
$category_to_create = new Category();
|
||||
if (!Shop::isFeatureActive())
|
||||
$category_to_create->id_shop_default = 1;
|
||||
else
|
||||
$category_to_create->id_shop_default = (int)Context::getContext()->shop->id;
|
||||
$category_to_create->name = AdminImportController::createMultiLangField(trim($category_name));
|
||||
$category_to_create->active = 1;
|
||||
$category_to_create->id_parent = (int)Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create
|
||||
$category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]);
|
||||
$category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite);
|
||||
if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||
($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add())
|
||||
$product->id_category[] = (int)$category_to_create->id;
|
||||
else
|
||||
{
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$category_to_create->name[$default_language_id],
|
||||
(isset($category_to_create->id) && !empty($category_to_create->id))? $category_to_create->id : 'null'
|
||||
);
|
||||
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||
Db::getInstance()->getMsgError();
|
||||
}
|
||||
}
|
||||
|
||||
public function attributeImport()
|
||||
{
|
||||
$default_language = Configuration::get('PS_LANG_DEFAULT');
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -962,6 +962,7 @@ class Blocktopmenu extends Module
|
||||
{
|
||||
if ($link['label'] == '')
|
||||
{
|
||||
$default_language = Configuration::get('PS_LANG_DEFAULT');
|
||||
$link = MenuTopLinks::get($link['id_linksmenutop'], $default_language, (int)Shop::getContextShopID());
|
||||
$html .= '<option value="LNK'.(int)$link[0]['id_linksmenutop'].'">'.$spacer.$link[0]['label'].'</option>';
|
||||
}
|
||||
|
||||
@@ -149,45 +149,110 @@ class Dashgoals extends Module
|
||||
|
||||
public function getChartData($year)
|
||||
{
|
||||
// Retrieve gross data from AdminStatsController
|
||||
$visits = AdminStatsController::getVisits(false, $year.date('-01-01'), $year.date('-12-31'), 'month');
|
||||
$orders = AdminStatsController::getOrders($year.date('-01-01'), $year.date('-12-31'), 'month');
|
||||
$sales = AdminStatsController::getTotalSales($year.date('-01-01'), $year.date('-12-31'), 'month');
|
||||
|
||||
$stream1 = array('key' => $this->l('Traffic'), 'values' => array(), 'disabled' => true);
|
||||
$stream2 = array('key' => $this->l('Conversion Rate'), 'values' => array());
|
||||
$stream3 = array('key' => $this->l('Average Cart Value'), 'values' => array());
|
||||
$stream4 = array('key' => $this->l('Sales'), 'values' => array());
|
||||
// There are stream types (different charts) and for each types there are 3 available zones (one color for the goal, one if you over perform and one if you under perfom)
|
||||
$stream_types = array('traffic', 'conversion', 'avg_cart_value', 'sales');
|
||||
$stream_zones = array('real', 'more', 'less');
|
||||
|
||||
// We initialize all the streams types for all the zones
|
||||
$streams = array();
|
||||
$average_goals = array();
|
||||
foreach ($stream_types as $stream_type)
|
||||
{
|
||||
$streams[$stream_type] = array();
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$streams[$stream_type][$stream_zone] = array(
|
||||
'key' => $stream_type.'_'.$stream_zone,
|
||||
'color' => ($stream_zone == 'more' ? '#333333' : ($stream_zone == 'less' ? '#DDDDDD' : '#999999')),
|
||||
'values' => array(),
|
||||
'disabled' => $stream_type == 'sales' ? false : true
|
||||
);
|
||||
|
||||
$average_goals[$stream_type] = 0;
|
||||
}
|
||||
|
||||
// We need to calculate the average value of each goals for the year, this will be the base rate for "100%"
|
||||
for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1))
|
||||
{
|
||||
$average_goals['traffic'] += ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year);
|
||||
$average_goals['conversion'] += ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year) / 100;
|
||||
$average_goals['avg_cart_value'] += ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year);
|
||||
}
|
||||
foreach ($average_goals as &$average_goal)
|
||||
$average_goal /= 12;
|
||||
$average_goals['sales'] = $average_goals['traffic'] * $average_goals['conversion'] * $average_goals['avg_cart_value'];
|
||||
|
||||
// Now we can calculate the value for every months
|
||||
for ($i = '01'; $i <= 12; $i = sprintf('%02d', $i + 1))
|
||||
{
|
||||
$timestamp = strtotime($year.'-'.$i.'-01');
|
||||
|
||||
$goal = ConfigurationKPI::get(strtoupper('dashgoals_traffic_'.$i.'_'.$year));
|
||||
$value = 0;
|
||||
if ($goal && isset($visits[$timestamp]))
|
||||
$value = round($visits[$timestamp] / $goal, 2);
|
||||
$stream1['values'][] = array('x' => Dashgoals::$month_labels[$i], 'y' => $value);
|
||||
|
||||
$goal = ConfigurationKPI::get(strtoupper('dashgoals_conversion_'.$i.'_'.$year));
|
||||
$value = 0;
|
||||
if ($goal && isset($visits[$timestamp]) && $visits[$timestamp] && isset($orders[$timestamp]) && $orders[$timestamp])
|
||||
$value = round((100 * $orders[$timestamp] / $visits[$timestamp]) / $goal, 2);
|
||||
$stream2['values'][] = array('x' => Dashgoals::$month_labels[$i], 'y' => $value);
|
||||
|
||||
$goal = ConfigurationKPI::get(strtoupper('dashgoals_avg_cart_value_'.$i.'_'.$year));
|
||||
$value = 0;
|
||||
if ($goal && isset($orders[$timestamp]) && $orders[$timestamp] && isset($sales[$timestamp]) && $sales[$timestamp])
|
||||
$value = round(($sales[$timestamp] / $orders[$timestamp]) / $goal, 2);
|
||||
$stream3['values'][] = array('x' => Dashgoals::$month_labels[$i], 'y' => $value);
|
||||
|
||||
$goal = ConfigurationKPI::get(strtoupper('dashgoals_traffic_'.$i.'_'.$year))
|
||||
* ConfigurationKPI::get(strtoupper('dashgoals_conversion_'.$i.'_'.$year)) / 100
|
||||
* ConfigurationKPI::get(strtoupper('dashgoals_avg_cart_value_'.$i.'_'.$year));
|
||||
$value = 0;
|
||||
if ($goal && isset($sales[$timestamp]) && $sales[$timestamp])
|
||||
$value = round($sales[$timestamp] / $goal, 2);
|
||||
$stream4['values'][] = array('x' => Dashgoals::$month_labels[$i], 'y' => $value);
|
||||
$month_goal = ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year);
|
||||
$value = (isset($visits[$timestamp]) ? $visits[$timestamp] : 0);
|
||||
$stream_values = $this->getValuesFromGoals($average_goals['traffic'], $month_goal, $value, Dashgoals::$month_labels[$i]);
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$streams['traffic'][$stream_zone]['values'][] = $stream_values[$stream_zone];
|
||||
|
||||
$month_goal = ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year);
|
||||
$value = 100 * ((isset($visits[$timestamp]) && $visits[$timestamp]) ? ($orders[$timestamp] / $visits[$timestamp]) : 0);
|
||||
$stream_values = $this->getValuesFromGoals($average_goals['conversion'], $month_goal, $value, Dashgoals::$month_labels[$i]);
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$streams['conversion'][$stream_zone]['values'][] = $stream_values[$stream_zone];
|
||||
|
||||
$month_goal = ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year);
|
||||
$value = ((isset($orders[$timestamp]) && $orders[$timestamp]) ? ($sales[$timestamp] / $orders[$timestamp]) : 0);
|
||||
$stream_values = $this->getValuesFromGoals($average_goals['avg_cart_value'], $month_goal, $value, Dashgoals::$month_labels[$i]);
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$streams['avg_cart_value'][$stream_zone]['values'][] = $stream_values[$stream_zone];
|
||||
|
||||
$month_goal = ConfigurationKPI::get('DASHGOALS_TRAFFIC_'.$i.'_'.$year) * ConfigurationKPI::get('DASHGOALS_CONVERSION_'.$i.'_'.$year) / 100 * ConfigurationKPI::get('DASHGOALS_AVG_CART_VALUE_'.$i.'_'.$year);
|
||||
$stream_values = $this->getValuesFromGoals($average_goals['sales'], $month_goal, isset($sales[$timestamp]) ? $sales[$timestamp] : 0, Dashgoals::$month_labels[$i]);
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$streams['sales'][$stream_zone]['values'][] = $stream_values[$stream_zone];
|
||||
}
|
||||
return array('chart_type' => 'bar_chart_goals', 'data' => array($stream1, $stream2, $stream3, $stream4));
|
||||
|
||||
// Merge all the streams before sending
|
||||
$all_streams = array();
|
||||
foreach ($stream_types as $stream_type)
|
||||
foreach ($stream_zones as $stream_zone)
|
||||
$all_streams[] = $streams[$stream_type][$stream_zone];
|
||||
|
||||
return array('chart_type' => 'bar_chart_goals', 'data' => $all_streams);
|
||||
}
|
||||
|
||||
protected function getValuesFromGoals($average_goal, $month_goal, $value, $label)
|
||||
{
|
||||
// Initialize value for each zone
|
||||
$stream_values = array('real' => array('x' => $label, 'y' => 0), 'less' => array('x' => $label, 'y' => 0), 'more' => array('x' => $label, 'y' => 0));
|
||||
|
||||
// Calculate the percentage of fullfilment of the goal
|
||||
$fullfilment = 0;
|
||||
if ($value && $month_goal)
|
||||
$fullfilment = round($value / $month_goal, 2);
|
||||
|
||||
// Base rate is essential here : it determines the value of the goal compared to the "100%" of the chart legend
|
||||
$base_rate = $month_goal / $average_goal;
|
||||
|
||||
// Fullfilment of 1 means that we performed exactly anticipated
|
||||
if ($fullfilment == 1)
|
||||
$stream_values['real'] = array('x' => $label, 'y' => $base_rate);
|
||||
// Fullfilment lower than 1 means that we UNDER performed
|
||||
elseif ($fullfilment < 1) //
|
||||
{
|
||||
$stream_values['real'] = array('x' => $label, 'y' => $fullfilment * $base_rate);
|
||||
$stream_values['less'] = array('x' => $label, 'y' => $base_rate - ($fullfilment * $base_rate));
|
||||
}
|
||||
// Fullfilment greater than 1 means that we OVER performed
|
||||
elseif ($fullfilment > 1)
|
||||
{
|
||||
$stream_values['real'] = array('x' => $label, 'y' => $base_rate);
|
||||
$stream_values['more'] = array('x' => $label, 'y' => ($fullfilment * $base_rate) - $base_rate);
|
||||
}
|
||||
|
||||
return $stream_values;
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,13 @@ function bar_chart_goals(widget_name, chart_details)
|
||||
{
|
||||
nv.addGraph(function() {
|
||||
var chart = nv.models.multiBarChart()
|
||||
.stacked(false)
|
||||
.stacked(true)
|
||||
.showControls(false)
|
||||
.tooltipContent(function(key, y, e, graph) {
|
||||
var perf = parseInt(e) - 100;
|
||||
|
||||
return '/modules/dashgoals/views/js/dashgoals.js : Deprecated, now we need to retrieve the content with ajax';
|
||||
|
||||
if (perf > 0)
|
||||
return '<section class="panel"><header class="panel-heading">' + key + '</header><span class="dash_trend dash_trend_up">+' + perf + '%</span></section>';
|
||||
else if (perf < 0)
|
||||
|
||||
@@ -23,25 +23,24 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if !$content_only}
|
||||
</div>
|
||||
{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>
|
||||
</div>
|
||||
</div>
|
||||
</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 -->
|
||||
<!-- Footer -->
|
||||
<div class="footer-container">
|
||||
<div class="container">
|
||||
<footer id="footer" class="row">
|
||||
{$HOOK_FOOTER}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<footer id="footer" class="row">
|
||||
{$HOOK_FOOTER}
|
||||
</footer>
|
||||
</div>
|
||||
</div> <!-- .footer-container -->
|
||||
</div> <!-- #page -->
|
||||
{/if}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+163
-156
@@ -27,33 +27,45 @@
|
||||
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">
|
||||
<html lang="{$lang_iso}">
|
||||
<head>
|
||||
<title>{$meta_title|escape:'html':'UTF-8'}</title>
|
||||
{if isset($meta_description) AND $meta_description}
|
||||
<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />
|
||||
{/if}
|
||||
{if isset($meta_keywords) AND $meta_keywords}
|
||||
<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />
|
||||
{/if}
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<meta http-equiv="content-language" content="{$meta_language}" />
|
||||
{if isset($meta_description) AND $meta_description}
|
||||
<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />
|
||||
{/if}
|
||||
{if isset($meta_keywords) AND $meta_keywords}
|
||||
<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />
|
||||
{/if}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="PrestaShop" />
|
||||
<meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<script>
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<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 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}
|
||||
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
if (navigator.userAgent.match(/Android/i)) {
|
||||
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>
|
||||
<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}" />
|
||||
<script type="text/javascript">
|
||||
}
|
||||
|
||||
var baseDir = '{$content_dir|addslashes}';
|
||||
var baseUri = '{$base_uri|addslashes}';
|
||||
var static_token = '{$static_token|addslashes}';
|
||||
@@ -63,35 +75,23 @@
|
||||
var roundMode = {$roundMode};
|
||||
var isUserLogged = {if $logged}true{else}false{/if};
|
||||
</script>
|
||||
<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 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}
|
||||
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if isset($js_files)}
|
||||
{foreach from=$js_files item=js_uri}
|
||||
<script type="text/javascript" src="{$js_uri}"></script>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<script src="{$js_dir}tools/bootstrap.min.js"></script>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}">
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script src="{$js_dir}tools/jquery.total-storage.min.js"></script>
|
||||
<script src="{$js_dir}jquery/jquery.uniform-modify.js"></script>
|
||||
<script src="{$js_dir}jquery/highdpi.js"></script>
|
||||
<script src="{$js_dir}jquery/jquery.bxslider.js"></script>
|
||||
<script src="{$js_dir}jquery/footable.js"></script>
|
||||
<script src="{$js_dir}jquery/footable.sort.js"></script>
|
||||
<script src="{$js_dir}jquery/resonsive_utilites.js"></script>
|
||||
{if isset($js_files)}
|
||||
{foreach from=$js_files item=js_uri}
|
||||
<script type="text/javascript" src="{$js_uri}"></script>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<script src="{$js_dir}tools/bootstrap.min.js"></script>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}">
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script src="{$js_dir}tools/jquery.total-storage.min.js"></script>
|
||||
<script src="{$js_dir}jquery/jquery.uniform-modify.js"></script>
|
||||
<script src="{$js_dir}jquery/highdpi.js"></script>
|
||||
<script src="{$js_dir}jquery/jquery.bxslider.js"></script>
|
||||
<script src="{$js_dir}jquery/footable.js"></script>
|
||||
<script src="{$js_dir}jquery/footable.sort.js"></script>
|
||||
<script src="{$js_dir}jquery/resonsive_utilites.js"></script>
|
||||
{$HOOK_HEADER}
|
||||
</head>
|
||||
<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if} lang_{$lang_iso}">
|
||||
@@ -103,117 +103,124 @@
|
||||
{/if}
|
||||
<div id="page">
|
||||
<!-- Header -->
|
||||
<div class="header-container">
|
||||
<header id="header">
|
||||
<div class="header-row">
|
||||
<div class="container clearfix">
|
||||
<!-- User info -->
|
||||
<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>
|
||||
{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>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- /User info -->
|
||||
<!-- languages -->
|
||||
{if count($languages) > 1}
|
||||
<div id="languages-block-top">
|
||||
<div id="countries">
|
||||
{foreach from=$languages key=k item=language name="languages"}
|
||||
{if $language.iso_code == $lang_iso}
|
||||
<div class="current">
|
||||
<span>{$language.name}</span>
|
||||
</div>
|
||||
{/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}">
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
<span>{$language.name}</span>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#countries .current span, #countries .countries_ul li span').each(function() {
|
||||
var h = $(this).html();
|
||||
var index = h.indexOf(' ');
|
||||
if(index == -1) {
|
||||
index = h.length;
|
||||
}
|
||||
$(this).html('<span class="firstWord">'+ h.substring(index, h.length) + '</span>' + h.substring(0, index));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<!-- /languages -->
|
||||
<!-- Currencies -->
|
||||
{if count($currencies) > 1}
|
||||
<div id="currencies-block-top">
|
||||
<form id="setCurrency" action="{$request_uri}" method="post">
|
||||
<div class="current">
|
||||
<input type="hidden" name="id_currency" id="id_currency" value=""/>
|
||||
<input type="hidden" name="SubmitCurrency" value="" />
|
||||
<span class="cur-label">{l s='Currency'} :</span>
|
||||
{foreach from=$currencies key=k item=f_currency}
|
||||
{if $cookie->id_currency == $f_currency.id_currency}<strong>{$f_currency.iso_code}</strong>{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
<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>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- /Currencies -->
|
||||
<!--Contact link-->
|
||||
<div id="contact-link">
|
||||
<a href="{$link->getPageLink('contact', true)|escape:'html'}" title="{l s='contact'}">{l s='Contact Us'}</a>
|
||||
</div>
|
||||
{if $shop_phone}<span class="shop-phone"><i class="icon-phone"></i>{l s='Call us now toll free:'} <strong>{$shop_phone}</strong></span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="container header-row-2">
|
||||
<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
|
||||
<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/>
|
||||
</a>
|
||||
<div id="header_right">
|
||||
{$HOOK_TOP}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
<div class="columns-container">
|
||||
<div id="columns" class="container">
|
||||
{if $page_name !='index' && $page_name !='pagenotfound'}
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="header-container">
|
||||
<header id="header">
|
||||
<div class="header-row">
|
||||
<nav class="container clearfix">
|
||||
|
||||
<div id="header_user_info">
|
||||
{if $logged}
|
||||
<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 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 -->
|
||||
|
||||
{if count($languages) > 1}
|
||||
<div id="languages-block-top">
|
||||
<div id="countries">
|
||||
{foreach from=$languages key=k item=language name="languages"}
|
||||
{if $language.iso_code == $lang_iso}
|
||||
<div class="current">
|
||||
<span>{$language.name}</span>
|
||||
</div>
|
||||
{/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}">
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
<span>{$language.name}</span>
|
||||
{if $language.iso_code != $lang_iso}
|
||||
</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- #languages-block-top -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#countries .current span, #countries .countries_ul li span').each(function() {
|
||||
var h = $(this).html();
|
||||
var index = h.indexOf(' ');
|
||||
if(index == -1) {
|
||||
index = h.length;
|
||||
}
|
||||
$(this).html('<span class="firstWord">'+ h.substring(index, h.length) + '</span>' + h.substring(0, index));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{if count($currencies) > 1}
|
||||
<div id="currencies-block-top">
|
||||
<form id="setCurrency" action="{$request_uri}" method="post">
|
||||
<div class="current">
|
||||
<input type="hidden" name="id_currency" id="id_currency" value=""/>
|
||||
<input type="hidden" name="SubmitCurrency" value="" />
|
||||
<span class="cur-label">{l s='Currency'} :</span>
|
||||
{foreach from=$currencies key=k item=f_currency}
|
||||
{if $cookie->id_currency == $f_currency.id_currency}<strong>{$f_currency.iso_code}</strong>{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
<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});" rel="nofollow" title="{$f_currency.name}">{$f_currency.name}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</form>
|
||||
</div> <!-- #currencies-block-top -->
|
||||
{/if}
|
||||
|
||||
<div id="contact-link">
|
||||
<a href="{$link->getPageLink('contact', true)|escape:'html'}" title="{l s='contact'}">{l s='Contact Us'}</a>
|
||||
</div> <!-- #contact-link -->
|
||||
|
||||
{if $shop_phone}
|
||||
<span class="shop-phone">
|
||||
<i class="icon-phone"></i>{l s='Call us now toll free:'} <strong>{$shop_phone}</strong>
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
</nav><!-- .container-row -->
|
||||
</div> <!-- .header-row -->
|
||||
|
||||
<div class="container header-row-2">
|
||||
<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
|
||||
<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/>
|
||||
</a>
|
||||
<div id="header_right">
|
||||
{$HOOK_TOP}
|
||||
</div>
|
||||
</div> <!-- .header-row-2 -->
|
||||
|
||||
</header> <!-- #header -->
|
||||
</div> <!-- .header-container -->
|
||||
|
||||
<div class="columns-container">
|
||||
<div id="columns" class="container">
|
||||
{if $page_name !='index' && $page_name !='pagenotfound'}
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
{/if}
|
||||
<div class="row">
|
||||
{if isset($left_column_size) && !empty($left_column_size)}
|
||||
<!-- Left -->
|
||||
<div id="left_column" class="column col-xs-12 col-sm-3">
|
||||
<div id="left_column" class="column col-xs-12 col-sm-3">
|
||||
{$HOOK_LEFT_COLUMN}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Center -->
|
||||
<div id="center_column" class="center_column col-xs-12 col-sm-{12 - $left_column_size - $right_column_size}">
|
||||
<!-- Center -->
|
||||
<div id="center_column" class="center_column col-xs-12 col-sm-{12 - $left_column_size - $right_column_size}">
|
||||
{/if}
|
||||
@@ -35,7 +35,7 @@ var ajaxCart = {
|
||||
overrideButtonsInThePage : function(){
|
||||
//for every 'add' buttons...
|
||||
$('.ajax_add_to_cart_button').unbind('click').click(function(){
|
||||
var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', '');
|
||||
var idProduct = $(this).data('id-product');
|
||||
if ($(this).attr('disabled') != 'disabled')
|
||||
ajaxCart.add(idProduct, null, false, this);
|
||||
return false;
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
@@ -72,7 +72,20 @@
|
||||
{assign var="btn_class" value="disabled"}
|
||||
{capture assign="btn_more"}<span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{if !$PS_CATALOG_MODE}{l s='Out of stock'}{/if}{/if}</span>{/capture}
|
||||
{/if}
|
||||
<a class="{$btn_class}" data-role="button" data-inline="true" data-theme="e" data-icon="plus" data-mini="true" class="exclusive button ajax_add_to_cart_button" href="{$btn_href}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}" data-ajax="false">{l s='Add to cart'}</a>
|
||||
<a
|
||||
class="{$btn_class}"
|
||||
data-role="button"
|
||||
data-inline="true"
|
||||
data-theme="e"
|
||||
data-icon="plus"
|
||||
data-mini="true"
|
||||
class="exclusive button ajax_add_to_cart_button"
|
||||
href="{$btn_href}"
|
||||
data-id-product="{$accessory.id_product|intval}"
|
||||
title="{l s='Add to cart'}"
|
||||
data-ajax="false">
|
||||
{l s='Add to cart'}
|
||||
</a>
|
||||
{$btn_more}
|
||||
</div><!-- .btn-row -->
|
||||
</li>
|
||||
|
||||
@@ -215,7 +215,7 @@ var generated_date = {$smarty.now|intval};
|
||||
</div>
|
||||
{/if}
|
||||
<div class="layer_cart_row">
|
||||
<strong class="dark">{l s='Total shipping (tax exclu.):' mod='blockcart'}</strong>
|
||||
<strong class="dark">{l s='Total shipping (tax excl.):' mod='blockcart'}</strong>
|
||||
<span class="ajax_cart_shipping_cost">{if $shipping_cost_float == 0}{l s='Free shipping!' mod='blockcart'}{else}{$shipping_cost}{/if}</span>
|
||||
</div>
|
||||
{if $show_tax && isset($tax_cost)}
|
||||
@@ -230,7 +230,7 @@ var generated_date = {$smarty.now|intval};
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<span class="continue btn btn-default button exclusive-medium" title="{l s='Continue shopping' mod='blockcart'}"><span><i class="icon-chevron-left left"></i>{l s='Continue shopping' mod='blockcart'}</span></span>
|
||||
<a class="btn btn-default button button-medium" href="{$link->getPageLink("$order_process", true)|escape:'html'}" title="{l s='Procedd to checkout' mod='blockcart'}" rel="nofollow"><span>{l s='Proceed to checkout' mod='blockcart'}<i class="icon-chevron-right right"></i></span></a>
|
||||
<a class="btn btn-default button button-medium" href="{$link->getPageLink("$order_process", true)|escape:'html'}" title="{l s='Proceed to checkout' mod='blockcart'}" rel="nofollow"><span>{l s='Proceed to checkout' mod='blockcart'}<i class="icon-chevron-right right"></i></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,88 +23,100 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div id="view_wishlist">
|
||||
<h1 class="page-heading bottom-indent">{l s='Wishlist' mod='blockwishlist'}</h1>
|
||||
{if $wishlists}
|
||||
<p>
|
||||
<strong class="dark">{l s='Other wishlists of' mod='blockwishlist'} {$current_wishlist.firstname} {$current_wishlist.lastname}:</strong>
|
||||
{foreach from=$wishlists item=wishlist name=i}
|
||||
{if $wishlist.id_wishlist != $current_wishlist.id_wishlist}
|
||||
<a href="{$base_dir_ssl}modules/blockwishlist/view.php?token={$wishlist.token}" title="{$wishlist.name}" rel="nofollow">{$wishlist.name}</a>
|
||||
{if !$smarty.foreach.i.last}
|
||||
/
|
||||
<h1 class="page-heading bottom-indent">{l s='Wishlist' mod='blockwishlist'}</h1>
|
||||
{if $wishlists}
|
||||
<p>
|
||||
<strong class="dark">{l s='Other wishlists of' mod='blockwishlist'} {$current_wishlist.firstname} {$current_wishlist.lastname}:</strong>
|
||||
{foreach from=$wishlists item=wishlist name=i}
|
||||
{if $wishlist.id_wishlist != $current_wishlist.id_wishlist}
|
||||
<a href="{$base_dir_ssl}modules/blockwishlist/view.php?token={$wishlist.token}" title="{$wishlist.name}" rel="nofollow">{$wishlist.name}</a>
|
||||
{if !$smarty.foreach.i.last}
|
||||
/
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<div class="wlp_bought">
|
||||
{assign var='nbItemsPerLine' value=3}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbLi' value=$products|@count}
|
||||
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
|
||||
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
|
||||
<ul class="row wlp_bought_list">
|
||||
{foreach from=$products item=product name=i}
|
||||
{math equation="(total%perLine)" total=$smarty.foreach.i.total perLine=$nbItemsPerLine assign=totModulo}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.i.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
|
||||
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
|
||||
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
|
||||
<li id="wlp_{$product.id_product}_{$product.id_product_attribute}" class="ajax_block_product col-xs-12 col-sm-6 col-md-4 {if $smarty.foreach.i.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.i.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.i.iteration > ($smarty.foreach.i.total - $totModulo)}last-line{/if} {if $smarty.foreach.i.iteration%$nbItemsPerLineTablet == 0}last-item-of-tablet-line{elseif $smarty.foreach.i.iteration%$nbItemsPerLineTablet == 1}first-item-of-tablet-line{/if} {if $smarty.foreach.i.iteration > ($smarty.foreach.i.total - $totModuloTablet)}last-tablet-line{/if}">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-12">
|
||||
<div class="product_image">
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}">
|
||||
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.cover, 'home_default')|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-12">
|
||||
<div class="product_infos">
|
||||
<p id="s_title" class="product-name">
|
||||
{$product.name|truncate:30:'...'|escape:'html':'UTF-8'}
|
||||
{if isset($product.attributes_small)}
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}"><small>{$product.attributes_small|escape:'html':'UTF-8'}</small></a>
|
||||
{/if}
|
||||
</p>
|
||||
<div class="wishlist_product_detail">
|
||||
<p class="form-group">
|
||||
<label for="quantity_{$product.id_product}_{$product.id_product_attribute}">{l s='Quantity' mod='blockwishlist'}:</label>
|
||||
<input class="form-control grey" type="text" id="quantity_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity|intval}" size="3" />
|
||||
</p>
|
||||
<p class="form-group selector1">
|
||||
<label>{l s='Priority' mod='blockwishlist'}: </label>
|
||||
<select id="priority_{$product.id_product}_{$product.id_product_attribute}" class="form-control">
|
||||
<option value="0"{if $product.priority eq 0} selected="selected"{/if}>{l s='High' mod='blockwishlist'}</option>
|
||||
<option value="1"{if $product.priority eq 1} selected="selected"{/if}>{l s='Medium' mod='blockwishlist'}</option>
|
||||
<option value="2"{if $product.priority eq 2} selected="selected"{/if}>{l s='Low' mod='blockwishlist'}</option>
|
||||
</select>
|
||||
</p>
|
||||
<div class="btn_action">
|
||||
{if isset($product.attribute_quantity) AND $product.attribute_quantity >= 1 OR !isset($product.attribute_quantity) AND $product.product_quantity >= 1}
|
||||
{if !$ajax}
|
||||
<form id="addtocart_{$product.id_product|intval}_{$product.id_product_attribute|intval}" action="{$link->getPageLink('cart')|escape:'html'}" method="post">
|
||||
<p class="hidden">
|
||||
<input type="hidden" name="id_product" value="{$product.id_product|intval}" id="product_page_product_id" />
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
<input type="hidden" name="id_product_attribute" id="idCombination" value="{$product.id_product_attribute|intval}" />
|
||||
</p>
|
||||
</form>
|
||||
{/if}
|
||||
<a href="javascript:;" class="button ajax_add_to_cart_button btn btn-default" onclick="WishlistBuyProduct('{$token|escape:'html':'UTF-8'}', '{$product.id_product}', '{$product.id_product_attribute}', '{$product.id_product}_{$product.id_product_attribute}', this, {$ajax});" title="{l s='Add to cart' mod='homefeatured'}" rel="nofollow"><span>{l s='Add to cart' mod='blockwishlist'}</span></a>
|
||||
{else}
|
||||
<span class="button ajax_add_to_cart_button btn btn-default disabled"><span>{l s='Add to cart' mod='blockwishlist'}</span></span>
|
||||
{/if}
|
||||
<a class="button lnk_view btn btn-default" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='View' mod='blockwishlist'}" rel="nofollow"><span>{l s='View' mod='blockwishlist'}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="wlp_bought">
|
||||
{assign var='nbItemsPerLine' value=3}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbLi' value=$products|@count}
|
||||
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
|
||||
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
|
||||
<ul class="row wlp_bought_list">
|
||||
{foreach from=$products item=product name=i}
|
||||
{math equation="(total%perLine)" total=$smarty.foreach.i.total perLine=$nbItemsPerLine assign=totModulo}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.i.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
|
||||
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
|
||||
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
|
||||
<li id="wlp_{$product.id_product}_{$product.id_product_attribute}" class="ajax_block_product col-xs-12 col-sm-6 col-md-4 {if $smarty.foreach.i.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.i.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.i.iteration > ($smarty.foreach.i.total - $totModulo)}last-line{/if} {if $smarty.foreach.i.iteration%$nbItemsPerLineTablet == 0}last-item-of-tablet-line{elseif $smarty.foreach.i.iteration%$nbItemsPerLineTablet == 1}first-item-of-tablet-line{/if} {if $smarty.foreach.i.iteration > ($smarty.foreach.i.total - $totModuloTablet)}last-tablet-line{/if}">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-12">
|
||||
<div class="product_image">
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}">
|
||||
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.cover, 'home_default')|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-12">
|
||||
<div class="product_infos">
|
||||
<p id="s_title" class="product-name">
|
||||
{$product.name|truncate:30:'...'|escape:'html':'UTF-8'}
|
||||
{if isset($product.attributes_small)}
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}"><small>{$product.attributes_small|escape:'html':'UTF-8'}</small></a>
|
||||
{/if}
|
||||
</p>
|
||||
<div class="wishlist_product_detail">
|
||||
<p class="form-group">
|
||||
<label for="quantity_{$product.id_product}_{$product.id_product_attribute}">{l s='Quantity' mod='blockwishlist'}:</label>
|
||||
<input class="form-control grey" type="text" id="quantity_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity|intval}" size="3" />
|
||||
</p>
|
||||
<p class="form-group selector1">
|
||||
<label>{l s='Priority' mod='blockwishlist'}: </label>
|
||||
<select id="priority_{$product.id_product}_{$product.id_product_attribute}" class="form-control">
|
||||
<option value="0"{if $product.priority eq 0} selected="selected"{/if}>{l s='High' mod='blockwishlist'}</option>
|
||||
<option value="1"{if $product.priority eq 1} selected="selected"{/if}>{l s='Medium' mod='blockwishlist'}</option>
|
||||
<option value="2"{if $product.priority eq 2} selected="selected"{/if}>{l s='Low' mod='blockwishlist'}</option>
|
||||
</select>
|
||||
</p>
|
||||
<div class="btn_action">
|
||||
{if isset($product.attribute_quantity) AND $product.attribute_quantity >= 1 OR !isset($product.attribute_quantity) AND $product.product_quantity >= 1}
|
||||
{if !$ajax}
|
||||
<form id="addtocart_{$product.id_product|intval}_{$product.id_product_attribute|intval}" action="{$link->getPageLink('cart')|escape:'html'}" method="post">
|
||||
<p class="hidden">
|
||||
<input type="hidden" name="id_product" value="{$product.id_product|intval}" id="product_page_product_id" />
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
<input type="hidden" name="id_product_attribute" id="idCombination" value="{$product.id_product_attribute|intval}" />
|
||||
</p>
|
||||
</form>
|
||||
{/if}
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
class="button ajax_add_to_cart_button btn btn-default"
|
||||
onclick="WishlistBuyProduct('{$token|escape:'html':'UTF-8'}', '{$product.id_product}', '{$product.id_product_attribute}', '{$product.id_product}_{$product.id_product_attribute}', this, {$ajax});"
|
||||
title="{l s='Add to cart' mod='homefeatured'}"
|
||||
rel="nofollow">
|
||||
<span>{l s='Add to cart' mod='blockwishlist'}</span>
|
||||
</a>
|
||||
{else}
|
||||
<span class="button ajax_add_to_cart_button btn btn-default disabled"><span>{l s='Add to cart' mod='blockwishlist'}</span></span>
|
||||
{/if}
|
||||
<a
|
||||
class="button lnk_view btn btn-default"
|
||||
href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}"
|
||||
title="{l s='View' mod='blockwishlist'}"
|
||||
rel="nofollow">
|
||||
<span>{l s='View' mod='blockwishlist'}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,104 +22,207 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($products)}
|
||||
{*define numbers of product per line in other page for desktop*}
|
||||
{if $page_name !='index' && $page_name !='product'}
|
||||
{assign var='nbItemsPerLine' value=3}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbItemsPerLineMobile' value=3}
|
||||
{else}
|
||||
{assign var='nbItemsPerLine' value=4}
|
||||
{assign var='nbItemsPerLineTablet' value=3}
|
||||
{assign var='nbItemsPerLineMobile' value=2}
|
||||
{/if}
|
||||
{*define numbers of product per line in other page for tablet*}
|
||||
{assign var='nbLi' value=$products|@count}
|
||||
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
|
||||
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbItemsPerLineMobile' value=3}
|
||||
{else}
|
||||
{assign var='nbItemsPerLine' value=4}
|
||||
{assign var='nbItemsPerLineTablet' value=3}
|
||||
{assign var='nbItemsPerLineMobile' value=2}
|
||||
{/if}
|
||||
{*define numbers of product per line in other page for tablet*}
|
||||
{assign var='nbLi' value=$products|@count}
|
||||
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
|
||||
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
|
||||
<!-- Products list -->
|
||||
<ul class="product_list grid row {if isset($class) && $class} {$class}{/if}">
|
||||
{foreach from=$products item=product name=products}
|
||||
{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
|
||||
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
|
||||
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
|
||||
{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
|
||||
{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
|
||||
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
|
||||
{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="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>
|
||||
{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 (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
||||
<div 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>
|
||||
{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}
|
||||
{/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}
|
||||
</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>
|
||||
{hook h='displayProductListReviews' product=$product}
|
||||
<p class="product-desc">{$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">
|
||||
{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>
|
||||
{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}
|
||||
{/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="ajax_id_product_{$product.id_product|intval} nofollow" 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'}"><span>{l s='Add to cart'}</span></a>
|
||||
{else}
|
||||
<a class="button ajax_add_to_cart_button btn btn-default" rel="ajax_id_product_{$product.id_product|intval} nofollow" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><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>
|
||||
{/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>
|
||||
</div>
|
||||
|
||||
{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}
|
||||
{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>
|
||||
{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}
|
||||
</div>
|
||||
<div class="functional-buttons clearfix">
|
||||
<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'}"
|
||||
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
|
||||
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"
|
||||
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="{$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}
|
||||
{/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}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-block">
|
||||
<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" 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 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}{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}
|
||||
{/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"
|
||||
href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}"
|
||||
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"
|
||||
href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}"
|
||||
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>
|
||||
{/if}
|
||||
{/if}
|
||||
<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}
|
||||
|
||||
<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}
|
||||
{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>
|
||||
|
||||
{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 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>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($comparator_max_item) && $comparator_max_item}
|
||||
<div class="compare">
|
||||
<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>
|
||||
</div><!-- .product-container> -->
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
@@ -129,10 +232,10 @@
|
||||
var comparator_max_item = {$comparator_max_item};
|
||||
var comparedProductsIds = [];
|
||||
{foreach from=$compared_products key=k item=product}comparedProductsIds.push({$product});{/foreach}
|
||||
$('document').ready(function(){
|
||||
blockHover();
|
||||
});
|
||||
</script>
|
||||
$('document').ready(function(){
|
||||
blockHover();
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
function blockHover(status) {
|
||||
@@ -149,6 +252,7 @@
|
||||
)});
|
||||
}
|
||||
</script>
|
||||
|
||||
{if $page_name !='index' && $page_name !='product'} <!--// excluding page for Grid/List-->
|
||||
<script type="text/javascript"><!--
|
||||
function display(view) {
|
||||
@@ -243,6 +347,6 @@
|
||||
} else {
|
||||
display('grid');
|
||||
}
|
||||
//--></script>
|
||||
//--></script>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -180,31 +180,31 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
{$confirmation}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
|
||||
<!-- right infos-->
|
||||
|
||||
|
||||
<div id="pb-right-column" class="col-xs-12 col-sm-4 col-md-5">
|
||||
<!-- product img-->
|
||||
|
||||
|
||||
<div id="image-block" class="clearfix">
|
||||
|
||||
|
||||
{if $product->on_sale}
|
||||
|
||||
{if $product->on_sale}
|
||||
<span class="sale-box"><span class="sale-label">{l s='Sale!'}</span></span>
|
||||
{elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutReduction > $productPrice}
|
||||
<span class="discount">{l s='Reduced price!'}</span>
|
||||
{/if}
|
||||
|
||||
|
||||
{if $have_image}
|
||||
<span id="view_full_size">
|
||||
{if $jqZoomEnabled && $have_image && !$content_only}
|
||||
<a class="jqzoom" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')|escape:'html'}">
|
||||
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}"/>
|
||||
</a>
|
||||
{else}
|
||||
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"/>
|
||||
<a class="jqzoom" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')|escape:'html'}">
|
||||
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}"/>
|
||||
</a>
|
||||
{else}
|
||||
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"/>
|
||||
{if !$content_only}<span class="span_link">{l s='View larger'}</span>{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
{else}
|
||||
<span id="view_full_size">
|
||||
@@ -240,18 +240,18 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($images) && count($images) > 1}<p class="resetimg clear"><span id="wrapResetImages" style="display: none;">
|
||||
<a id="resetImages" href="{$link->getProductLink($product)|escape:'html'}" onclick="$('span#wrapResetImages').hide('slow');return (false);"><i class="icon-repeat"></i>{l s='Display all pictures'}</a></span></p>{/if}
|
||||
<a id="resetImages" href="{$link->getProductLink($product)|escape:'html'}" onclick="$('span#wrapResetImages').hide('slow');return (false);"><i class="icon-repeat"></i>{l s='Display all pictures'}</a></span></p>{/if}
|
||||
|
||||
</div>
|
||||
<!-- end right infos-->
|
||||
<!-- end right infos-->
|
||||
|
||||
<!---- left infos---->
|
||||
<!---- left infos---->
|
||||
<div id="pb-left-column" class="col-xs-12 col-sm-4">
|
||||
|
||||
{if $product->online_only}
|
||||
|
||||
{if $product->online_only}
|
||||
<p class="online_only">{l s='Online only'}</p>
|
||||
{/if}
|
||||
|
||||
|
||||
<h1 itemprop="name">{$product->name|escape:'html':'UTF-8'}</h1>
|
||||
<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}>
|
||||
<label>{l s='Model'} </label>
|
||||
@@ -266,18 +266,18 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>
|
||||
{/if}
|
||||
<!-- {if $packItems|@count > 0}
|
||||
|
||||
|
||||
<div class="short_description_pack">
|
||||
<h3>{l s='Pack content'}</h3>
|
||||
<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)|escape:'html'}">{$packItem.name|escape:'html':'UTF-8'}</a>
|
||||
<p>{$packItem.description_short}</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
|
||||
{/if}-->
|
||||
</div>
|
||||
{/if}
|
||||
@@ -290,22 +290,22 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span>
|
||||
</p>
|
||||
{/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>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<p id="availability_date"{if ($product->quantity > 0) OR !$product->available_for_order OR $PS_CATALOG_MODE OR !isset($product->available_date) OR $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}>
|
||||
<span id="availability_date_label">{l s='Availability date:'}</span>
|
||||
<span id="availability_date_value">{dateFormat date=$product->available_date full=false}</span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Out of stock hook -->
|
||||
<div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}>
|
||||
@@ -325,7 +325,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<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-->
|
||||
@@ -340,30 +340,30 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
</form>
|
||||
{/if}
|
||||
{if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}
|
||||
{if !$content_only}
|
||||
<!-- usefull links-->
|
||||
{if !$content_only}
|
||||
<!-- usefull links-->
|
||||
<ul id="usefull_link_block" class="clearfix">
|
||||
{if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
|
||||
<li class="print"><a href="javascript:print();">{l s='Print'}</a></li>
|
||||
{if $have_image && !$jqZoomEnabled}{/if}
|
||||
|
||||
</ul>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- end left infos-->
|
||||
|
||||
|
||||
|
||||
<!-- end left infos-->
|
||||
|
||||
|
||||
<!-- pb-right-column1-->
|
||||
<div id="pb-right-column1" class="col-xs-12 col-sm-4 col-md-3">
|
||||
<div class="box-info-product">
|
||||
<div class="content_prices clearfix">
|
||||
<div class="content_prices clearfix">
|
||||
<!-- prices -->
|
||||
{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
|
||||
<div class="price">
|
||||
<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<link itemprop="availability" {if $product->quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}>
|
||||
<link itemprop="availability" {if $product->quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}>
|
||||
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
||||
<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
|
||||
<!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))}
|
||||
@@ -387,7 +387,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
<p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|intval ==0} style="display:none"{/if}>
|
||||
<span id="reduction_amount_display">
|
||||
{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0}
|
||||
@@ -416,21 +416,21 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="product_attributes clearfix">
|
||||
|
||||
|
||||
<div class="product_attributes clearfix">
|
||||
|
||||
<!-- 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} />
|
||||
<a href="#" rel="qty" class="btn btn-default button-minus product_quantity_down"><span><i class="icon-minus"></i></span></a>
|
||||
<a href="#" rel="qty" class="btn btn-default button-plus product_quantity_up "><span><i class="icon-plus"></i></span></a>
|
||||
|
||||
|
||||
<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} />
|
||||
<a href="#" rel="qty" class="btn btn-default button-minus product_quantity_down"><span><i class="icon-minus"></i></span></a>
|
||||
<a href="#" rel="qty" class="btn btn-default button-plus product_quantity_up "><span><i class="icon-plus"></i></span></a>
|
||||
<span class="clearfix"></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}>
|
||||
@@ -441,7 +441,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
checkMinimalQuantity();
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
|
||||
{if isset($groups)}
|
||||
<!-- attributes -->
|
||||
<div id="attributes">
|
||||
@@ -491,37 +491,37 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-cart-bottom">
|
||||
|
||||
<p id="add_to_cart" {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} class="buttons_bottom_block">
|
||||
<button type="submit" name="Submit" class="exclusive"><span>{l s='Add to cart'}</span> </button>
|
||||
|
||||
<div class="box-cart-bottom">
|
||||
|
||||
<p id="add_to_cart" {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} class="buttons_bottom_block">
|
||||
<button type="submit" name="Submit" class="exclusive"><span>{l s='Add to cart'}</span> </button>
|
||||
</p>
|
||||
|
||||
{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}<strong></strong>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end pb-right-column1-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end pb-right-column1-->
|
||||
|
||||
</div>
|
||||
|
||||
{if !$content_only}
|
||||
<!-- More info -->
|
||||
{if $product->description}
|
||||
<section class="page-product-box">
|
||||
<h3 class="page-product-heading">{l s='More info'}</h3>{/if}
|
||||
{if isset($product) && $product->description}
|
||||
<!-- full description -->
|
||||
<div class="rte">{$product->description}</div>
|
||||
</section>
|
||||
<section class="page-product-box">
|
||||
<h3 class="page-product-heading">{l s='More info'}</h3>{/if}
|
||||
{if isset($product) && $product->description}
|
||||
<!-- full description -->
|
||||
<div class="rte">{$product->description}</div>
|
||||
</section>
|
||||
{/if}
|
||||
<!--end More info -->
|
||||
|
||||
@@ -533,12 +533,12 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
{if isset($features) && $features}
|
||||
<table class="table-data-sheet">
|
||||
{foreach from=$features item=feature}
|
||||
<tr class="{cycle values="odd,even"}">
|
||||
{if isset($feature.value)}
|
||||
<td>{$feature.name|escape:'html':'UTF-8'}</td><td> {$feature.value|escape:'html':'UTF-8'}</td>
|
||||
{/if}
|
||||
<tr class="{cycle values="odd,even"}">
|
||||
{if isset($feature.value)}
|
||||
<td>{$feature.name|escape:'html':'UTF-8'}</td><td> {$feature.value|escape:'html':'UTF-8'}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</table>
|
||||
</section>
|
||||
{/if}
|
||||
@@ -568,27 +568,36 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
|
||||
<div class="product_desc">
|
||||
<a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{$accessory.legend|escape:'html':'UTF-8'}" class="product-image product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home_default')|escape:'html'}" alt="{$accessory.legend|escape:'html':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" class="lazyOwl" /></a>
|
||||
|
||||
<div class="block_description">
|
||||
|
||||
<div class="block_description">
|
||||
<a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:25:'...'}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="s_title_block">
|
||||
<div class="s_title_block">
|
||||
<h5 class="product-name"><a href="{$accessoryLink|escape:'html':'UTF-8'}"> {$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'}</a></h5>
|
||||
|
||||
|
||||
{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
<span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
|
||||
<span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clearfix" style="margin-top:5px">
|
||||
{if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)}
|
||||
<div>
|
||||
<div>
|
||||
<div>
|
||||
<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")|escape:'html'}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}"><span>{l s='Add to cart'}</span></a> </div> </div> </div>
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<a
|
||||
class="exclusive button ajax_add_to_cart_button"
|
||||
href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")|escape:'html'}"
|
||||
data-id-product="{$accessory.id_product|intval}"
|
||||
title="{l s='Add to cart'}">
|
||||
<span>{l s='Add to cart'}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -609,39 +618,39 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<h3 class="page-product-heading">{l s='Volume discounts'}</h3>
|
||||
<div id="quantityDiscount">
|
||||
<table class="std table-produst-discounts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Discount'}</th>
|
||||
<th>{l s='You Save'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Discount'}</th>
|
||||
<th>{l s='You Save'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
|
||||
<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
|
||||
<td>{$quantity_discount.quantity|intval}</td>
|
||||
|
||||
<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>
|
||||
<td>
|
||||
<span>{l s='Up to'}</span>
|
||||
{if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
|
||||
{$discountPrice=$productPrice-$quantity_discount.real_value|floatval}
|
||||
{else}
|
||||
{$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval}
|
||||
{/if}
|
||||
{$discountPrice=$discountPrice*$quantity_discount.quantity}
|
||||
{$qtyProductPrice = $productPrice*$quantity_discount.quantity}
|
||||
{convertPrice price=$qtyProductPrice-$discountPrice}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
|
||||
<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
|
||||
<td>{$quantity_discount.quantity|intval}</td>
|
||||
|
||||
<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>
|
||||
<td>
|
||||
<span>{l s='Up to'}</span>
|
||||
{if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
|
||||
{$discountPrice=$productPrice-$quantity_discount.real_value|floatval}
|
||||
{else}
|
||||
{$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval}
|
||||
{/if}
|
||||
{$discountPrice=$discountPrice*$quantity_discount.quantity}
|
||||
{$qtyProductPrice = $productPrice*$quantity_discount.quantity}
|
||||
{convertPrice price=$qtyProductPrice-$discountPrice}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -656,12 +665,12 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
|
||||
<!--Download -->
|
||||
{if isset($attachments) && $attachments}
|
||||
<section class="page-product-box">
|
||||
<h3 class="page-product-heading">{l s='Download'}</h3>
|
||||
<section class="page-product-box">
|
||||
<h3 class="page-product-heading">{l s='Download'}</h3>
|
||||
{foreach from=$attachments item=attachment}
|
||||
<a href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html'}"><span>{$attachment.name|escape:'html':'UTF-8'}</span></a><br />{$attachment.description|escape:'html':'UTF-8'}
|
||||
{/foreach}
|
||||
|
||||
|
||||
</section>
|
||||
{/if}
|
||||
<!--end Download -->
|
||||
@@ -729,7 +738,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
|
||||
<input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
|
||||
<input type="hidden" name="submitCustomizedDatas" value="1" />
|
||||
<!--<input type="button" class="button btn btn-default button button-small" value="{l s='Save'}" onclick="javascript:saveCustomization()" />-->
|
||||
<button class="button btn btn-default button button-small" onclick="javascript:saveCustomization()" /><span>{l s='Save'}</span></button>
|
||||
<button class="button btn btn-default button button-small" onclick="javascript:saveCustomization()" /><span>{l s='Save'}</span></button>
|
||||
<span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
@@ -49,37 +49,37 @@
|
||||
{assign var='replace_id' value=$product->id|cat:'|'}
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<div class="product-image-block">
|
||||
<a href="{$product->getLink()}" title="{$product->name|escape:html:'UTF-8'}" class="product_image" >
|
||||
<img class="img-responsive" src="{$link->getImageLink($product->link_rewrite, $product->id_image, 'home_default')|escape:'html'}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
</a>
|
||||
{if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
|
||||
{if $product->on_sale}
|
||||
<div class="sale-box"><span class="sale-label">{l s='Sale!'}</span></div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="remove">
|
||||
<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" >
|
||||
<img class="img-responsive" src="{$link->getImageLink($product->link_rewrite, $product->id_image, 'home_default')|escape:'html'}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
</a>
|
||||
{if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
|
||||
{if $product->on_sale}
|
||||
<div class="sale-box"><span class="sale-label">{l s='Sale!'}</span></div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<h5><a class="product-name" href="{$product->getLink()}" title="{$product->name|truncate:32:'...'|escape:'html':'UTF-8'}">{$product->name|truncate:45:'...'|escape:'html':'UTF-8'}</a></h5>
|
||||
<div class="prices-container">
|
||||
<div class="prices-container">
|
||||
{if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
|
||||
<span class="price product-price">{convertPrice price=$product->getPrice($taxes_behavior)}</span>
|
||||
{if isset($product->specificPrice) && $product->specificPrice}
|
||||
{if {$product->specificPrice.reduction_type == 'percentage'}}
|
||||
<span class="old-price product-price">{displayWtPrice p=$product->getPrice($taxes_behavior)+($product->getPrice($taxes_behavior)* $product->specificPrice.reduction)}</span>
|
||||
<span class="price-percent-reduction">-{$product->specificPrice.reduction*100|floatval}%</span>
|
||||
{else}
|
||||
<span class="old-price product-price">{convertPrice price=($product->getPrice($taxes_behavior) + $product->specificPrice.reduction)}</span>
|
||||
<span class="price-percent-reduction">-{convertPrice price=$product->specificPrice.reduction}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{if {$product->specificPrice.reduction_type == 'percentage'}}
|
||||
<span class="old-price product-price">{displayWtPrice p=$product->getPrice($taxes_behavior)+($product->getPrice($taxes_behavior)* $product->specificPrice.reduction)}</span>
|
||||
<span class="price-percent-reduction">-{$product->specificPrice.reduction*100|floatval}%</span>
|
||||
{else}
|
||||
<span class="old-price product-price">{convertPrice price=($product->getPrice($taxes_behavior) + $product->specificPrice.reduction)}</span>
|
||||
<span class="price-percent-reduction">-{convertPrice price=$product->specificPrice.reduction}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $product->on_sale}
|
||||
{elseif $product->specificPrice AND $product->specificPrice.reduction}
|
||||
<div class="product_discount">
|
||||
<span class="reduced-price">{l s='Reduced price!'}</span>
|
||||
</div>
|
||||
<div class="product_discount">
|
||||
<span class="reduced-price">{l s='Reduced price!'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
|
||||
@@ -109,22 +109,28 @@
|
||||
</span>
|
||||
{/if}
|
||||
</p>
|
||||
<div class="clearfix">
|
||||
<div class="button-container">
|
||||
{if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product->minimal_quantity == 1 AND $product->customizable != 2 AND !$PS_CATALOG_MODE}
|
||||
{if ($product->quantity > 0 OR $product->allow_oosp)}
|
||||
<a class="button ajax_add_to_cart_button btn btn-default" rel="ajax_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></a>
|
||||
{else}
|
||||
<span class="ajax_add_to_cart_button button btn btn-default disabled"><span>{l s='Add to cart'}</span></span>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
<a class="button lnk_view btn btn-default" href="{$product->getLink()}" title="{l s='View'}"><span>{l s='View'}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="button-container">
|
||||
{if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product->minimal_quantity == 1 AND $product->customizable != 2 AND !$PS_CATALOG_MODE}
|
||||
{if ($product->quantity > 0 OR $product->allow_oosp)}
|
||||
<a
|
||||
class="button ajax_add_to_cart_button btn btn-default"
|
||||
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>
|
||||
</a>
|
||||
{else}
|
||||
<span class="ajax_add_to_cart_button button btn btn-default disabled"><span>{l s='Add to cart'}</span></span>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
<a class="button lnk_view btn btn-default" href="{$product->getLink()}" title="{l s='View'}"><span>{l s='View'}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
@@ -163,5 +169,4 @@
|
||||
{/if}
|
||||
<ul class="footer_link">
|
||||
<li><a class="button lnk_view btn btn-default" href="{$base_dir}"><span><i class="icon-chevron-left left"></i>{l s='Continue Shopping'}</span></a></li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
Reference in New Issue
Block a user