Remove blocklayered
@@ -124,19 +124,6 @@ class DispatcherCore
|
||||
'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
|
||||
),
|
||||
),
|
||||
/* Must be after the product and category rules in order to avoid conflict */
|
||||
'layered_rule' => array(
|
||||
'controller' => 'category',
|
||||
'rule' => '{id}-{rewrite}{/:selected_filters}',
|
||||
'keywords' => array(
|
||||
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
|
||||
/* Selected filters is used by the module blocklayered */
|
||||
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
|
||||
'rewrite' => array('regexp' => '[_a-zA-Z0-9\pL\pS-]*'),
|
||||
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -5514,66 +5514,6 @@ class ProductCore extends ObjectModel
|
||||
$id_shop = (int)Context::getContext()->shop->id;
|
||||
$cache_id = 'Product::getAttributesParams_'.(int)$id_product.'-'.(int)$id_product_attribute.'-'.(int)$id_lang.'-'.(int)$id_shop;
|
||||
|
||||
// if blocklayered module is installed we check if user has set custom attribute name
|
||||
if (Module::isInstalled('blocklayered') && Module::isEnabled('blocklayered')) {
|
||||
$nb_custom_values = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT la.`id_attribute`, la.`url_name` as `name`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` la
|
||||
ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE la.`url_name` IS NOT NULL AND la.`url_name` != \'\'
|
||||
AND pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.`id_product_attribute` = '.(int)$id_product_attribute);
|
||||
|
||||
if (!empty($nb_custom_values)) {
|
||||
$tab_id_attribute = array();
|
||||
foreach ($nb_custom_values as $attribute) {
|
||||
$tab_id_attribute[] = $attribute['id_attribute'];
|
||||
|
||||
$group = Db::getInstance()->executeS('
|
||||
SELECT a.`id_attribute`, g.`id_attribute_group`, g.`url_name` as `group`
|
||||
FROM `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` g
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)$id_lang.'
|
||||
AND g.`url_name` IS NOT NULL AND g.`url_name` != \'\'');
|
||||
if (empty($group)) {
|
||||
$group = Db::getInstance()->executeS('
|
||||
SELECT g.`id_attribute_group`, g.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute_group_lang` g
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)$id_lang.'
|
||||
AND g.`name` IS NOT NULL');
|
||||
}
|
||||
$result[] = array_merge($attribute, $group[0]);
|
||||
}
|
||||
$values_not_custom = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.id_product_attribute = '.(int)$id_product_attribute.'
|
||||
AND a.`id_attribute` NOT IN('.implode(', ', $tab_id_attribute).')');
|
||||
return array_merge($values_not_custom, $result);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Cache::isStored($cache_id)) {
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT a.`id_attribute`, a.`id_attribute_group`, al.`name`, agl.`name` as `group`
|
||||
@@ -5603,94 +5543,20 @@ class ProductCore extends ObjectModel
|
||||
*/
|
||||
public static function getAttributesInformationsByProduct($id_product)
|
||||
{
|
||||
// if blocklayered module is installed we check if user has set custom attribute name
|
||||
if (Module::isInstalled('blocklayered') && Module::isEnabled('blocklayered')) {
|
||||
$nb_custom_values = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT la.`id_attribute`, la.`url_name` as `attribute`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` la
|
||||
ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE la.`url_name` IS NOT NULL AND la.`url_name` != \'\'
|
||||
AND pa.`id_product` = '.(int)$id_product);
|
||||
|
||||
if (!empty($nb_custom_values)) {
|
||||
$tab_id_attribute = array();
|
||||
foreach ($nb_custom_values as $attribute) {
|
||||
$tab_id_attribute[] = $attribute['id_attribute'];
|
||||
|
||||
$group = Db::getInstance()->executeS('
|
||||
SELECT g.`id_attribute_group`, g.`url_name` as `group`
|
||||
FROM `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` g
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)Context::getContext()->language->id.'
|
||||
AND g.`url_name` IS NOT NULL AND g.`url_name` != \'\'');
|
||||
if (empty($group)) {
|
||||
$group = Db::getInstance()->executeS('
|
||||
SELECT g.`id_attribute_group`, g.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute_group_lang` g
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)Context::getContext()->language->id.'
|
||||
AND g.`name` IS NOT NULL');
|
||||
}
|
||||
$result[] = array_merge($attribute, $group[0]);
|
||||
}
|
||||
$values_not_custom = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
'.Shop::addSqlAssociation('attribute', 'pac').'
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND a.`id_attribute` NOT IN('.implode(', ', $tab_id_attribute).')');
|
||||
$result = array_merge($values_not_custom, $result);
|
||||
} else {
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
'.Shop::addSqlAssociation('attribute', 'pac').'
|
||||
WHERE pa.`id_product` = '.(int)$id_product);
|
||||
}
|
||||
} else {
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
'.Shop::addSqlAssociation('attribute', 'pac').'
|
||||
WHERE pa.`id_product` = '.(int)$id_product);
|
||||
}
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
'.Shop::addSqlAssociation('attribute', 'pac').'
|
||||
WHERE pa.`id_product` = '.(int)$id_product);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
<module action="enable" name="statsdata"/>
|
||||
<module action="enable" name="blockcart"/>
|
||||
<module action="enable" name="blockuserinfo"/>
|
||||
<module action="disable" name="blocklayered"/>
|
||||
<module action="disable" name="pscleaner"/>
|
||||
<module action="disable" name="trackingfront"/>
|
||||
<module action="disable" name="vatnumber"/>
|
||||
|
||||
@@ -741,7 +741,6 @@ class AdminMetaControllerCore extends AdminController
|
||||
{
|
||||
$this->addFieldRoute('product_rule', $this->l('Route to products'));
|
||||
$this->addFieldRoute('category_rule', $this->l('Route to category'));
|
||||
$this->addFieldRoute('layered_rule', $this->l('Route to category which has the "selected_filter" attribute for the "Layered Navigation" (blocklayered) module'));
|
||||
$this->addFieldRoute('supplier_rule', $this->l('Route to supplier'));
|
||||
$this->addFieldRoute('manufacturer_rule', $this->l('Route to manufacturer'));
|
||||
$this->addFieldRoute('cms_rule', $this->l('Route to CMS page'));
|
||||
|
||||
@@ -29,7 +29,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
private $_modules_ad = array(
|
||||
'blockcart' => array('cartabandonmentpro'),
|
||||
/* 'bloctopmenu' => array('advancedtopmenu'), */
|
||||
'blocklayered' => array('pm_advancedsearch4')
|
||||
);
|
||||
/*
|
||||
** @var array map with $_GET keywords and their callback
|
||||
|
||||
@@ -2088,7 +2088,6 @@ class AdminThemesControllerCore extends AdminController
|
||||
'blockcart',
|
||||
'blockcurrencies',
|
||||
'blocklanguages',
|
||||
'blocklayered',
|
||||
'blockmyaccount',
|
||||
'blocknewsletter',
|
||||
'blocksocial',
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
-----------------------------
|
||||
# V2.1.2 to V2.1.3
|
||||
-----------------------------
|
||||
|
||||
## Improved/Changed Features:
|
||||
|
||||
* [CO] : [#244] Changed Tools::jsonEncode to json_encode
|
||||
* [CO] : [#242] PHP7 compatibility changes
|
||||
|
||||
|
||||
2014-04-22 18:57:17 +0200 // Changelog updated
|
||||
2014-04-17 15:49:24 +0200 [-] MO : Blocklayered - FixBug #PSCSX-1505
|
||||
2014-04-17 12:21:18 +0200 [-] MO : Blocklayered - FixBug #PSCSX-1337
|
||||
2014-04-08 10:29:23 +0200 // blocklayered: better wording.
|
||||
2014-04-03 15:24:10 +0200 // Update version
|
||||
2014-04-03 15:23:10 +0200 [-] BO : BlockLayered - FixBug #PSCSX-1399 pagination problem
|
||||
2014-03-27 18:22:40 +0100 // update version number
|
||||
2014-03-27 11:57:03 +0100 Merge pull request #2 from xBorderie/patch-1
|
||||
2014-03-27 11:51:19 +0100 [*] MO : a string you can actually translate.
|
||||
2014-03-27 11:51:15 +0100 // Fix wrong backquote in SQL
|
||||
2014-03-24 17:53:22 +0100 // MO blocklayered : Removed ps_version_compliancy duplicate
|
||||
2014-03-24 12:21:34 +0100 Merge branch 'master' of https://github.com/PrestaShop/blocklayered
|
||||
2014-03-24 11:43:28 +0100 / MO blocklayered : ps_versions_compliancy modified (1.5.6.1 => 1.6)
|
||||
2014-03-24 11:02:30 +0100 / MO blocklayered : ps_versions_compliancy added
|
||||
2014-03-21 18:39:28 +0100 [-] Add column names in SQL insert into
|
||||
2014-03-20 16:54:45 +0100 // Two forgotten periods in blocklayered 1.6 template.
|
||||
2014-03-20 14:22:46 +0100 Initial commit
|
||||
@@ -1,37 +0,0 @@
|
||||
# Layered navigation block
|
||||
|
||||
## About
|
||||
|
||||
Displays a block with layered navigation filters.
|
||||
|
||||
## Contributing
|
||||
|
||||
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
|
||||
|
||||
### Requirements
|
||||
|
||||
Contributors **must** follow the following rules:
|
||||
|
||||
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
|
||||
* Do not update the module's version number.
|
||||
* Follow [the coding standards][1].
|
||||
|
||||
### Process in details
|
||||
|
||||
Contributors wishing to edit a module's files should follow the following process:
|
||||
|
||||
1. Create your GitHub account, if you do not have one already.
|
||||
2. Fork the blocklayered project to your GitHub account.
|
||||
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
|
||||
4. Create a branch in your local clone of the module for your changes.
|
||||
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
|
||||
6. Push your changed branch to your fork in your GitHub account.
|
||||
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
|
||||
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
|
||||
|
||||
That's it: you have contributed to this open-source project! Congratulations!
|
||||
|
||||
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
|
||||
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
|
||||
[3]: https://help.github.com/articles/using-pull-requests
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
#enabled_filters {
|
||||
margin: 0 0 10px 0;
|
||||
background: #eee;
|
||||
padding: 5px;
|
||||
}
|
||||
#enabled_filters .layered_subtitle {
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
#enabled_filters ul li {padding:2px 0}
|
||||
#enabled_filters li a {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
text-indent: -5000px;
|
||||
/*background: url(../../../img/icon/delete.gif) no-repeat 0 0 transparent;*/
|
||||
background: url(./delete.gif) no-repeat 0 0 transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
#layered_block_left .layered_close {
|
||||
float: right;
|
||||
padding-right: 5px;
|
||||
}
|
||||
#layered_block_left span.layered_close a,
|
||||
#layered_block_left span.layered_close a {
|
||||
display:block;
|
||||
height:13px;
|
||||
width:13px;
|
||||
text-decoration: none;
|
||||
text-indent:-5000px;
|
||||
background:url(img/icon/less.gif) no-repeat 2px 2px;
|
||||
}
|
||||
#layered_block_left span.closed a {
|
||||
background:url(img/icon/more.gif) no-repeat 2px 2px;
|
||||
}
|
||||
|
||||
#layered_block_left .layered_subtitle {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
#layered_block_left ul {
|
||||
clear: both;
|
||||
padding: 5px 0;
|
||||
}
|
||||
#layered_block_left ul li {padding:2px 0}
|
||||
#layered_block_left ul li label {cursor: pointer;}
|
||||
#layered_block_left div.block_content {
|
||||
}
|
||||
#layered_block_left ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
#layered_block_left ul li {
|
||||
list-style-type: none;
|
||||
}
|
||||
#layered_block_left div > form > div > div {
|
||||
margin-top: 5px;
|
||||
}
|
||||
#layered_block_left #enabled_filters , #layered_url_filter_block{
|
||||
font-size: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 0px;
|
||||
border-bottom: 1px dotted #CCC;
|
||||
}
|
||||
#layered_block_left #enabled_filters ul li {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Style moved form the template to the css */
|
||||
|
||||
#layered_block_left #enabled_filters ul li:hover {
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
#layered_block_left #enabled_filters a {
|
||||
text-decoration: none;
|
||||
color: red;
|
||||
}
|
||||
#layered_block_left ul li:hover {
|
||||
}
|
||||
#layered_block_left ul li input.checkbox {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
#layered_block_left ul li .disabled {
|
||||
color: #666;
|
||||
}
|
||||
#layered_block_left .color-option {
|
||||
border: 1px solid #666666;
|
||||
height: 16px;
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
}
|
||||
#layered_block_left .color-option.disable {
|
||||
opacity: 0.5;
|
||||
filter:alpha(opacity=50);
|
||||
-moz-opacity:0.5;
|
||||
}
|
||||
#layered_block_left .nomargin a {
|
||||
display: inline;
|
||||
}
|
||||
#layered_form .select {
|
||||
width: 165px;
|
||||
}
|
||||
#layered_form .color-option {
|
||||
margin-left: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding:0;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
#layered_form .color-option.on {
|
||||
border: 1px solid red;
|
||||
}
|
||||
#layered_form input[type=radio] {
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.layered_price_range {
|
||||
margin-left: 7px;
|
||||
}
|
||||
.layered_price_range_unit {
|
||||
margin-right: 7px;
|
||||
}
|
||||
.layered_slider_container {
|
||||
margin: 6px 0 6px 7px; width: 91%;
|
||||
}
|
||||
.layered_slider {
|
||||
margin-top:5px;
|
||||
}
|
||||
.layered_input_range_min {
|
||||
width:30px;
|
||||
}
|
||||
.layered_input_range_max {
|
||||
width:40px;
|
||||
}
|
||||
.layered_list_selected {
|
||||
font-weight: bold;
|
||||
}
|
||||
.layered_list {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
.layered_list:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
.layered_ajax_loader p {
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.hide-action {
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
.hide-action:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
#layered_form div div ul {
|
||||
max-height: 200px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/../../init.php');
|
||||
|
||||
Context::getContext()->controller->php_self = 'category';
|
||||
$blockLayered = Module::getInstanceByName('blocklayered');
|
||||
echo $blockLayered->ajaxCall();
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/blocklayered.php');
|
||||
|
||||
if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('token') || !Module::isInstalled('blocklayered'))
|
||||
die('Bad token');
|
||||
|
||||
$blockLayered = new BlockLayered();
|
||||
echo $blockLayered->indexAttribute();
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#selectProductSort').unbind('change').bind('change', function()
|
||||
{
|
||||
reloadContent();
|
||||
})
|
||||
});
|
||||
@@ -1,27 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div id="product_list" class="clear">
|
||||
<p class="warning">{l s='There are no products.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/blocklayered.php');
|
||||
|
||||
if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('token') || !Module::isInstalled('blocklayered'))
|
||||
die('Bad token');
|
||||
|
||||
if (!Tools::getValue('ajax'))
|
||||
{
|
||||
// Case of nothing to do but showing a message (1)
|
||||
if (Tools::getValue('return_message') !== false)
|
||||
{
|
||||
echo '1';
|
||||
die();
|
||||
}
|
||||
|
||||
if (Tools::usingSecureMode())
|
||||
$domain = Tools::getShopDomainSsl(true);
|
||||
else
|
||||
$domain = Tools::getShopDomain(true);
|
||||
// Return a content without waiting the end of index execution
|
||||
header('Location: '.$domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-price-indexer.php?token='.Tools::getValue('token') .'&return_message='.(int)Tools::getValue('cursor'));
|
||||
flush();
|
||||
}
|
||||
|
||||
if(Tools::getValue('full'))
|
||||
{
|
||||
echo BlockLayered::fullPricesIndexProcess((int)Tools::getValue('cursor'), (int)Tools::getValue('ajax'), true);
|
||||
}
|
||||
else
|
||||
echo BlockLayered::pricesIndexProcess((int)Tools::getValue('cursor'), (int)Tools::getValue('ajax'));
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/blocklayered.php');
|
||||
|
||||
if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('token') || !Module::isInstalled('blocklayered'))
|
||||
die('Bad token');
|
||||
|
||||
$blockLayered = new BlockLayered();
|
||||
$cursor = json_decode(Tools::getValue('cursor', '{}'), true);
|
||||
echo $blockLayered->indexUrl($cursor, (int)Tools::getValue('truncate'));
|
||||
@@ -1,159 +0,0 @@
|
||||
#layered_block_left div.block_content {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#layered_block_left ul {
|
||||
padding-left: 0;
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
#layered_form > div > div {
|
||||
border-bottom: 1px dotted #CCCCCC;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#layered_block_left .hide-action {
|
||||
display: block;
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
}
|
||||
#layered_block_left .hide-action:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#layered_block_left ul li {
|
||||
margin-left: 15px;
|
||||
padding-left: 2px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#layered_block_left #enabled_filters , #layered_url_filter_block {
|
||||
font-size: 10px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#layered_block_left #enabled_filters ul li {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Style moved form the template to the css */
|
||||
#layered_block_left #enabled_filters ul li:hover {
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#layered_block_left #enabled_filters a {
|
||||
text-decoration: none;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#layered_block_left ul li:hover {
|
||||
background: #71BF47;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#layered_block_left ul li label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#layered_block_left ul li.nomargin {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#layered_block_left span.layered_subtitle {
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#layered_block_left span.layered_close a { text-decoration: none; }
|
||||
|
||||
#layered_block_left span.layered_close {
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#layered_block_left ul li input.checkbox {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
#layered_block_left ul li .disabled {
|
||||
color: #666;
|
||||
}
|
||||
#product_list .warning {
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
#layered_form .select {
|
||||
width: 165px;
|
||||
}
|
||||
#layered_form .color-option {
|
||||
margin-left: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding:0;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
#layered_block_left .color-option.disable {
|
||||
opacity: 0.5;
|
||||
filter:alpha(opacity=50);
|
||||
-moz-opacity:0.5;
|
||||
}
|
||||
#layered_form .color-option.on {
|
||||
border: 1px solid red;
|
||||
}
|
||||
#layered_form input[type=radio] {
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.layered_price_range {
|
||||
margin-left: 7px;
|
||||
}
|
||||
.layered_price_range_unit {
|
||||
margin-right: 7px;
|
||||
}
|
||||
.layered_slider_container {
|
||||
margin: 6px 0 6px 6px; width: 93%;
|
||||
}
|
||||
.layered_slider {
|
||||
margin-top:5px;
|
||||
}
|
||||
.layered_input_range_min {
|
||||
width:30px;
|
||||
}
|
||||
.layered_input_range_max {
|
||||
width:40px;
|
||||
}
|
||||
.layered_list_selected {
|
||||
font-weight: bold;
|
||||
}
|
||||
.layered_ajax_loader p {
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.hide-action {
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
.hide-action:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
#layered_form div div ul {
|
||||
max-height: 200px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
@@ -1,643 +0,0 @@
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
var ajaxQueries = new Array();
|
||||
var ajaxLoaderOn = 0;
|
||||
var sliderList = new Array();
|
||||
var slidersInit = false;
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
cancelFilter();
|
||||
openCloseFilter();
|
||||
|
||||
// Click on color
|
||||
$('#layered_form input[type=button], #layered_form label.layered_color').live('click', function()
|
||||
{
|
||||
if (!$('input[name='+$(this).attr('name')+'][type=hidden]').length)
|
||||
$('<input />').attr('type', 'hidden').attr('name', $(this).attr('name')).val($(this).data('rel')).appendTo('#layered_form');
|
||||
else
|
||||
$('input[name='+$(this).attr('name')+'][type=hidden]').remove();
|
||||
reloadContent();
|
||||
});
|
||||
|
||||
// Click on checkbox
|
||||
$('#layered_form input[type=checkbox], #layered_form input[type=radio]').live('click', function()
|
||||
{
|
||||
reloadContent();
|
||||
});
|
||||
|
||||
$(document).on('change', '#layered_form .select', function(e)
|
||||
{
|
||||
reloadContent();
|
||||
});
|
||||
|
||||
// Changing content of an input text
|
||||
$('#layered_form input.layered_input_range').live('keyup', function()
|
||||
{
|
||||
if ($(this).attr('timeout_id'))
|
||||
window.clearTimeout($(this).attr('timeout_id'));
|
||||
|
||||
// IE Hack, setTimeout do not acept the third parameter
|
||||
var reference = this;
|
||||
|
||||
$(this).attr('timeout_id', window.setTimeout(function(it) {
|
||||
if (!$(it).attr('id'))
|
||||
it = reference;
|
||||
|
||||
var filter = $(it).attr('id').replace(/^layered_(.+)_range_.*$/, '$1');
|
||||
|
||||
var value_min = parseInt($('#layered_'+filter+'_range_min').val());
|
||||
if (isNaN(value_min))
|
||||
value_min = 0;
|
||||
$('#layered_'+filter+'_range_min').val(value_min);
|
||||
|
||||
var value_max = parseInt($('#layered_'+filter+'_range_max').val());
|
||||
if (isNaN(value_max))
|
||||
value_max = 0;
|
||||
$('#layered_'+filter+'_range_max').val(value_max);
|
||||
|
||||
if (value_max < value_min) {
|
||||
$('#layered_'+filter+'_range_max').val($(it).val());
|
||||
$('#layered_'+filter+'_range_min').val($(it).val());
|
||||
}
|
||||
reloadContent();
|
||||
}, 500, this));
|
||||
});
|
||||
|
||||
$('#layered_block_left .radio').live('click', function() {
|
||||
var name = $(this).attr('name');
|
||||
$.each($(this).parent().parent().find('input[type=button]'), function (it, item) {
|
||||
if ($(item).hasClass('on') && $(item).attr('name') != name) {
|
||||
$(item).click();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
// Click on label
|
||||
$('#layered_block_left label a').live({
|
||||
click: function() {
|
||||
var disable = $(this).parent().parent().find('input').attr('disabled');
|
||||
if (disable == ''
|
||||
|| typeof(disable) == 'undefined'
|
||||
|| disable == false)
|
||||
{
|
||||
$(this).parent().parent().find('input').click();
|
||||
reloadContent();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
layered_hidden_list = {};
|
||||
$('.hide-action').live('click', function() {
|
||||
if (typeof(layered_hidden_list[$(this).parent().find('ul').attr('id')]) == 'undefined' || layered_hidden_list[$(this).parent().find('ul').attr('id')] == false)
|
||||
{
|
||||
layered_hidden_list[$(this).parent().find('ul').attr('id')] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
layered_hidden_list[$(this).parent().find('ul').attr('id')] = false;
|
||||
}
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
$('.hide-action').each(function() {
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
|
||||
// To be sure there is no other events attached to the selectProductSort, change the ID
|
||||
var id = 1;
|
||||
while ($('#selectPrductSort').length) { // Because ids are duplicated
|
||||
// Unbind event change on #selectPrductSort
|
||||
$('#selectPrductSort').unbind('change');
|
||||
$('#selectPrductSort').attr('onchange', '');
|
||||
$('#selectPrductSort').addClass('selectProductSort');
|
||||
$('#selectPrductSort').attr('id', 'selectPrductSort'+id);
|
||||
$('label[for=selectPrductSort]').attr('for', 'selectPrductSort'+id);
|
||||
id++;
|
||||
}
|
||||
|
||||
while ($('#selectProductSort').length) { // Because ids are duplicated
|
||||
// Unbind event change on #selectProductSort
|
||||
$('#selectProductSort').unbind('change');
|
||||
$('#selectProductSort').attr('onchange', '');
|
||||
$('#selectProductSort').addClass('selectProductSort');
|
||||
$('#selectProductSort').attr('id', 'selectProductSort'+id);
|
||||
$('label[for=selectProductSort]').attr('for', 'selectProductSort'+id);
|
||||
id++;
|
||||
}
|
||||
|
||||
// Since 1.5, event is add to .selectProductSort and not to #selectProductSort
|
||||
setTimeout(function() {
|
||||
$('.selectProductSort').unbind('change');
|
||||
}, 100);
|
||||
|
||||
$('.selectProductSort').live('change', function(event) {
|
||||
$('.selectProductSort').val($(this).val());
|
||||
reloadContent();
|
||||
});
|
||||
|
||||
// To be sure there is no other events attached to the nb_item, change the ID
|
||||
var id = 1;
|
||||
while ($('#nb_item').length) { // Because ids are duplicated
|
||||
// Unbind event change on #nb_item
|
||||
$('#nb_item').unbind('change');
|
||||
$('#nb_item').attr('onchange', '');
|
||||
$('#nb_item').addClass('nb_item');
|
||||
$('#nb_item').attr('id', 'nb_item'+id);
|
||||
$('label[for=nb_item]').attr('for', 'nb_item'+id);
|
||||
id++;
|
||||
}
|
||||
$('.nb_item').live('change', function(event) {
|
||||
$('.nb_item').val($(this).val());
|
||||
reloadContent();
|
||||
});
|
||||
|
||||
paginationButton();
|
||||
initLayered();
|
||||
});
|
||||
|
||||
function hideFilterValueAction(it)
|
||||
{
|
||||
if (typeof(layered_hidden_list[$(it).parent().find('ul').attr('id')]) == 'undefined' || layered_hidden_list[$(it).parent().find('ul').attr('id')] == false)
|
||||
{
|
||||
$(it).parent().find('.hiddable').hide();
|
||||
$(it).parent().find('.hide-action.less').hide();
|
||||
$(it).parent().find('.hide-action.more').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(it).parent().find('.hiddable').show();
|
||||
$(it).parent().find('.hide-action.less').show();
|
||||
$(it).parent().find('.hide-action.more').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function addSlider(type, data, unit, format)
|
||||
{
|
||||
sliderList.push({
|
||||
type: type,
|
||||
data: data,
|
||||
unit: unit,
|
||||
format: format
|
||||
});
|
||||
}
|
||||
|
||||
function initSliders()
|
||||
{
|
||||
$(sliderList).each(function(i, slider){
|
||||
$('#layered_'+slider['type']+'_slider').slider(slider['data']);
|
||||
|
||||
var from = '';
|
||||
var to = '';
|
||||
switch (slider['format'])
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
from = blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 0), slider['format'], slider['unit']);
|
||||
to = blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 1), slider['format'], slider['unit']);
|
||||
break;
|
||||
case 5:
|
||||
from = $('#layered_'+slider['type']+'_slider').slider('values', 0)+slider['unit']
|
||||
to = $('#layered_'+slider['type']+'_slider').slider('values', 1)+slider['unit'];
|
||||
break;
|
||||
}
|
||||
$('#layered_'+slider['type']+'_range').html(from+' - '+to);
|
||||
});
|
||||
}
|
||||
|
||||
function initLayered()
|
||||
{
|
||||
initSliders();
|
||||
initLocationChange();
|
||||
updateProductUrl();
|
||||
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
|
||||
{
|
||||
var params = window.location.href.split('#')[1];
|
||||
reloadContent('&selected_filters='+params);
|
||||
}
|
||||
}
|
||||
|
||||
function paginationButton() {
|
||||
$('#pagination a').not(':hidden').each(function () {
|
||||
if ($(this).attr('href').search(/[&|\?]p=/) == -1)
|
||||
var page = 1;
|
||||
else
|
||||
var page = $(this).attr('href').replace(/^.*[&|\?]p=(\d+).*$/, '$1');
|
||||
|
||||
var location = window.location.href.replace(/#.*$/, '');
|
||||
$(this).attr('href', location+current_friendly_url.replace(/\/page-(\d+)/, '')+'/page-'+page);
|
||||
});
|
||||
$('#pagination li').not('.current, .disabled').each(function () {
|
||||
var nbPage = 0;
|
||||
if ($(this).attr('id') == 'pagination_next')
|
||||
nbPage = parseInt($('#pagination li.current').children().html())+ 1;
|
||||
else if ($(this).attr('id') == 'pagination_previous')
|
||||
nbPage = parseInt($('#pagination li.current').children().html())- 1;
|
||||
|
||||
$(this).children().click(function () {
|
||||
if (nbPage == 0)
|
||||
p = parseInt($(this).html()) + parseInt(nbPage);
|
||||
else
|
||||
p = nbPage;
|
||||
p = '&p='+ p;
|
||||
reloadContent(p);
|
||||
nbPage = 0;
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function cancelFilter()
|
||||
{
|
||||
$('#enabled_filters a').live('click', function(e)
|
||||
{
|
||||
if ($(this).data('rel').search(/_slider$/) > 0)
|
||||
{
|
||||
if ($('#'+$(this).data('rel')).length)
|
||||
{
|
||||
$('#'+$(this).data('rel')).slider('values' , 0, $('#'+$(this).data('rel')).slider('option' , 'min' ));
|
||||
$('#'+$(this).data('rel')).slider('values' , 1, $('#'+$(this).data('rel')).slider('option' , 'max' ));
|
||||
$('#'+$(this).data('rel')).slider('option', 'slide')(0,{values:[$('#'+$(this).data('rel')).slider( 'option' , 'min' ), $('#'+$(this).data('rel')).slider( 'option' , 'max' )]});
|
||||
}
|
||||
else if($('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).length)
|
||||
{
|
||||
$('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).val($('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).attr('limitValue'));
|
||||
$('#'+$(this).data('rel').replace(/_slider$/, '_range_max')).val($('#'+$(this).data('rel').replace(/_slider$/, '_range_max')).attr('limitValue'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($('option#'+$(this).data('rel')).length)
|
||||
{
|
||||
$('#'+$(this).data('rel')).parent().val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#'+$(this).data('rel')).attr('checked', false);
|
||||
$('.'+$(this).data('rel')).attr('checked', false);
|
||||
$('#layered_form input[type=hidden][name='+$(this).data('rel')+']').remove();
|
||||
}
|
||||
}
|
||||
reloadContent();
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function openCloseFilter()
|
||||
{
|
||||
$('#layered_form span.layered_close a').live('click', function(e)
|
||||
{
|
||||
if ($(this).html() == '<')
|
||||
{
|
||||
$('#'+$(this).data('rel')).show();
|
||||
$(this).html('v');
|
||||
$(this).parent().removeClass('closed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#'+$(this).data('rel')).hide();
|
||||
$(this).html('<');
|
||||
$(this).parent().addClass('closed');
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function stopAjaxQuery() {
|
||||
if (typeof(ajaxQueries) == 'undefined')
|
||||
ajaxQueries = new Array();
|
||||
for(i = 0; i < ajaxQueries.length; i++) {
|
||||
if (typeof ajaxQueries[i] != 'undefined')
|
||||
ajaxQueries[i].abort();
|
||||
}
|
||||
ajaxQueries = new Array();
|
||||
}
|
||||
|
||||
function reloadContent(params_plus)
|
||||
{
|
||||
stopAjaxQuery();
|
||||
|
||||
if (!ajaxLoaderOn)
|
||||
{
|
||||
$('#product_list').prepend($('#layered_ajax_loader').html());
|
||||
$('#product_list').css('opacity', '0.7');
|
||||
ajaxLoaderOn = 1;
|
||||
}
|
||||
|
||||
data = $('#layered_form').serialize();
|
||||
$('.layered_slider').each( function () {
|
||||
var sliderStart = $(this).slider('values', 0);
|
||||
var sliderStop = $(this).slider('values', 1);
|
||||
if (typeof(sliderStart) == 'number' && typeof(sliderStop) == 'number')
|
||||
data += '&'+$(this).attr('id')+'='+sliderStart+'_'+sliderStop;
|
||||
});
|
||||
|
||||
$(['price', 'weight']).each(function(it, sliderType)
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_range_min').length)
|
||||
{
|
||||
data += '&layered_'+sliderType+'_slider='+$('#layered_'+sliderType+'_range_min').val()+'_'+$('#layered_'+sliderType+'_range_max').val();
|
||||
}
|
||||
});
|
||||
|
||||
$('#layered_form .select option').each( function () {
|
||||
if($(this).attr('id') && $(this).parent().val() == $(this).val())
|
||||
{
|
||||
data += '&'+$(this).attr('id') + '=' + $(this).val();
|
||||
}
|
||||
});
|
||||
|
||||
if ($('.selectProductSort').length && $('.selectProductSort').val())
|
||||
{
|
||||
if ($('.selectProductSort').val().search(/orderby=/) > 0)
|
||||
{
|
||||
// Old ordering working
|
||||
var splitData = [
|
||||
$('.selectProductSort').val().match(/orderby=(\w*)/)[1],
|
||||
$('.selectProductSort').val().match(/orderway=(\w*)/)[1]
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
// New working for default theme 1.4 and theme 1.5
|
||||
var splitData = $('.selectProductSort').val().split(':');
|
||||
}
|
||||
data += '&orderby='+splitData[0]+'&orderway='+splitData[1];
|
||||
}
|
||||
if ($('.nb_item').length)
|
||||
{
|
||||
data += '&n='+$('.nb_item').val();
|
||||
}
|
||||
|
||||
var slideUp = true;
|
||||
if (params_plus == undefined || !(typeof params_plus == 'string'))
|
||||
{
|
||||
params_plus = '';
|
||||
slideUp = false;
|
||||
}
|
||||
|
||||
// Get nb items per page
|
||||
var n = '';
|
||||
$('#pagination #nb_item').children().each(function(it, option) {
|
||||
if (option.selected)
|
||||
n = '&n='+option.value;
|
||||
});
|
||||
|
||||
ajaxQuery = $.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: baseDir + 'modules/blocklayered/blocklayered-ajax.php',
|
||||
data: data+params_plus+n,
|
||||
dataType: 'json',
|
||||
cache: false, // @todo see a way to use cache and to add a timestamps parameter to refresh cache each 10 minutes for example
|
||||
success: function(result)
|
||||
{
|
||||
$('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock));
|
||||
|
||||
$('.category-product-count').html(result.categoryCount);
|
||||
|
||||
if (result.productList)
|
||||
$('#product_list').replaceWith(utf8_decode(result.productList));
|
||||
else
|
||||
$('#product_list').html('');
|
||||
|
||||
$('#product_list').css('opacity', '1');
|
||||
if ($.browser.msie) // Fix bug with IE8 and aliasing
|
||||
$('#product_list').css('filter', '');
|
||||
|
||||
if (result.pagination.search(/[^\s]/) >= 0) {
|
||||
if ($(result.pagination).find('ul.pagination').length)
|
||||
{
|
||||
$('div#pagination').show();
|
||||
$('ul.pagination').each(function () {
|
||||
$(this).replaceWith($(result.pagination).find('ul.pagination'));
|
||||
});
|
||||
}
|
||||
else if (!$('ul.pagination').length)
|
||||
{
|
||||
$('div#pagination').show();
|
||||
$('div#pagination').each(function () {
|
||||
$(this).html($(result.pagination));
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('ul.pagination').html('');
|
||||
$('div#pagination').hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('ul.pagination').html('');
|
||||
$('div#pagination').hide();
|
||||
}
|
||||
|
||||
paginationButton();
|
||||
ajaxLoaderOn = 0;
|
||||
|
||||
// On submiting nb items form, relaod with the good nb of items
|
||||
$('#pagination form').submit(function() {
|
||||
val = $('#pagination #nb_item').val();
|
||||
$('#pagination #nb_item').children().each(function(it, option) {
|
||||
if (option.value == val)
|
||||
$(option).attr('selected', true);
|
||||
else
|
||||
$(option).removeAttr('selected');
|
||||
});
|
||||
// Reload products and pagination
|
||||
reloadContent();
|
||||
return false;
|
||||
});
|
||||
if (typeof(ajaxCart) != "undefined")
|
||||
ajaxCart.overrideButtonsInThePage();
|
||||
|
||||
if (typeof(reloadProductComparison) == 'function')
|
||||
reloadProductComparison();
|
||||
initSliders();
|
||||
|
||||
// Currente page url
|
||||
if (typeof(current_friendly_url) == 'undefined')
|
||||
current_friendly_url = '#';
|
||||
|
||||
// Get all sliders value
|
||||
$(['price', 'weight']).each(function(it, sliderType)
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_slider').length)
|
||||
{
|
||||
// Check if slider is enable & if slider is used
|
||||
if(typeof($('#layered_'+sliderType+'_slider').slider('values', 0)) != 'object')
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_slider').slider('values', 0) != $('#layered_'+sliderType+'_slider').slider('option' , 'min')
|
||||
|| $('#layered_'+sliderType+'_slider').slider('values', 1) != $('#layered_'+sliderType+'_slider').slider('option' , 'max'))
|
||||
current_friendly_url += '/'+sliderType+'-'+$('#layered_'+sliderType+'_slider').slider('values', 0)+'-'+$('#layered_'+sliderType+'_slider').slider('values', 1)
|
||||
}
|
||||
}
|
||||
else if ($('#layered_'+sliderType+'_range_min').length)
|
||||
{
|
||||
if ($('#layered_' + sliderType + '_range_min').attr('limitValue') != $('#layered_'+sliderType+'_range_min').val()
|
||||
|| $('#layered_' + sliderType + '_range_max').attr('limitValue') != $('#layered_'+sliderType+'_range_max').val())
|
||||
current_friendly_url += '/'+sliderType+'-'+$('#layered_'+sliderType+'_range_min').val()+'-'+$('#layered_'+sliderType+'_range_max').val();
|
||||
}
|
||||
});
|
||||
window.location = current_friendly_url;
|
||||
lockLocationChecking = true;
|
||||
|
||||
if(slideUp)
|
||||
$.scrollTo('#product_list', 400);
|
||||
updateProductUrl();
|
||||
|
||||
$('.hide-action').each(function() {
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
}
|
||||
});
|
||||
ajaxQueries.push(ajaxQuery);
|
||||
}
|
||||
|
||||
function initLocationChange(func, time)
|
||||
{
|
||||
if(!time) time = 500;
|
||||
var current_friendly_url = getUrlParams();
|
||||
setInterval(function()
|
||||
{
|
||||
if(getUrlParams() != current_friendly_url && !lockLocationChecking)
|
||||
{
|
||||
// Don't reload page if current_friendly_url and real url match
|
||||
if (current_friendly_url.replace(/^#(\/)?/, '') == getUrlParams().replace(/^#(\/)?/, ''))
|
||||
return;
|
||||
|
||||
lockLocationChecking = true;
|
||||
reloadContent('&selected_filters='+getUrlParams().replace(/^#/, ''));
|
||||
}
|
||||
else {
|
||||
lockLocationChecking = false;
|
||||
current_friendly_url = getUrlParams();
|
||||
}
|
||||
}, time);
|
||||
}
|
||||
|
||||
function getUrlParams()
|
||||
{
|
||||
var params = current_friendly_url;
|
||||
if(window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
|
||||
params = '#'+window.location.href.split('#')[1];
|
||||
return params;
|
||||
}
|
||||
|
||||
function updateProductUrl()
|
||||
{
|
||||
// Adding the filters to URL product
|
||||
if (typeof(param_product_url) != 'undefined' && param_product_url != '' && param_product_url !='#') {
|
||||
$.each($('ul#product_list li.ajax_block_product .product_img_link,'+
|
||||
'ul#product_list li.ajax_block_product h3 a,'+
|
||||
'ul#product_list li.ajax_block_product .product_desc a,'+
|
||||
'ul#product_list li.ajax_block_product .lnk_view'), function() {
|
||||
$(this).attr('href', $(this).attr('href') + param_product_url);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy of the php function utf8_decode()
|
||||
*/
|
||||
function utf8_decode (utfstr) {
|
||||
var res = '';
|
||||
for (var i = 0; i < utfstr.length;) {
|
||||
var c = utfstr.charCodeAt(i);
|
||||
|
||||
if (c < 128)
|
||||
{
|
||||
res += String.fromCharCode(c);
|
||||
i++;
|
||||
}
|
||||
else if((c > 191) && (c < 224))
|
||||
{
|
||||
var c1 = utfstr.charCodeAt(i+1);
|
||||
res += String.fromCharCode(((c & 31) << 6) | (c1 & 63));
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
var c1 = utfstr.charCodeAt(i+1);
|
||||
var c2 = utfstr.charCodeAt(i+2);
|
||||
res += String.fromCharCode(((c & 15) << 12) | ((c1 & 63) << 6) | (c2 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a formatted price
|
||||
* Copy from tools.js
|
||||
*/
|
||||
function blocklayeredFormatCurrency(price, currencyFormat, currencySign, currencyBlank)
|
||||
{
|
||||
// if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class)
|
||||
blank = '';
|
||||
price = parseFloat(price.toFixed(6));
|
||||
price = ps_round(price, priceDisplayPrecision);
|
||||
if (currencyBlank > 0)
|
||||
blank = ' ';
|
||||
if (currencyFormat == 1)
|
||||
return currencySign + blank + blocklayeredFormatNumber(price, priceDisplayPrecision, ',', '.');
|
||||
if (currencyFormat == 2)
|
||||
return (blocklayeredFormatNumber(price, priceDisplayPrecision, ' ', ',') + blank + currencySign);
|
||||
if (currencyFormat == 3)
|
||||
return (currencySign + blank + blocklayeredFormatNumber(price, priceDisplayPrecision, '.', ','));
|
||||
if (currencyFormat == 4)
|
||||
return (blocklayeredFormatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign);
|
||||
return price;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a formatted number
|
||||
* Copy from tools.js
|
||||
*/
|
||||
function blocklayeredFormatNumber(value, numberOfDecimal, thousenSeparator, virgule)
|
||||
{
|
||||
value = value.toFixed(numberOfDecimal);
|
||||
var val_string = value+'';
|
||||
var tmp = val_string.split('.');
|
||||
var abs_val_string = (tmp.length == 2) ? tmp[0] : val_string;
|
||||
var deci_string = ('0.' + (tmp.length == 2 ? tmp[1] : 0)).substr(2);
|
||||
var nb = abs_val_string.length;
|
||||
|
||||
for (var i = 1 ; i < 4; i++)
|
||||
if (value >= Math.pow(10, (3 * i)))
|
||||
abs_val_string = abs_val_string.substring(0, nb - (3 * i)) + thousenSeparator + abs_val_string.substring(nb - (3 * i));
|
||||
|
||||
if (parseInt(numberOfDecimal) == 0)
|
||||
return abs_val_string;
|
||||
return abs_val_string + virgule + (deci_string > 0 ? deci_string : '00');
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $nbr_filterBlocks != 0}
|
||||
<script type="text/javascript">
|
||||
current_friendly_url = '#{$current_friendly_url}';
|
||||
{if version_compare($smarty.const._PS_VERSION_,'1.5','>')}
|
||||
param_product_url = '#{$param_product_url}';
|
||||
{else}
|
||||
param_product_url = '';
|
||||
{/if}
|
||||
</script>
|
||||
<div id="layered_block_left" class="block">
|
||||
<h4 class="title_block">{l s='Product filter' mod='blocklayered'}</h4>
|
||||
<div class="block_content">
|
||||
<form action="#" id="layered_form">
|
||||
<div>
|
||||
{if isset($selected_filters) && $n_filters > 0}
|
||||
<div id="enabled_filters">
|
||||
<span class="layered_subtitle" style="float: none;">{l s='Enabled filters:' mod='blocklayered'}</span>
|
||||
<ul>
|
||||
{foreach from=$selected_filters key=filter_type item=filter_values}
|
||||
{foreach from=$filter_values key=filter_key item=filter_value name=f_values}
|
||||
{foreach from=$filters item=filter}
|
||||
{if $filter.type == $filter_type && isset($filter.values)}
|
||||
{if isset($filter.slider)}
|
||||
{if $smarty.foreach.f_values.first}
|
||||
<li>
|
||||
<a href="#" data-rel="layered_{$filter.type}_slider" title="{l s='Cancel' mod='blocklayered'}">x</a>
|
||||
{if $filter.format == 1}
|
||||
{l s='%1$s: %2$s - %3$s'|sprintf:$filter.name:{displayPrice price=$filter.values[0]}:{displayPrice price=$filter.values[1]}|escape:html:'UTF-8' mod='blocklayered'}
|
||||
{else}
|
||||
{l s='%1$s: %2$s %4$s - %3$s %4$s'|sprintf:$filter.name:$filter.values[0]:$filter.values[1]:$filter.unit|escape:html:'UTF-8' mod='blocklayered'}
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
{else}
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if $id_value == $filter_key && !is_numeric($filter_value) && ($filter.type eq 'id_attribute_group' || $filter.type eq 'id_feature') || $id_value == $filter_value && $filter.type neq 'id_attribute_group' && $filter.type neq 'id_feature'}
|
||||
<li>
|
||||
<a href="#" data-rel="layered_{$filter.type_lite}_{$id_value}" title="{l s='Cancel' mod='blocklayered'}">x</a>
|
||||
{l s='%1$s: %2$s' mod='blocklayered' sprintf=[$filter.name, $value.name]}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach from=$filters item=filter}
|
||||
{if isset($filter.values)}
|
||||
{if isset($filter.slider)}
|
||||
<div class="layered_{$filter.type}" style="display: none;">
|
||||
{else}
|
||||
<div>
|
||||
{/if}
|
||||
<span class="layered_subtitle">{$filter.name|escape:html:'UTF-8'}</span>
|
||||
<span class="layered_close"><a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}">v</a></span>
|
||||
<div class="clear"></div>
|
||||
<ul id="ul_layered_{$filter.type}_{$filter.id_key}">
|
||||
{if !isset($filter.slider)}
|
||||
{if $filter.filter_type == 0}
|
||||
{foreach from=$filter.values key=id_value item=value name=fe}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" data-rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" title="{$value.name|escape:html:'UTF-8'}" />
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" data-rel="{$id_value}_{$filter.id_key}"{/if}{/if}>
|
||||
{if !$value.nbr}
|
||||
{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}
|
||||
{else}
|
||||
<a href="{$value.link}" data-rel="{$value.rel}">{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
{/if}
|
||||
</label>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{if $filter.filter_type == 1}
|
||||
{foreach from=$filter.values key=id_value item=value name=fe}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" data-rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" title="{$value.name|escape:html:'UTF-8'}"/>
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="radio" class="radio layered_{$filter.type_lite}_{$id_value}" name="layered_{$filter.type_lite}{if $filter.id_key}_{$filter.id_key}{else}_1{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" data-rel="{$id_value}_{$filter.id_key}"{/if}{/if}>
|
||||
{if !$value.nbr}
|
||||
{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
{else}
|
||||
<a href="{$value.link}" data-rel="{$value.rel}">{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
{/if}
|
||||
</label>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<select class="select" {if $filter.filter_show_limit > 1}multiple="multiple" size="{$filter.filter_show_limit}"{/if}>
|
||||
<option value="">{l s='No filters' mod='blocklayered'}</option>
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<option style="color: {if isset($value.color)}{$value.color}{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}_{$filter.id_key}" {if isset($value.checked) && $value.checked}selected="selected"{/if} {if !$value.nbr}disabled="disabled"{/if}>
|
||||
{$value.name|escape:html:'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
{if $filter.filter_type == 0}
|
||||
<label for="{$filter.type}">{l s='Range:' mod='blocklayered'}</label> <span id="layered_{$filter.type}_range"></span>
|
||||
<div class="layered_slider_container">
|
||||
<div class="layered_slider" id="layered_{$filter.type}_slider"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
var filterRange = {/literal}{$filter.max}-{$filter.min}{literal};
|
||||
var step = filterRange / 100;
|
||||
if (step > 1)
|
||||
step = parseInt(step);
|
||||
addSlider('{/literal}{$filter.type}{literal}',{
|
||||
range: true,
|
||||
step: step,
|
||||
min: {/literal}{$filter.min}{literal},
|
||||
max: {/literal}{$filter.max}{literal},
|
||||
values: [ {/literal}{$filter.values[0]}{literal}, {/literal}{$filter.values[1]}{literal}],
|
||||
slide: function( event, ui ) {
|
||||
stopAjaxQuery();
|
||||
{/literal}
|
||||
{if $filter.format < 5}
|
||||
{literal}
|
||||
from = blocklayeredFormatCurrency(ui.values[0], {/literal}{$filter.format}{literal}, '{/literal}{$filter.unit}{literal}');
|
||||
to = blocklayeredFormatCurrency(ui.values[1], {/literal}{$filter.format}{literal}, '{/literal}{$filter.unit}{literal}');
|
||||
{/literal}
|
||||
{else}
|
||||
{literal}
|
||||
from = ui.values[0]+'{/literal}{$filter.unit}{literal}';
|
||||
to = ui.values[1]+'{/literal}{$filter.unit}{literal}';
|
||||
{/literal}
|
||||
{/if}
|
||||
{literal}
|
||||
$('#layered_{/literal}{$filter.type}{literal}_range').html(from+' - '+to);
|
||||
},
|
||||
stop: function () {
|
||||
reloadContent();
|
||||
}
|
||||
}, '{/literal}{$filter.unit}{literal}', {/literal}{$filter.format}{literal});
|
||||
{/literal}
|
||||
</script>
|
||||
{else}
|
||||
{if $filter.filter_type == 1}
|
||||
<li class="nomargin">
|
||||
{l s='From' mod='blocklayered'} <input class="layered_{$filter.type}_range layered_input_range_min layered_input_range" id="layered_{$filter.type}_range_min" type="text" value="{$filter.values[0]}"/>
|
||||
<span class="layered_{$filter.type}_range_unit">{$filter.unit}</span>
|
||||
{l s='to' mod='blocklayered'} <input class="layered_{$filter.type}_range layered_input_range_max layered_input_range" id="layered_{$filter.type}_range_max" type="text" value="{$filter.values[1]}"/>
|
||||
<span class="layered_{$filter.type}_range_unit">{$filter.unit}</span>
|
||||
<span class="layered_{$filter.type}_format" style="display:none;">{$filter.format}</span>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$('#layered_{/literal}{$filter.type}{literal}_range_min').attr('limitValue', {/literal}{$filter.min}{literal});
|
||||
$('#layered_{/literal}{$filter.type}{literal}_range_max').attr('limitValue', {/literal}{$filter.max}{literal});
|
||||
{/literal}
|
||||
</script>
|
||||
</li>
|
||||
{else}
|
||||
{foreach from=$filter.list_of_values item=values}
|
||||
<li class="nomargin {if $filter.values[1] == $values[1] && $filter.values[0] == $values[0]}layered_list_selected{/if} layered_list" onclick="$('#layered_{$filter.type}_range_min').val({$values[0]});$('#layered_{$filter.type}_range_max').val({$values[1]});reloadContent();">
|
||||
- {l s='From' mod='blocklayered'} {$values[0]} {$filter.unit} {l s='to' mod='blocklayered'} {$values[1]} {$filter.unit}
|
||||
</li>
|
||||
{/foreach}
|
||||
<li style="display: none;">
|
||||
<input class="layered_{$filter.type}_range" id="layered_{$filter.type}_range_min" type="hidden" value="{$filter.values[0]}"/>
|
||||
<input class="layered_{$filter.type}_range" id="layered_{$filter.type}_range_max" type="hidden" value="{$filter.values[1]}"/>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if count($filter.values) > $filter.filter_show_limit && $filter.filter_show_limit > 0 && $filter.filter_type != 2}
|
||||
<span class="hide-action more">{l s='Show more' mod='blocklayered'}</span>
|
||||
<span class="hide-action less">{l s='Show less' mod='blocklayered'}</span>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$('.layered_{/literal}{$filter.type}{literal}').show();
|
||||
{/literal}
|
||||
</script>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
<input type="hidden" name="id_category_layered" value="{$id_category_layered}" />
|
||||
{foreach from=$filters item=filter}
|
||||
{if $filter.type_lite == 'id_attribute_group' && isset($filter.is_color_group) && $filter.is_color_group && $filter.filter_type != 2}
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if isset($value.checked)}
|
||||
<input type="hidden" name="layered_id_attribute_group_{$id_value}" value="{$id_value}_{$filter.id_key}" />
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</form>
|
||||
</div>
|
||||
<div id="layered_ajax_loader" style="display: none;">
|
||||
<p><img src="{$img_ps_dir}loader.gif" alt="" /><br />{l s='Loading...' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div id="layered_block_left" class="block">
|
||||
<div class="block_content">
|
||||
<form action="#" id="layered_form">
|
||||
<input type="hidden" name="id_category_layered" value="{$id_category_layered}" />
|
||||
</form>
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<p style=""><img src="{$img_ps_dir}loader.gif" alt="" /><br />{l s='Loading...' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "PrestaShop/blocklayered",
|
||||
"description": "PrestaShop module blocklayered",
|
||||
"homepage": "https://github.com/PrestaShop/blocklayered",
|
||||
"license": "AFL - Academic Free License (AFL 3.0)",
|
||||
"authors": [
|
||||
{
|
||||
"name": "PrestaShop SA",
|
||||
"email": "contact@prestashop.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
},
|
||||
"type": "prestashop-module"
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
.table-filter-templates, .table-configurations {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-configurations td {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.table-configurations .label {
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
width: 30%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.filter_panel header {
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.filter_list {
|
||||
background-color: #fff;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.filter_list_item {
|
||||
background-color: #E9E9E9;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.filter_list_item td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.filter_list_item .filter-title {
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
.bootstrap .filter_list .filter_list_item {
|
||||
display: table;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
margin-bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset;
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-ms-border-radius: 3px;
|
||||
-o-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.bootstrap .filter_panel {
|
||||
min-height: 20px;
|
||||
padding: 7px 7px 0px 7px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #ebebeb;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.bootstrap .filter_panel header {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 213 B |
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 973 B |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
|
Before Width: | Height: | Size: 58 B |
|
Before Width: | Height: | Size: 58 B |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,219 +0,0 @@
|
||||
function checkForm()
|
||||
{
|
||||
var is_category_selected = false;
|
||||
var is_filter_selected = false;
|
||||
|
||||
$('#categories-treeview input[type=checkbox]').each(
|
||||
function()
|
||||
{
|
||||
if ($(this).prop('checked'))
|
||||
{
|
||||
is_category_selected = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$('.filter_list_item input[type=checkbox]').each(
|
||||
function()
|
||||
{
|
||||
if ($(this).prop('checked'))
|
||||
{
|
||||
is_filter_selected = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if (!is_category_selected)
|
||||
{
|
||||
alert(translations['no_selected_categories']);
|
||||
$('#categories-treeview input[type=checkbox]').first().focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_filter_selected)
|
||||
{
|
||||
alert(translations['no_selected_filters']);
|
||||
$('#filter_list_item input[type=checkbox]').first().focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).ready(
|
||||
function()
|
||||
{
|
||||
$('.ajaxcall').click(
|
||||
function()
|
||||
{
|
||||
if (this.legend == undefined)
|
||||
this.legend = $(this).html();
|
||||
|
||||
if (this.running == undefined)
|
||||
this.running = false;
|
||||
|
||||
if (this.running == true)
|
||||
return false;
|
||||
|
||||
$('.ajax-message').hide();
|
||||
this.running = true;
|
||||
|
||||
if (typeof(this.restartAllowed) == 'undefined' || this.restartAllowed)
|
||||
{
|
||||
$(this).html(this.legend+translations['in_progress']);
|
||||
$('#indexing-warning').show();
|
||||
}
|
||||
|
||||
this.restartAllowed = false;
|
||||
var type = $(this).attr('rel');
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: this.href+'&ajax=1',
|
||||
context: this,
|
||||
dataType: 'json',
|
||||
cache: 'false',
|
||||
success: function(res)
|
||||
{
|
||||
this.running = false;
|
||||
this.restartAllowed = true;
|
||||
$('#indexing-warning').hide();
|
||||
$(this).html(this.legend);
|
||||
|
||||
if (type == 'price')
|
||||
$('#ajax-message-ok span').html(translations['url_indexation_finished']);
|
||||
else
|
||||
$('#ajax-message-ok span').html(translations['attribute_indexation_finished']);
|
||||
|
||||
$('#ajax-message-ok').show();
|
||||
return;
|
||||
},
|
||||
error: function(res)
|
||||
{
|
||||
this.restartAllowed = true;
|
||||
$('#indexing-warning').hide();
|
||||
|
||||
if (type == 'price')
|
||||
$('#ajax-message-ko span').html(translations['url_indexation_failed']);
|
||||
else
|
||||
$('#ajax-message-ko span').html(translations['attribute_indexation_failed']);
|
||||
|
||||
$('#ajax-message-ko').show();
|
||||
$(this).html(this.legend);
|
||||
this.running = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.ajaxcall-recurcive').each(
|
||||
function(it, elm)
|
||||
{
|
||||
$(elm).click(
|
||||
function()
|
||||
{
|
||||
if (this.cursor == undefined)
|
||||
this.cursor = 0;
|
||||
|
||||
if (this.legend == undefined)
|
||||
this.legend = $(this).html();
|
||||
|
||||
if (this.running == undefined)
|
||||
this.running = false;
|
||||
|
||||
if (this.running == true)
|
||||
return false;
|
||||
|
||||
$('.ajax-message').hide();
|
||||
|
||||
this.running = true;
|
||||
|
||||
if (typeof(this.restartAllowed) == 'undefined' || this.restartAllowed)
|
||||
{
|
||||
$(this).html(this.legend+translations['in_progress']);
|
||||
$('#indexing-warning').show();
|
||||
}
|
||||
|
||||
this.restartAllowed = false;
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: this.href+'&ajax=1&cursor='+this.cursor,
|
||||
context: this,
|
||||
dataType: 'json',
|
||||
cache: 'false',
|
||||
success: function(res)
|
||||
{
|
||||
this.running = false;
|
||||
if (res.result)
|
||||
{
|
||||
this.cursor = 0;
|
||||
$('#indexing-warning').hide();
|
||||
$(this).html(this.legend);
|
||||
$('#ajax-message-ok span').html(translations['price_indexation_finished']);
|
||||
$('#ajax-message-ok').show();
|
||||
return;
|
||||
}
|
||||
this.cursor = parseInt(res.cursor);
|
||||
$(this).html(this.legend+translations['price_indexation_in_progress'].replace('%s', res.count));
|
||||
$(this).click();
|
||||
},
|
||||
error: function(res)
|
||||
{
|
||||
this.restartAllowed = true;
|
||||
$('#indexing-warning').hide();
|
||||
$('#ajax-message-ko span').html(translations['price_indexation_failed']);
|
||||
$('#ajax-message-ko').show();
|
||||
$(this).html(this.legend);
|
||||
|
||||
this.cursor = 0;
|
||||
this.running = false;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
if (typeof PS_LAYERED_INDEXED !== 'undefined' && PS_LAYERED_INDEXED)
|
||||
{
|
||||
$('#url-indexe').click();
|
||||
$('#full-index').click();
|
||||
}
|
||||
|
||||
$('.sortable').sortable(
|
||||
{
|
||||
forcePlaceholderSize: true
|
||||
});
|
||||
|
||||
$('.filter_list_item input[type=checkbox]').click(
|
||||
function()
|
||||
{
|
||||
var current_selected_filters_count = parseInt($('#selected_filters').html());
|
||||
|
||||
if ($(this).prop('checked'))
|
||||
$('#selected_filters').html(current_selected_filters_count+1);
|
||||
else
|
||||
$('#selected_filters').html(current_selected_filters_count-1);
|
||||
}
|
||||
);
|
||||
|
||||
if (typeof filters !== 'undefined')
|
||||
{
|
||||
filters = JSON.parse(filters);
|
||||
|
||||
for (filter in filters)
|
||||
{
|
||||
$('#'+filter).attr("checked","checked");
|
||||
$('#selected_filters').html(parseInt($('#selected_filters').html())+1);
|
||||
$('select[name="'+filter+'_filter_type"]').val(filters[filter].filter_type);
|
||||
$('select[name="'+filter+'_filter_show_limit"]').val(filters[filter].filter_show_limit);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../");
|
||||
exit;
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* HTML5 Sortable jQuery Plugin
|
||||
* http://farhadi.ir/projects/html5sortable
|
||||
*
|
||||
* Copyright 2012, Ali Farhadi
|
||||
* Released under the MIT license.
|
||||
*/
|
||||
(function($) {
|
||||
var dragging, placeholders = $();
|
||||
$.fn.sortable = function(options) {
|
||||
var method = String(options);
|
||||
options = $.extend({
|
||||
connectWith: false
|
||||
}, options);
|
||||
return this.each(function() {
|
||||
if (/^enable|disable|destroy$/.test(method)) {
|
||||
var items = $(this).children($(this).data('items')).attr('draggable', method == 'enable');
|
||||
if (method == 'destroy') {
|
||||
items.add(this).removeData('connectWith items')
|
||||
.off('dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s');
|
||||
}
|
||||
return;
|
||||
}
|
||||
var isHandle, index, items = $(this).children(options.items);
|
||||
var placeholder = $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class="sortable-placeholder">');
|
||||
items.find(options.handle).mousedown(function() {
|
||||
isHandle = true;
|
||||
}).mouseup(function() {
|
||||
isHandle = false;
|
||||
});
|
||||
$(this).data('items', options.items)
|
||||
placeholders = placeholders.add(placeholder);
|
||||
if (options.connectWith) {
|
||||
$(options.connectWith).add(this).data('connectWith', options.connectWith);
|
||||
}
|
||||
items.attr('draggable', 'true').on('dragstart.h5s', function(e) {
|
||||
if (options.handle && !isHandle) {
|
||||
return false;
|
||||
}
|
||||
isHandle = false;
|
||||
var dt = e.originalEvent.dataTransfer;
|
||||
dt.effectAllowed = 'move';
|
||||
dt.setData('Text', 'dummy');
|
||||
index = (dragging = $(this)).addClass('sortable-dragging').index();
|
||||
}).on('dragend.h5s', function() {
|
||||
if (!dragging) {
|
||||
return;
|
||||
}
|
||||
dragging.removeClass('sortable-dragging').show();
|
||||
placeholders.detach();
|
||||
if (index != dragging.index()) {
|
||||
dragging.parent().trigger('sortupdate', {item: dragging, start_index: index, end_index: dragging.index()});
|
||||
}
|
||||
dragging = null;
|
||||
}).not('a[href], img').on('selectstart.h5s', function() {
|
||||
this.dragDrop && this.dragDrop();
|
||||
return false;
|
||||
}).end().add([this, placeholder]).on('dragover.h5s dragenter.h5s drop.h5s', function(e) {
|
||||
if (!items.is(dragging) && options.connectWith !== $(dragging).parent().data('connectWith')) {
|
||||
return true;
|
||||
}
|
||||
if (e.type == 'drop') {
|
||||
e.stopPropagation();
|
||||
placeholders.filter(':visible').after(dragging);
|
||||
dragging.trigger('dragend.h5s');
|
||||
return false;
|
||||
}
|
||||
e.preventDefault();
|
||||
e.originalEvent.dataTransfer.dropEffect = 'move';
|
||||
if (items.is(this)) {
|
||||
if (options.forcePlaceholderSize) {
|
||||
placeholder.height(dragging.outerHeight());
|
||||
}
|
||||
dragging.hide();
|
||||
$(this)[placeholder.index() < $(this).index() ? 'after' : 'before'](placeholder);
|
||||
placeholders.not(placeholder).detach();
|
||||
} else if (!placeholders.is(this) && !$(this).children(options.items).length) {
|
||||
placeholders.detach();
|
||||
$(this).append(placeholder);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../");
|
||||
exit;
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_9($object)
|
||||
{
|
||||
return $object->registerHook('displayBackOfficeHeader');
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_0_14($object)
|
||||
{
|
||||
$return = true;
|
||||
if (check_index('layered_product_attribute', 'PRIMARY'))
|
||||
{
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` DROP PRIMARY KEY';
|
||||
$return = Db::getInstance()->execute($query);
|
||||
}
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD PRIMARY KEY (`id_attribute`, `id_product`, `id_shop`)';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
if (check_index('layered_product_attribute', 'id_attribute_group'))
|
||||
{
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` DROP KEY `id_attribute_group`';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
}
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD UNIQUE KEY `id_attribute_group` (`id_attribute_group`,`id_attribute`,`id_product`,`id_shop`)';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
function check_index($table, $key)
|
||||
{
|
||||
$indexes = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.$table.'` WHERE Key_name = \''.$key.'\'');
|
||||
return (count($indexes) > 0);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_0_8($object)
|
||||
{
|
||||
$return = Configuration::updateValue('PS_LAYERED_FILTER_PRICE_ROUNDING', 1);
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` CHANGE `url_name` `url_name` VARCHAR( 128 ) NULL DEFAULT NULL , CHANGE `meta_title` `meta_title` VARCHAR( 128 ) NULL DEFAULT NULL';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` CHANGE `url_name` `url_name` VARCHAR( 128 ) NULL DEFAULT NULL , CHANGE `meta_title` `meta_title` VARCHAR( 128 ) NULL DEFAULT NULL';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_indexable_feature_lang_value` CHANGE `url_name` `url_name` VARCHAR( 128 ) NULL DEFAULT NULL , CHANGE `meta_title` `meta_title` VARCHAR( 128 ) NULL DEFAULT NULL';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value` CHANGE `url_name` `url_name` VARCHAR( 128 ) NULL DEFAULT NULL , CHANGE `meta_title` `meta_title` VARCHAR( 128 ) NULL DEFAULT NULL';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD PRIMARY KEY (`id_attribute`, `id_product`), DROP KEY `id_attribute`, ADD UNIQUE KEY `id_attribute_group` (`id_attribute_group`,`id_attribute`,`id_product`)';
|
||||
$return &= Db::getInstance()->execute($query);
|
||||
|
||||
return $return;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../");
|
||||
exit;
|
||||
@@ -1,308 +0,0 @@
|
||||
{if isset($message)}{$message}{/if}
|
||||
<fieldset>
|
||||
<legend><img src="{$uri}/img/cogs.gif" alt="{l s='Configuration' mod='blocklayered'}" /> {l s='New filters template' mod='blocklayered'}</legend>
|
||||
<form action="{$current_url}" method="post" class="form-horizontal" onsubmit="return checkForm();">
|
||||
<input type="hidden" name="id_layered_filter" id="id_layered_filter" value="{$id_layered_filter}" />
|
||||
<table class="table-configurations">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="label">{l s='Template name:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<input type="text" id="layered_tpl_name" name="layered_tpl_name" maxlength="64" value="{$template_name}" />
|
||||
<p class="help-block">{l s='Only as a reminder' mod='blocklayered'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{l s='Categories used for this template:' mod='blocklayered'}</td>
|
||||
<td>{$categories_tree}</td>
|
||||
</tr>
|
||||
{if isset($asso_shops)}
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Choose shop association:' mod='blocklayered'}
|
||||
</td>
|
||||
<td>{$asso_shops}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Filters:' mod='blocklayered'}
|
||||
<p class="help-block">{l s='You can drag and drop filters to adjust position' mod='blocklayered'}</p>
|
||||
</td>
|
||||
<td>
|
||||
<section class="filter_panel">
|
||||
<header>
|
||||
{l s='Total filters: %s'|sprintf:$total_filters mod='blocklayered'} - {l s='Selected filters: <span id=\'selected_filters\'>%s</span>'|sprintf:0 mod='blocklayered'}
|
||||
</header>
|
||||
<section class="filter_list">
|
||||
<ul class="list-unstyled sortable">
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_subcategories" id="layered_selection_subcategories" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Sub-categories filter' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_subcategories_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_subcategories_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_stock" id="layered_selection_stock" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Product stock filter' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_stock_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_stock_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_condition" id="layered_selection_condition" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Product condition filter' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_condition_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_condition_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_manufacturer" id="layered_selection_manufacturer" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Product manufacturer filter' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_manufacturer_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_manufacturer_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_weight_slider" id="layered_selection_weight_slider" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Product weight filter (slider)' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_weight_slider_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_weight_slider_filter_type">
|
||||
<option value="0">{l s='Slider' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Inputs area' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='List of values' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_price_slider" id="layered_selection_price_slider" type="checkbox" /></td>
|
||||
<td class="filter-title">{l s='Product price filter (slider)' mod='blocklayered'}</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_price_slider_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_price_slider_filter_type">
|
||||
<option value="0">{l s='Slider' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Inputs area' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='List of values' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
{if $attribute_groups|count > 0}
|
||||
{foreach $attribute_groups as $attribute_group}
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}" id="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}" type="checkbox" /></td>
|
||||
<td class="filter-title">
|
||||
{if $attribute_group['n'] > 1}
|
||||
{l s='Attribute group: %1$s (%2$d attributes)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blocklayered'}
|
||||
{else}
|
||||
{l s='Attribute group: %1$s (%2$d attribute)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blocklayered'}
|
||||
{/if}
|
||||
{if $attribute_group['is_color_group']}
|
||||
<img src="../img/admin/color_swatch.png" alt="" title="{l s='This group will allow user to select a color' mod='blocklayered'}" />
|
||||
{/if}
|
||||
</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{if $features|count > 0}
|
||||
{foreach $features as $feature}
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input name="layered_selection_feat_{(int)$feature['id_feature']}" id="layered_selection_feat_{(int)$feature['id_feature']}" type="checkbox" /></td>
|
||||
<td class="filter-title">
|
||||
{if $feature['n'] > 1}{l s='Feature: %1$s (%2$d values)'|sprintf:$feature['name']:$feature['n'] mod='blocklayered'}{else}{l s='Feature: %1$s (%2$d value)'|sprintf:$feature['name']:$feature['n'] mod='blocklayered'}{/if}
|
||||
</td>
|
||||
<td>{l s='Filter result limit:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_feat_{(int)$feature['id_feature']}_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>{l s='Filter style:' mod='blocklayered'}</td>
|
||||
<td>
|
||||
<select name="layered_selection_feat_{(int)$feature['id_feature']}_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="btn btn-default pull-right" id="submit-filter" name="SubmitFilter" type="submit"><i class="process-icon-save"></i> <span>{l s='Save' mod='blocklayered'}</span></button>
|
||||
<a class="button" href="{$current_url}">
|
||||
<i class="process-icon-cancel"></i> <span>{l s='Cancel' mod='blocklayered'}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<script type="text/javascript">
|
||||
var translations = new Array();
|
||||
{if isset($filters)}var filters = '{$filters}';{/if}
|
||||
translations['no_selected_categories'] = '{l s='You must select at least one category'|addslashes mod='blocklayered'}';
|
||||
translations['no_selected_filters'] = '{l s='You must select at least one filter'|addslashes mod='blocklayered'}';
|
||||
translations['selected_filters'] = '{l s='Selected filters: %s'|addslashes mod='blocklayered'}';
|
||||
</script>
|
||||
@@ -1,378 +0,0 @@
|
||||
{if isset($message)}{$message}{/if}
|
||||
<div class="panel">
|
||||
<h3><i class="icon-cogs"></i> {l s='New filters template' mod='blocklayered'}</h3>
|
||||
<form action="{$current_url}" method="post" class="form-horizontal" onsubmit="return checkForm();">
|
||||
<input type="hidden" name="id_layered_filter" id="id_layered_filter" value="{$id_layered_filter}" />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Template name:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" id="layered_tpl_name" name="layered_tpl_name" maxlength="64" value="{$template_name}" />
|
||||
<p class="help-block">{l s='Only as a reminder' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Categories used for this template:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
{if trim($categories_tree) != ''}
|
||||
{$categories_tree}
|
||||
{else}
|
||||
<div class="alert alert-warning">
|
||||
{l s='Categories selection is disabled because you have no categories or you are in a "all shops" context.' mod='blocklayered'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($asso_shops)}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Choose shop association:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">{$asso_shops}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="badge" id="selected_filters">0</span>
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='You can drag and drop filters to adjust position' mod='blocklayered'}">{l s='Filters:' mod='blocklayered'}</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<section class="filter_panel">
|
||||
<header class="clearfix">
|
||||
<span class="badge pull-right">{l s='Total filters: %s'|sprintf:$total_filters mod='blocklayered'}</span>
|
||||
</header>
|
||||
<section class="filter_list">
|
||||
<ul class="list-unstyled sortable">
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_subcategories" id="layered_selection_subcategories" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h4>{l s='Sub-categories filter' mod='blocklayered'}</h4>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_subcategories_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_subcategories_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_stock" id="layered_selection_stock" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">{l s='Product stock filter' mod='blocklayered'}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_stock_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_stock_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_condition" id="layered_selection_condition" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">{l s='Product condition filter' mod='blocklayered'}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_condition_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_condition_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_manufacturer" id="layered_selection_manufacturer" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">{l s='Product manufacturer filter' mod='blocklayered'}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_manufacturer_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_manufacturer_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_weight_slider" id="layered_selection_weight_slider" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">{l s='Product weight filter (slider)' mod='blocklayered'}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_weight_slider_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_weight_slider_filter_type">
|
||||
<option value="0">{l s='Slider' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Inputs area' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='List of values' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_price_slider" id="layered_selection_price_slider" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">{l s='Product price filter (slider)' mod='blocklayered'}</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_price_slider_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_price_slider_filter_type">
|
||||
<option value="0">{l s='Slider' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Inputs area' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='List of values' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{if $attribute_groups|count > 0}
|
||||
{foreach $attribute_groups as $attribute_group}
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}" id="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">
|
||||
{if $attribute_group['n'] > 1}
|
||||
{l s='Attribute group: %1$s (%2$d attributes)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blocklayered'}
|
||||
{else}
|
||||
{l s='Attribute group: %1$s (%2$d attribute)'|sprintf:$attribute_group['name']:$attribute_group['n'] mod='blocklayered'}
|
||||
{/if}
|
||||
{if $attribute_group['is_color_group']}
|
||||
<img src="../img/admin/color_swatch.png" alt="" title="{l s='This group will allow user to select a color' mod='blocklayered'}" />
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_ag_{(int)$attribute_group['id_attribute_group']}_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{if $features|count > 0}
|
||||
{foreach $features as $feature}
|
||||
<li class="filter_list_item" draggable="true">
|
||||
<div class="col-lg-2">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="layered_selection_feat_{(int)$feature['id_feature']}" id="layered_selection_feat_{(int)$feature['id_feature']}" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes' mod='blocklayered'}</span>
|
||||
<span>{l s='No' mod='blocklayered'}</span>
|
||||
</span>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<span class="module_name">
|
||||
{if $feature['n'] > 1}{l s='Feature: %1$s (%2$d values)'|sprintf:$feature['name']:$feature['n'] mod='blocklayered'}{else}{l s='Feature: %1$s (%2$d value)'|sprintf:$feature['name']:$feature['n'] mod='blocklayered'}{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter result limit:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_feat_{(int)$feature['id_feature']}_filter_show_limit">
|
||||
<option value="0">{l s='No limit' mod='blocklayered'}</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="control-label col-lg-6">{l s='Filter style:' mod='blocklayered'}</label>
|
||||
<div class="col-lg-6">
|
||||
<select name="layered_selection_feat_{(int)$feature['id_feature']}_filter_type">
|
||||
<option value="0">{l s='Checkbox' mod='blocklayered'}</option>
|
||||
<option value="1">{l s='Radio button' mod='blocklayered'}</option>
|
||||
<option value="2">{l s='Drop-down list' mod='blocklayered'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer" id="toolbar-footer">
|
||||
<button class="btn btn-default pull-right" id="submit-filter" name="SubmitFilter" type="submit"><i class="process-icon-save"></i> <span>{l s='Save' mod='blocklayered'}</span></button>
|
||||
<a class="btn btn-default" href="{$current_url}">
|
||||
<i class="process-icon-cancel"></i> <span>{l s='Cancel' mod='blocklayered'}</span>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var translations = new Array();
|
||||
{if isset($filters)}var filters = '{$filters}';{/if}
|
||||
translations['no_selected_categories'] = '{l s='You must select at least one category'|addslashes mod='blocklayered'}';
|
||||
translations['no_selected_filters'] = '{l s='You must select at least one filter'|addslashes mod='blocklayered'}';
|
||||
</script>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../../");
|
||||
exit;
|
||||
@@ -1,279 +0,0 @@
|
||||
{if isset($message)}{$message}{/if}
|
||||
<div id="ajax-message-ok" class="conf ajax-message alert alert-success" style="display: none">
|
||||
<span class="message"></span>
|
||||
</div>
|
||||
<div id="ajax-message-ko" class="error ajax-message alert alert-danger" style="display: none">
|
||||
<span class="message"></span>
|
||||
</div>
|
||||
{if !empty($limit_warning)}
|
||||
<div class="error">
|
||||
{if $limit_warning['error_type'] == 'suhosin'}
|
||||
{l s='Warning! Your hosting provider is using the Suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'}
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the Suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}<br/>
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase this limit to'}
|
||||
{/if}
|
||||
{l s='%s at least, or you will have to edit the translation files manually.' sprintf=$limit_warning['needed_limit']}
|
||||
</div>
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend><img src="{$uri}/img/cogs.gif" alt="{l s='Indexes and caches' mod='blocklayered'}" /> {l s='Indexes and caches' mod='blocklayered'}</legend>
|
||||
<div id="indexing-warning" class="alert alert-warning" style="display: none">
|
||||
{l s='Indexing is in progress. Please do not leave this page' mod='blocklayered'}
|
||||
</div>
|
||||
<div class="row">
|
||||
<a type="button" class="ajaxcall-recurcive button" href="{$price_indexer_url}">{l s='Index all missing prices' mod='blocklayered'}</a>
|
||||
<a type="button" class="ajaxcall-recurcive button" href="{$full_price_indexer_url}">{l s='Rebuild entire price index' mod='blocklayered'}</a>
|
||||
<a type="button" class="ajaxcall button" id="attribute-indexer" rel="attribute" href="{$attribute_indexer_url}">{l s='Build attribute index' mod='blocklayered'}</a>
|
||||
<a type="button" class="ajaxcall button" id="url-indexer" rel="price" href="{$url_indexer_url}">{l s='Build URL index' mod='blocklayered'}</a>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<div class="row">
|
||||
<div class="info">
|
||||
{l s='You can set a cron job that will rebuild price index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$price_indexer_url}</strong>
|
||||
<br/>
|
||||
<br />
|
||||
{l s='You can set a cron job that will rebuild attribute index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$attribute_indexer_url}</strong>
|
||||
<br/>
|
||||
<br />
|
||||
{l s='You can set a cron job that will rebuild URL index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$url_indexer_url}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="info">{l s='A nightly rebuild is recommended.' mod='blocklayered'}</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="clearfix"> </div>
|
||||
<fieldset>
|
||||
<legend><img src="{$uri}/img/cogs.gif" alt="{l s='Filters templates' mod='blocklayered'}" /> {l s='Filters templates (%d)' sprintf=[$filters_templates|count] mod='blocklayered'}</legend>
|
||||
{if $filters_templates|count > 0}
|
||||
<div class="row">
|
||||
<table class="table table-filter-templates">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center"><span class="title_box">{l s='ID' mod='blocklayered'}</span></th>
|
||||
<th><span class="title_box text-left">{l s='Name' mod='blocklayered'}</span></th>
|
||||
<th class="center"><span class="title_box">{l s='Categories' mod='blocklayered'}</span></th>
|
||||
<th><span class="title_box">{l s='Created on' mod='blocklayered'}</span></th>
|
||||
<th><span class="title_box text-right">{l s='Actions' mod='blocklayered'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $filters_templates as $template}
|
||||
<tr>
|
||||
<td class="center">{(int)$template['id_layered_filter']}</td>
|
||||
<td class="text-left">{$template['name']}</td>
|
||||
<td class="center">{(int)$template['n_categories']}</td>
|
||||
<td>{Tools::displayDate($template['date_add'],null , true)}</td>
|
||||
<td class="text-right">
|
||||
{if empty($limit_warning)}
|
||||
<a href="{$current_url}&edit_filters_template=1&id_layered_filter={(int)$template['id_layered_filter']}" class="btn btn-default"><img src="{$uri}img/edit.gif" alt="{l s='Edit' mod='blocklayered'}" />{l s='Edit' mod='blocklayered'}</a>
|
||||
{/if}
|
||||
<a href="{$current_url}&deleteFilterTemplate=1&id_layered_filter={(int)$template['id_layered_filter']}"
|
||||
onclick="return confirm('{l s='Do you really want to delete this filter template?' mod='blocklayered'}');"><img src="{$uri}img/cross.png" alt="{l s='Delete' mod='blocklayered'}" />{l s='Delete' mod='blocklayered'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="info">{l s='No filter template found.' mod='blocklayered'}</div>
|
||||
{/if}
|
||||
{if empty($limit_warning)}
|
||||
<div class="row">
|
||||
<a href="{$current_url}&add_new_filters_template=1" class="button">{l s='Add new filters template' mod='blocklayered'}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
<div class="clearfix"> </div>
|
||||
<fieldset>
|
||||
<legend><img src="{$uri}/img/cogs.gif" alt="{l s='Configuration' mod='blocklayered'}" /> {l s='Configuration' mod='blocklayered'}</legend>
|
||||
<form action="{$current_url}" method="post">
|
||||
<table class="table-configurations">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Hide filter values when no product is matching' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_hide_0_values" id="ps_layered_hide_0_values_on" value="1"{if $hide_values} checked="checked"{/if}>
|
||||
<label for="ps_layered_hide_0_values_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_hide_0_values" id="ps_layered_hide_0_values_off" value="0"{if !$hide_values} checked="checked"{/if}>
|
||||
<label for="ps_layered_hide_0_values_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Show the number of matching products' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_show_qties" id="ps_layered_show_qties_on" value="1"{if $show_quantities} checked="checked"{/if}>
|
||||
<label for="ps_layered_show_qties_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_show_qties" id="ps_layered_show_qties_off" value="0"{if !$show_quantities} checked="checked"{/if}>
|
||||
<label for="ps_layered_show_qties_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Show products from subcategories' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_full_tree" id="ps_layered_full_tree_on" value="1"{if $full_tree} checked="checked"{/if}>
|
||||
<label for="ps_layered_full_tree_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_full_tree" id="ps_layered_full_tree_off" value="0"{if !$full_tree} checked="checked"{/if}>
|
||||
<label for="ps_layered_full_tree_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Category filter depth (0 for no limits, 1 by default)' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ps_layered_filter_category_depth" value="{if $category_depth !== false}{$category_depth}{else}1{/if}" class="fixed-width-sm" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Use tax to filter price' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_price_usetax" id="ps_layered_filter_price_usetax_on" value="1"{if $price_use_tax} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_price_usetax_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_price_usetax" id="ps_layered_filter_price_usetax_off" value="0"{if !$price_use_tax} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_price_usetax_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Use rounding to filter price' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_price_rounding" id="ps_layered_filter_price_rounding_on" value="1"{if $price_use_rounding} checked="checked"{/if}/>
|
||||
<label for="ps_layered_filter_price_rounding_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_price_rounding" id="ps_layered_filter_price_rounding_off" value="0"{if !$price_use_rounding} checked="checked"{/if}/>
|
||||
<label for="ps_layered_filter_price_rounding_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Condition filter' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_index_condition" id="ps_layered_filter_index_condition_on" value="1"{if $index_cdt} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_condition_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_condition" id="ps_layered_filter_index_condition_off" value="0"{if !$index_cdt} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_condition_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Availability filter' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_index_availability" id="ps_layered_filter_index_availability_on" value="1"{if $index_qty} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_availability_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_availability" id="ps_layered_filter_index_availability_off" value="0"{if !$index_qty} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_availability_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Manufacturer filter' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_index_manufacturer" id="ps_layered_filter_index_manufacturer_on" value="1"{if $index_mnf} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_manufacturer_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_manufacturer" id="ps_layered_filter_index_manufacturer_off" value="0"{if !$index_mnf} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_manufacturer_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Category filter' mod='blocklayered'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="ps_layered_filter_index_category" id="ps_layered_filter_index_category_on" value="1"{if $index_cat} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_category_on" class="radioCheck">
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_category" id="ps_layered_filter_index_category_off" value="0"{if !$index_cat} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_category_off" class="radioCheck">
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button type="submit" class="btn btn-default" name="submitLayeredSettings"><i class="icon-save"></i> {l s='Save configuration' mod='blocklayered'}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<script type="text/javascript">
|
||||
{if isset($PS_LAYERED_INDEXED)}var PS_LAYERED_INDEXED = {$PS_LAYERED_INDEXED};{/if}
|
||||
var token = '{$token}';
|
||||
var id_lang = {$id_lang};
|
||||
var base_folder = '{$base_folder}';
|
||||
var translations = new Array();
|
||||
|
||||
translations['in_progress'] = '{l s='(in progress)' js=1 mod='blocklayered'}';
|
||||
translations['url_indexation_finished'] = '{l s='URL indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['attribute_indexation_finished'] = '{l s='Attribute indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['url_indexation_failed'] = '{l s='URL indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['attribute_indexation_failed'] = '{l s='Attribute indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_finished'] = '{l s='Price indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_failed'] = '{l s='Price indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_in_progress'] = '{l s='(in progress, %s products price to index)' js=1 mod='blocklayered'}';
|
||||
translations['loading'] = '{l s='Loading...' js=1 mod='blocklayered'}';
|
||||
translations['delete_all_filters_templates'] = '{l s='You selected -All categories-: all existing filter templates will be deleted. Is it OK?' js=1 mod='blocklayered'}';
|
||||
translations['no_selected_categories'] = '{l s='You must select at least one category' js=1 mod='blocklayered'}';
|
||||
</script>
|
||||
@@ -1,293 +0,0 @@
|
||||
{if isset($message)}{$message}{/if}
|
||||
<div id="ajax-message-ok" class="conf ajax-message alert alert-success" style="display: none">
|
||||
<span class="message"></span>
|
||||
</div>
|
||||
<div id="ajax-message-ko" class="error ajax-message alert alert-danger" style="display: none">
|
||||
<span class="message"></span>
|
||||
</div>
|
||||
{if !empty($limit_warning)}
|
||||
<div class="alert alert-danger">
|
||||
{if $limit_warning['error_type'] == 'suhosin'}
|
||||
{l s='Warning! Your hosting provider is using the Suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'}
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the Suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}<br/>
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase this limit to'}
|
||||
{/if}
|
||||
{l s='%s at least, or you will have to edit the translation files manually.' sprintf=$limit_warning['needed_limit']}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="panel">
|
||||
<h3><i class="icon-cogs"></i> {l s='Indexes and caches' mod='blocklayered'}</h3>
|
||||
<div id="indexing-warning" class="alert alert-warning" style="display: none">
|
||||
{l s='Indexing is in progress. Please do not leave this page' mod='blocklayered'}
|
||||
</div>
|
||||
<div class="row">
|
||||
<p>
|
||||
<a class="ajaxcall-recurcive btn btn-default" href="{$price_indexer_url}">{l s='Index all missing prices' mod='blocklayered'}</a>
|
||||
<a class="ajaxcall-recurcive btn btn-default" href="{$full_price_indexer_url}">{l s='Rebuild entire price index' mod='blocklayered'}</a>
|
||||
<a class="ajaxcall btn btn-default" id="attribute-indexer" rel="attribute" href="{$attribute_indexer_url}">{l s='Build attribute index' mod='blocklayered'}</a>
|
||||
<a class="ajaxcall btn btn-default" id="url-indexer" rel="price" href="{$url_indexer_url}">{l s='Build URL index' mod='blocklayered'}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="alert alert-info">
|
||||
{l s='You can set a cron job that will rebuild price index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$price_indexer_url}</strong>
|
||||
<br/>
|
||||
<br />
|
||||
{l s='You can set a cron job that will rebuild attribute index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$attribute_indexer_url}</strong>
|
||||
<br/>
|
||||
<br />
|
||||
{l s='You can set a cron job that will rebuild URL index using the following URL:' mod='blocklayered'}
|
||||
<br />
|
||||
<strong>{$url_indexer_url}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="alert alert-info">{l s='A nightly rebuild is recommended.' mod='blocklayered'}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3><i class="icon-cogs"></i> {l s='Filters templates' mod='blocklayered'}<span class="badge">{$filters_templates|count}</span></h3>
|
||||
{if $filters_templates|count > 0}
|
||||
<div class="row">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fixed-width-xs center"><span class="title_box">{l s='ID' mod='blocklayered'}</span></th>
|
||||
<th><span class="title_box text-left">{l s='Name' mod='blocklayered'}</span></th>
|
||||
<th class="fixed-width-sm center"><span class="title_box">{l s='Categories' mod='blocklayered'}</span></th>
|
||||
<th class="fixed-width-lg"><span class="title_box">{l s='Created on' mod='blocklayered'}</span></th>
|
||||
<th class="fixed-width-sm"><span class="title_box text-right">{l s='Actions' mod='blocklayered'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $filters_templates as $template}
|
||||
<tr>
|
||||
<td class="center">{(int)$template['id_layered_filter']}</td>
|
||||
<td class="text-left">{$template['name']}</td>
|
||||
<td class="center">{(int)$template['n_categories']}</td>
|
||||
<td>{Tools::displayDate($template['date_add'],null , true)}</td>
|
||||
<td>
|
||||
{if empty($limit_warning)}
|
||||
<div class="btn-group-action">
|
||||
<div class="btn-group pull-right">
|
||||
<a href="{$current_url}&edit_filters_template=1&id_layered_filter={(int)$template['id_layered_filter']}" class="btn btn-default">
|
||||
<i class="icon-pencil"></i> {l s='Edit' mod='blocklayered'}
|
||||
</a>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{$current_url}&deleteFilterTemplate=1&id_layered_filter={(int)$template['id_layered_filter']}"
|
||||
onclick="return confirm('{l s='Do you really want to delete this filter template?' mod='blocklayered'}');">
|
||||
<i class="icon-trash"></i> {l s='Delete' mod='blocklayered'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="row alert alert-warning">{l s='No filter template found.' mod='blocklayered'}</div>
|
||||
{/if}
|
||||
{if empty($limit_warning)}
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-default pull-right" href="{$current_url}&add_new_filters_template=1"><i class="process-icon-plus"></i> {l s='Add new template' mod='blocklayered'}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3><i class="icon-cogs"></i> {l s='Configuration' mod='blocklayered'}</h3>
|
||||
<form action="{$current_url}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Hide filter values when no product is matching' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_hide_0_values" id="ps_layered_hide_0_values_on" value="1"{if $hide_values} checked="checked"{/if}>
|
||||
<label for="ps_layered_hide_0_values_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_hide_0_values" id="ps_layered_hide_0_values_off" value="0"{if !$hide_values} checked="checked"{/if}>
|
||||
<label for="ps_layered_hide_0_values_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Show the number of matching products' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_show_qties" id="ps_layered_show_qties_on" value="1"{if $show_quantities} checked="checked"{/if}>
|
||||
<label for="ps_layered_show_qties_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_show_qties" id="ps_layered_show_qties_off" value="0"{if !$show_quantities} checked="checked"{/if}>
|
||||
<label for="ps_layered_show_qties_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Show products from subcategories' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_full_tree" id="ps_layered_full_tree_on" value="1"{if $full_tree} checked="checked"{/if}>
|
||||
<label for="ps_layered_full_tree_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_full_tree" id="ps_layered_full_tree_off" value="0"{if !$full_tree} checked="checked"{/if}>
|
||||
<label for="ps_layered_full_tree_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Category filter depth (0 for no limits, 1 by default)' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="ps_layered_filter_category_depth" value="{if $category_depth !== false}{$category_depth}{else}1{/if}" class="fixed-width-sm" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Use tax to filter price' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_price_usetax" id="ps_layered_filter_price_usetax_on" value="1"{if $price_use_tax} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_price_usetax_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_price_usetax" id="ps_layered_filter_price_usetax_off" value="0"{if !$price_use_tax} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_price_usetax_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Use rounding to filter price' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_price_rounding" id="ps_layered_filter_price_rounding_on" value="1"{if $price_use_rounding} checked="checked"{/if}/>
|
||||
<label for="ps_layered_filter_price_rounding_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_price_rounding" id="ps_layered_filter_price_rounding_off" value="0"{if !$price_use_rounding} checked="checked"{/if}/>
|
||||
<label for="ps_layered_filter_price_rounding_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Condition filter' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_index_condition" id="ps_layered_filter_index_condition_on" value="1"{if $index_cdt} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_condition_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_condition" id="ps_layered_filter_index_condition_off" value="0"{if !$index_cdt} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_condition_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Availability filter' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_index_availability" id="ps_layered_filter_index_availability_on" value="1"{if $index_qty} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_availability_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_availability" id="ps_layered_filter_index_availability_off" value="0"{if !$index_qty} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_availability_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Manufacturer filter' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_index_manufacturer" id="ps_layered_filter_index_manufacturer_on" value="1"{if $index_mnf} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_manufacturer_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_manufacturer" id="ps_layered_filter_index_manufacturer_off" value="0"{if !$index_mnf} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_manufacturer_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Allow indexing robots (Google, Yahoo!, Bing, etc.) to use the Category filter' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="ps_layered_filter_index_category" id="ps_layered_filter_index_category_on" value="1"{if $index_cat} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_category_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="ps_layered_filter_index_category" id="ps_layered_filter_index_category_off" value="0"{if !$index_cat} checked="checked"{/if}>
|
||||
<label for="ps_layered_filter_index_category_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="submit" class="btn btn-default pull-right" name="submitLayeredSettings"><i class="process-icon-save"></i> {l s='Save' mod='blocklayered'}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
{if isset($PS_LAYERED_INDEXED)}var PS_LAYERED_INDEXED = {$PS_LAYERED_INDEXED};{/if}
|
||||
var token = '{$token}';
|
||||
var id_lang = {$id_lang};
|
||||
var base_folder = '{$base_folder}';
|
||||
var translations = new Array();
|
||||
|
||||
translations['in_progress'] = '{l s='(in progress)' js=1 mod='blocklayered'}';
|
||||
translations['url_indexation_finished'] = '{l s='URL indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['attribute_indexation_finished'] = '{l s='Attribute indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['url_indexation_failed'] = '{l s='URL indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['attribute_indexation_failed'] = '{l s='Attribute indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_finished'] = '{l s='Price indexing finished' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_failed'] = '{l s='Price indexing failed' js=1 mod='blocklayered'}';
|
||||
translations['price_indexation_in_progress'] = '{l s='(in progress, %s products price to index)' js=1 mod='blocklayered'}';
|
||||
translations['loading'] = '{l s='Loading...' js=1 mod='blocklayered'}';
|
||||
translations['delete_all_filters_templates'] = '{l s='You selected -All categories-: all existing filter templates will be deleted. Is it OK?' js=1 mod='blocklayered'}';
|
||||
translations['no_selected_categories'] = '{l s='You must select at least one category' js=1 mod='blocklayered'}';
|
||||
</script>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../../");
|
||||
exit;
|
||||
@@ -1,53 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>
|
||||
{l s='URL' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="url_name_{$language.id_lang}" id="url_name_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" size="64" maxlength="64" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>
|
||||
{l s='Meta title' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="meta_title_{$language.id_lang}" id="meta_title_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" size="70" maxlength="70" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@@ -1,82 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}">{l s='URL' mod='blocklayered'}</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="64" name="url_name_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Meta title' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="70" name="meta_title_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,64 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>
|
||||
{l s='URL' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="url_name_{$language.id_lang}" id="url_name_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" size="64" maxlength="64" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>
|
||||
{l s='Meta title' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="meta_title_{$language.id_lang}" id="meta_title_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" size="70" maxlength="70" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>{l s='Indexable' mod='blocklayered'}</label>
|
||||
<div class="margin-form">
|
||||
<label class="t" for="layered_indexable_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes' mod='blocklayered'}" title="{l s='Yes' mod='blocklayered'}"></label>
|
||||
<input type="radio" name="layered_indexable" id="layered_indexable_on" value="1"{if $is_indexable} checked="checked"{/if} />
|
||||
<label class="t" for="layered_indexable_on"> {l s='Yes' mod='blocklayered'}</label>
|
||||
<label class="t" for="layered_indexable_off"><img src="../img/admin/disabled.gif" alt="{l s='No' mod='blocklayered'}" title="{l s='No' mod='blocklayered'}" style="margin-left: 10px;"></label>
|
||||
<input type="radio" name="layered_indexable" id="layered_indexable_off" value="0"{if !$is_indexable} checked="checked"{/if}>
|
||||
<label class="t" for="layered_indexable_off"> {l s='No' mod='blocklayered'}</label>
|
||||
<p class="preference_description">{l s='Use this attribute in URL generated by the layered navigation module.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@@ -1,101 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}">{l s='URL' mod='blocklayered'}</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="64" name="url_name_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Meta title' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="70" name="meta_title_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this attribute. By default, PrestaShop uses the attribute\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="">{l s='Indexable' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="layered_indexable" id="indexable_on" value="1"{if $is_indexable} checked="checked"{/if}>
|
||||
<label for="indexable_on" class="radioCheck">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="layered_indexable" id="indexable_off" value="0"{if !$is_indexable} checked="checked"{/if}>
|
||||
<label for="indexable_off" class="radioCheck">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-9 col-lg-push-3">
|
||||
<p class="help-block">{l s='Use this attribute in URL generated by the layered navigation module.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,64 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>
|
||||
{l s='URL' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="url_name_{$language.id_lang}" id="url_name_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" size="64" maxlength="64" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this feature. By default, PrestaShop uses the feature\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>
|
||||
{l s='Meta title' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="meta_title_{$language.id_lang}" id="meta_title_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" size="70" maxlength="70" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this feature. By default, PrestaShop uses the feature\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>{l s='Indexable' mod='blocklayered'}</label>
|
||||
<div class="margin-form">
|
||||
<label class="t" for="layered_indexable_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes' mod='blocklayered'}" title="{l s='Yes' mod='blocklayered'}"></label>
|
||||
<input type="radio" name="layered_indexable" id="layered_indexable_on" value="1"{if $is_indexable} checked="checked"{/if} />
|
||||
<label class="t" for="layered_indexable_on"> {l s='Yes' mod='blocklayered'}</label>
|
||||
<label class="t" for="layered_indexable_off"><img src="../img/admin/disabled.gif" alt="{l s='No' mod='blocklayered'}" title="{l s='No' mod='blocklayered'}" style="margin-left: 10px;"></label>
|
||||
<input type="radio" name="layered_indexable" id="layered_indexable_off" value="0"{if !$is_indexable} checked="checked"{/if}>
|
||||
<label class="t" for="layered_indexable_off"> {l s='No' mod='blocklayered'}</label>
|
||||
<p class="preference_description">{l s='Use this attribute in URL generated by the layered navigation module.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@@ -1,101 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}">{l s='URL' mod='blocklayered'}</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="64" name="url_name_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this feature. By default, PrestaShop uses the feature\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Meta title' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="70" name="meta_title_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this feature. By default, PrestaShop uses the feature\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="">{l s='Indexable' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="layered_indexable" id="indexable_on" value="1"{if $is_indexable} checked="checked"{/if}>
|
||||
<label for="indexable_on">
|
||||
<i class="color_success"></i> {l s='Yes' mod='blocklayered'}
|
||||
</label>
|
||||
<input type="radio" name="layered_indexable" id="indexable_off" value="0"{if !$is_indexable} checked="checked"{/if}>
|
||||
<label for="indexable_off">
|
||||
<i class="color_danger"></i> {l s='No' mod='blocklayered'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-9 col-lg-push-3">
|
||||
<p class="help-block">{l s='Use this attribute in URL generated by the layered navigation module.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,53 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>
|
||||
{l s='URL' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="url_name_{$language.id_lang}" id="url_name_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" size="64" maxlength="64" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this feature\'s value. By default, PrestaShop uses the value\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<label>
|
||||
{l s='Meta title' mod='blocklayered'}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<input type="text" name="meta_title_{$language.id_lang}" id="meta_title_{$language.id_lang}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" size="70" maxlength="70" />
|
||||
<p class="preference_description">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this feature\'s value. By default, PrestaShop uses the value\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@@ -1,82 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Invalid characters: <>;=#{}_' mod='blocklayered'}">{l s='URL' mod='blocklayered'}</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="64" name="url_name_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['url_name'])}{$values[$language['id_lang']]['url_name']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed URLs by choosing the word that best represent this feature\'s value. By default, PrestaShop uses the value\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Meta title' mod='blocklayered'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{foreach $languages as $language}
|
||||
<div class="translatable-field lang-{$language['id_lang']}" style="display: {if $language['id_lang'] == $default_form_language}block{else}none{/if};">
|
||||
<div class="col-lg-9">
|
||||
<input type="text" size="70" name="meta_title_{$language['id_lang']}" value="{if isset($values[$language['id_lang']]) && isset($values[$language['id_lang']]['meta_title'])}{$values[$language['id_lang']]['meta_title']|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language['iso_code']}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $languages as $language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language['id_lang']});" tabindex="-1">{$language['name']}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<p class="help-block">{l s='When the Layered Navigation Block module is enabled, you can get more detailed page titles by choosing the word that best represent this feature\'s value. By default, PrestaShop uses the value\'s name, but you can change that setting using this field.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../../");
|
||||
exit;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../");
|
||||
exit;
|
||||
@@ -1,174 +0,0 @@
|
||||
#enabled_filters {
|
||||
margin: 0 0 10px 0;
|
||||
background: #eee;
|
||||
padding: 5px; }
|
||||
|
||||
#enabled_filters .layered_subtitle {
|
||||
font-weight: bold;
|
||||
font-size: 12px; }
|
||||
|
||||
#enabled_filters ul li {
|
||||
padding: 2px 0; }
|
||||
|
||||
#enabled_filters li a {
|
||||
float: right;
|
||||
/*display: inline-block;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
text-indent: -5000px;*/
|
||||
/*background: url(../../../img/icon/delete.gif) no-repeat 0 0 transparent;*/
|
||||
/*background: url(./delete.gif) no-repeat 0 0 transparent;*/
|
||||
cursor: pointer; }
|
||||
|
||||
#layered_block_left .layered_close {
|
||||
float: right;
|
||||
padding-right: 5px; }
|
||||
|
||||
#layered_block_left span.layered_close a,
|
||||
#layered_block_left span.layered_close a {
|
||||
display: block;
|
||||
height: 13px;
|
||||
width: 13px;
|
||||
text-decoration: none;
|
||||
text-indent: -5000px;
|
||||
background: url(img/icon/less.gif) no-repeat 2px 2px; }
|
||||
|
||||
#layered_block_left span.closed a {
|
||||
background: url(img/icon/more.gif) no-repeat 2px 2px; }
|
||||
|
||||
#layered_block_left .layered_subtitle {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 12px; }
|
||||
|
||||
#layered_block_left ul {
|
||||
clear: both;
|
||||
padding: 5px 0; }
|
||||
|
||||
#layered_block_left ul li {
|
||||
padding: 2px 0; }
|
||||
|
||||
#layered_block_left ul li label {
|
||||
cursor: pointer; }
|
||||
|
||||
#layered_block_left ul {
|
||||
padding-left: 0; }
|
||||
|
||||
#layered_block_left ul li {
|
||||
list-style-type: none; }
|
||||
|
||||
#layered_block_left div > form > div > div {
|
||||
margin-top: 5px; }
|
||||
|
||||
#layered_block_left #enabled_filters, #layered_url_filter_block {
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 0px;
|
||||
border-bottom: 1px dotted #CCC; }
|
||||
|
||||
#layered_block_left #enabled_filters ul li {
|
||||
margin-left: 0;
|
||||
padding-left: 0; }
|
||||
|
||||
/* Style moved form the template to the css */
|
||||
#layered_block_left #enabled_filters ul li:hover {
|
||||
background: inherit;
|
||||
color: inherit; }
|
||||
|
||||
#layered_block_left ul li input.checkbox {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px; }
|
||||
|
||||
#layered_block_left ul li .disabled {
|
||||
color: #666; }
|
||||
|
||||
#layered_block_left .color-option {
|
||||
border: 1px solid #666666;
|
||||
height: 16px;
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
width: 16px; }
|
||||
|
||||
#layered_block_left .color-option.disable {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
-moz-opacity: 0.5; }
|
||||
|
||||
#layered_block_left .nomargin a {
|
||||
display: inline; }
|
||||
|
||||
#layered_form .select {
|
||||
width: 165px; }
|
||||
|
||||
#layered_form .color-option {
|
||||
margin-left: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
border: 1px solid #666; }
|
||||
|
||||
#layered_form .color-option.on {
|
||||
border: 1px solid red; }
|
||||
|
||||
#layered_form input[type=radio] {
|
||||
margin-left: 2px;
|
||||
vertical-align: middle; }
|
||||
|
||||
.layered_price_range {
|
||||
margin-left: 7px; }
|
||||
|
||||
.layered_price_range_unit {
|
||||
margin-right: 7px; }
|
||||
|
||||
.layered_slider_container {
|
||||
margin: 6px 0 6px 10px;
|
||||
width: 91%; }
|
||||
|
||||
.layered_slider {
|
||||
margin-top: 5px; }
|
||||
|
||||
.layered_input_range_min {
|
||||
width: 30px; }
|
||||
|
||||
.layered_input_range_max {
|
||||
width: 40px; }
|
||||
|
||||
.layered_list_selected {
|
||||
font-weight: bold; }
|
||||
|
||||
.layered_list {
|
||||
display: block;
|
||||
cursor: pointer; }
|
||||
|
||||
.layered_list:hover {
|
||||
font-weight: bold; }
|
||||
|
||||
.layered_ajax_loader p {
|
||||
margin: 20px 0;
|
||||
text-align: center; }
|
||||
|
||||
.hide-action {
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
display: block;
|
||||
cursor: pointer; }
|
||||
|
||||
.hide-action:hover {
|
||||
font-weight: bold; }
|
||||
|
||||
#layered_form div div ul {
|
||||
max-height: 200px;
|
||||
overflow-x: auto; }
|
||||
|
||||
.layered_filter {
|
||||
border-bottom: 1px solid #eee; }
|
||||
.layered_filter label {
|
||||
font-weight: normal; }
|
||||
.layered_filter layered_subtitle {
|
||||
font-size: 1.2 em; }
|
||||
|
||||
#layered_block_left ul li {
|
||||
min-width: 50%;
|
||||
width: auto; }
|
||||
|
||||
/*# sourceMappingURL=blocklayered.css.map */
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,703 +0,0 @@
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
var ajaxQueries = new Array();
|
||||
var ajaxLoaderOn = 0;
|
||||
var sliderList = new Array();
|
||||
var slidersInit = false;
|
||||
var lockLocationChecking = false;
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
cancelFilter();
|
||||
openCloseFilter();
|
||||
|
||||
// Click on color
|
||||
$(document).on('click', '#layered_form input[type=button], #layered_form label.layered_color', function(e) {
|
||||
if (!$('input[name='+$(this).attr('name')+'][type=hidden]').length)
|
||||
$('<input />').attr('type', 'hidden').attr('name', $(this).attr('name')).val($(this).data('rel')).appendTo('#layered_form');
|
||||
else
|
||||
$('input[name='+$(this).attr('name')+'][type=hidden]').remove();
|
||||
reloadContent(true);
|
||||
});
|
||||
|
||||
$(document).on('click', '#layered_form input[type=checkbox], #layered_form input[type=radio]', function() {
|
||||
reloadContent(true);
|
||||
});
|
||||
|
||||
// Doesn't work with document element
|
||||
$('body').on('change', '#layered_form .select', function() {
|
||||
reloadContent(true);
|
||||
});
|
||||
|
||||
// Changing content of an input text
|
||||
$(document).on('keyup', '#layered_form input.layered_input_range', function(e){
|
||||
if ($(this).attr('timeout_id'))
|
||||
window.clearTimeout($(this).attr('timeout_id'));
|
||||
|
||||
// IE Hack, setTimeout do not acept the third parameter
|
||||
var reference = this;
|
||||
|
||||
$(this).attr('timeout_id', window.setTimeout(function(it){
|
||||
if (!$(it).attr('id'))
|
||||
it = reference;
|
||||
|
||||
var filter = $(it).attr('id').replace(/^layered_(.+)_range_.*$/, '$1');
|
||||
|
||||
var value_min = parseInt($('#layered_'+filter+'_range_min').val());
|
||||
if (isNaN(value_min))
|
||||
value_min = 0;
|
||||
$('#layered_'+filter+'_range_min').val(value_min);
|
||||
|
||||
var value_max = parseInt($('#layered_'+filter+'_range_max').val());
|
||||
if (isNaN(value_max))
|
||||
value_max = 0;
|
||||
$('#layered_'+filter+'_range_max').val(value_max);
|
||||
|
||||
if (value_max < value_min) {
|
||||
$('#layered_'+filter+'_range_max').val($(it).val());
|
||||
$('#layered_'+filter+'_range_min').val($(it).val());
|
||||
}
|
||||
reloadContent();
|
||||
}, 500, this));
|
||||
});
|
||||
|
||||
$(document).on('click', '#layered_block_left .radio', function(e){
|
||||
var name = $(this).attr('name');
|
||||
$.each($(this).parent().parent().find('input[type=button]'), function (it, item) {
|
||||
if ($(item).hasClass('on') && $(item).attr('name') != name)
|
||||
$(item).click();
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
// Click on label
|
||||
$(document).on('click', '#layered_block_left label:not(.layered_color) a', function(e) {
|
||||
e.preventDefault();
|
||||
var disable = $(this).parent().parent().find('input').attr('disabled');
|
||||
if (disable == '' || typeof(disable) == 'undefined' || disable == false)
|
||||
{
|
||||
$(this).parent().parent().find('input').click();
|
||||
}
|
||||
});
|
||||
|
||||
layered_hidden_list = {};
|
||||
$('.hide-action').on('click', function(e){
|
||||
if (typeof(layered_hidden_list[$(this).parent().find('ul').attr('id')]) == 'undefined' || layered_hidden_list[$(this).parent().find('ul').attr('id')] == false)
|
||||
layered_hidden_list[$(this).parent().find('ul').attr('id')] = true;
|
||||
else
|
||||
layered_hidden_list[$(this).parent().find('ul').attr('id')] = false;
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
$('.hide-action').each(function() {
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
|
||||
$(document).off('change', '.selectProductSort').on('change', '.selectProductSort', function(e) {
|
||||
$('.selectProductSort').val($(this).val());
|
||||
|
||||
if($('#layered_form').length > 0)
|
||||
reloadContent('forceSlide');
|
||||
});
|
||||
|
||||
$(document).off('change', 'select[name="n"]').on('change', 'select[name="n"]', function(e)
|
||||
{
|
||||
$('select[name=n]').val($(this).val());
|
||||
reloadContent('forceSlide');
|
||||
});
|
||||
|
||||
paginationButton(false);
|
||||
initLayered();
|
||||
});
|
||||
|
||||
function initFilters()
|
||||
{
|
||||
if (typeof filters !== 'undefined')
|
||||
{
|
||||
for (key in filters)
|
||||
{
|
||||
if (filters.hasOwnProperty(key))
|
||||
var filter = filters[key];
|
||||
|
||||
if (typeof filter.slider !== 'undefined' && parseInt(filter.filter_type) == 0)
|
||||
{
|
||||
var filterRange = parseInt(filter.max)-parseInt(filter.min);
|
||||
var step = filterRange / 100;
|
||||
|
||||
if (step > 1)
|
||||
step = parseInt(step);
|
||||
|
||||
addSlider(filter.type,
|
||||
{
|
||||
range: true,
|
||||
step: step,
|
||||
min: parseInt(filter.min),
|
||||
max: parseInt(filter.max),
|
||||
values: [filter.values[0], filter.values[1]],
|
||||
slide: function(event, ui) {
|
||||
stopAjaxQuery();
|
||||
|
||||
if (parseInt($(event.target).data('format')) < 5)
|
||||
{
|
||||
from = formatCurrency(ui.values[0], parseInt($(event.target).data('format')),
|
||||
$(event.target).data('unit'));
|
||||
to = formatCurrency(ui.values[1], parseInt($(event.target).data('format')),
|
||||
$(event.target).data('unit'));
|
||||
}
|
||||
else
|
||||
{
|
||||
from = ui.values[0] + $(event.target).data('unit');
|
||||
to = ui.values[1] + $(event.target).data('unit');
|
||||
}
|
||||
|
||||
$('#layered_' + $(event.target).data('type') + '_range').html(from + ' - ' + to);
|
||||
},
|
||||
stop: function () {
|
||||
reloadContent(true);
|
||||
}
|
||||
}, filter.unit, parseInt(filter.format));
|
||||
}
|
||||
else if(typeof filter.slider !== 'undefined' && parseInt(filter.filter_type) == 1)
|
||||
{
|
||||
$('#layered_' + filter.type + '_range_min').attr('limitValue', filter.min);
|
||||
$('#layered_' + filter.type + '_range_max').attr('limitValue', filter.max);
|
||||
}
|
||||
|
||||
$('.layered_' + filter.type).show();
|
||||
}
|
||||
initUniform();
|
||||
}
|
||||
}
|
||||
|
||||
function initUniform()
|
||||
{
|
||||
if (!!$.prototype.uniform)
|
||||
$("#layered_form input[type='checkbox'], #layered_form input[type='radio'], select.form-control").uniform();
|
||||
}
|
||||
|
||||
function hideFilterValueAction(it)
|
||||
{
|
||||
if (typeof(layered_hidden_list[$(it).parent().find('ul').attr('id')]) == 'undefined'
|
||||
|| layered_hidden_list[$(it).parent().find('ul').attr('id')] == false)
|
||||
{
|
||||
$(it).parent().find('.hiddable').hide();
|
||||
$(it).parent().find('.hide-action.less').hide();
|
||||
$(it).parent().find('.hide-action.more').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(it).parent().find('.hiddable').show();
|
||||
$(it).parent().find('.hide-action.less').show();
|
||||
$(it).parent().find('.hide-action.more').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function addSlider(type, data, unit, format)
|
||||
{
|
||||
sliderList.push({
|
||||
type: type,
|
||||
data: data,
|
||||
unit: unit,
|
||||
format: format
|
||||
});
|
||||
}
|
||||
|
||||
function initSliders()
|
||||
{
|
||||
$(sliderList).each(function(i, slider){
|
||||
$('#layered_'+slider['type']+'_slider').slider(slider['data']);
|
||||
|
||||
var from = '';
|
||||
var to = '';
|
||||
switch (slider['format'])
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
from = formatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 0), slider['format'], slider['unit']);
|
||||
to = formatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 1), slider['format'], slider['unit']);
|
||||
break;
|
||||
case 5:
|
||||
from = $('#layered_'+slider['type']+'_slider').slider('values', 0)+slider['unit']
|
||||
to = $('#layered_'+slider['type']+'_slider').slider('values', 1)+slider['unit'];
|
||||
break;
|
||||
}
|
||||
$('#layered_'+slider['type']+'_range').html(from+' - '+to);
|
||||
});
|
||||
}
|
||||
|
||||
function initLayered()
|
||||
{
|
||||
initFilters();
|
||||
initSliders();
|
||||
initLocationChange();
|
||||
updateProductUrl();
|
||||
if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
|
||||
{
|
||||
var params = window.location.href.split('#')[1];
|
||||
reloadContent('&selected_filters='+params);
|
||||
}
|
||||
}
|
||||
|
||||
function paginationButton(nbProductsIn, nbProductOut)
|
||||
{
|
||||
if (typeof(current_friendly_url) === 'undefined')
|
||||
current_friendly_url = '#';
|
||||
|
||||
$('div.pagination a').not(':hidden').each(function () {
|
||||
|
||||
if ($(this).attr('href').search(/(\?|&)p=/) == -1)
|
||||
var page = 1;
|
||||
else
|
||||
var page = parseInt($(this).attr('href').replace(/^.*(\?|&)p=(\d+).*$/, '$2'));
|
||||
|
||||
var location = window.location.href.replace(/#.*$/, '');
|
||||
$(this).attr('href', location + current_friendly_url.replace(/\/page-(\d+)/, '') + '/page-' + page);
|
||||
});
|
||||
|
||||
$('div.pagination li').not('.current, .disabled').each(function () {
|
||||
var nbPage = 0;
|
||||
if ($(this).hasClass('pagination_next'))
|
||||
nbPage = parseInt($('div.pagination li.current').children().children().html())+ 1;
|
||||
else if ($(this).hasClass('pagination_previous'))
|
||||
nbPage = parseInt($('div.pagination li.current').children().children().html())- 1;
|
||||
|
||||
$(this).children().children().on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
if (nbPage == 0)
|
||||
p = parseInt($(this).html()) + parseInt(nbPage);
|
||||
else
|
||||
p = nbPage;
|
||||
p = '&p='+ p;
|
||||
reloadContent(p);
|
||||
nbPage = 0;
|
||||
});
|
||||
});
|
||||
|
||||
//product count refresh
|
||||
if(nbProductsIn!=false)
|
||||
{
|
||||
if(isNaN(nbProductsIn) == 0)
|
||||
{
|
||||
// add variables
|
||||
var productCountRow = $('.product-count').html();
|
||||
var nbPage = parseInt($('div.pagination li.current').children().children().html());
|
||||
var nb_products = nbProductsIn;
|
||||
|
||||
if ($('#nb_page_items option:selected').length == 0)
|
||||
var nbPerPage = nb_products;
|
||||
else
|
||||
var nbPerPage = parseInt($('#nb_page_items option:selected').val());
|
||||
|
||||
isNaN(nbPage) ? nbPage = 1 : nbPage = nbPage;
|
||||
nbPerPage*nbPage < nb_products ? productShowing = nbPerPage*nbPage :productShowing = (nbPerPage*nbPage-nb_products-nbPerPage*nbPage)*-1;
|
||||
nbPage==1 ? productShowingStart=1 : productShowingStart=nbPerPage*nbPage-nbPerPage+1;
|
||||
|
||||
|
||||
//insert values into a .product-count
|
||||
productCountRow = $.trim(productCountRow);
|
||||
productCountRow = productCountRow.split(' ');
|
||||
|
||||
var backStart = new Array;
|
||||
for (row in productCountRow)
|
||||
if (parseInt(productCountRow[row]) + 0 == parseInt(productCountRow[row]))
|
||||
backStart.push(row);
|
||||
|
||||
if (typeof backStart[0] !== 'undefined')
|
||||
productCountRow[backStart[0]] = productShowingStart;
|
||||
if (typeof backStart[1] !== 'undefined')
|
||||
productCountRow[backStart[1]] = (nbProductOut != 'undefined') && (nbProductOut > productShowing) ? nbProductOut : productShowing;
|
||||
if (typeof backStart[2] !== 'undefined')
|
||||
productCountRow[backStart[2]] = nb_products;
|
||||
|
||||
if (typeof backStart[1] !== 'undefined' && typeof backStart[2] !== 'undefined' && productCountRow[backStart[1]] > productCountRow[backStart[2]])
|
||||
productCountRow[backStart[1]] = productCountRow[backStart[2]];
|
||||
|
||||
productCountRow = productCountRow.join(' ');
|
||||
$('.product-count').html(productCountRow);
|
||||
$('.product-count').show();
|
||||
}
|
||||
else
|
||||
$('.product-count').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function cancelFilter()
|
||||
{
|
||||
$(document).on('click', '#enabled_filters a', function(e){
|
||||
if ($(this).data('rel').search(/_slider$/) > 0)
|
||||
{
|
||||
if ($('#'+$(this).data('rel')).length)
|
||||
{
|
||||
$('#'+$(this).data('rel')).slider('values' , 0, $('#'+$(this).data('rel')).slider('option' , 'min' ));
|
||||
$('#'+$(this).data('rel')).slider('values' , 1, $('#'+$(this).data('rel')).slider('option' , 'max' ));
|
||||
$('#'+$(this).data('rel')).slider('option', 'slide')(0,{values:[$('#'+$(this).data('rel')).slider( 'option' , 'min' ), $('#'+$(this).data('rel')).slider( 'option' , 'max' )]});
|
||||
}
|
||||
else if($('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).length)
|
||||
{
|
||||
$('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).val($('#'+$(this).data('rel').replace(/_slider$/, '_range_min')).attr('limitValue'));
|
||||
$('#'+$(this).data('rel').replace(/_slider$/, '_range_max')).val($('#'+$(this).data('rel').replace(/_slider$/, '_range_max')).attr('limitValue'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($('option#'+$(this).data('rel')).length)
|
||||
$('#'+$(this).data('rel')).parent().val('');
|
||||
else
|
||||
{
|
||||
$('#'+$(this).data('rel')).attr('checked', false);
|
||||
$('.'+$(this).data('rel')).attr('checked', false);
|
||||
$('#layered_form input[type=hidden][name='+$(this).data('rel')+']').remove();
|
||||
}
|
||||
}
|
||||
reloadContent(true);
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function openCloseFilter()
|
||||
{
|
||||
$(document).on('click', '#layered_form span.layered_close a', function(e)
|
||||
{
|
||||
if ($(this).html() == '<')
|
||||
{
|
||||
$('#'+$(this).data('rel')).show();
|
||||
$(this).html('v');
|
||||
$(this).parent().removeClass('closed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#'+$(this).data('rel')).hide();
|
||||
$(this).html('<');
|
||||
$(this).parent().addClass('closed');
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
function stopAjaxQuery() {
|
||||
if (typeof(ajaxQueries) == 'undefined')
|
||||
ajaxQueries = new Array();
|
||||
for(i = 0; i < ajaxQueries.length; i++)
|
||||
ajaxQueries[i].abort();
|
||||
ajaxQueries = new Array();
|
||||
}
|
||||
|
||||
function reloadContent(params_plus)
|
||||
{
|
||||
stopAjaxQuery();
|
||||
|
||||
if (!ajaxLoaderOn)
|
||||
{
|
||||
$('.product_list').prepend($('#layered_ajax_loader').html());
|
||||
$('.product_list').css('opacity', '0.7');
|
||||
ajaxLoaderOn = 1;
|
||||
}
|
||||
|
||||
data = $('#layered_form').serialize();
|
||||
$('.layered_slider').each( function () {
|
||||
var sliderStart = $(this).slider('values', 0);
|
||||
var sliderStop = $(this).slider('values', 1);
|
||||
if (typeof(sliderStart) == 'number' && typeof(sliderStop) == 'number')
|
||||
data += '&'+$(this).attr('id')+'='+sliderStart+'_'+sliderStop;
|
||||
});
|
||||
|
||||
$(['price', 'weight']).each(function(it, sliderType)
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_range_min').length)
|
||||
data += '&layered_'+sliderType+'_slider='+$('#layered_'+sliderType+'_range_min').val()+'_'+$('#layered_'+sliderType+'_range_max').val();
|
||||
});
|
||||
|
||||
$('#layered_form .select option').each( function () {
|
||||
if($(this).attr('id') && $(this).parent().val() == $(this).val())
|
||||
data += '&'+$(this).attr('id') + '=' + $(this).val();
|
||||
});
|
||||
|
||||
if ($('.selectProductSort').length && $('.selectProductSort').val())
|
||||
{
|
||||
if ($('.selectProductSort').val().search(/orderby=/) > 0)
|
||||
{
|
||||
// Old ordering working
|
||||
var splitData = [
|
||||
$('.selectProductSort').val().match(/orderby=(\w*)/)[1],
|
||||
$('.selectProductSort').val().match(/orderway=(\w*)/)[1]
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
// New working for default theme 1.4 and theme 1.5
|
||||
var splitData = $('.selectProductSort').val().split(':');
|
||||
}
|
||||
data += '&orderby='+splitData[0]+'&orderway='+splitData[1];
|
||||
}
|
||||
if ($('select[name=n]:first').length)
|
||||
{
|
||||
if (params_plus)
|
||||
data += '&n=' + $('select[name=n]:first').val();
|
||||
else
|
||||
data += '&n=' + $('div.pagination form.showall').find('input[name=n]').val();
|
||||
}
|
||||
|
||||
var slideUp = true;
|
||||
if (typeof params_plus === 'undefined' || !(typeof params_plus === 'string'))
|
||||
{
|
||||
params_plus = '';
|
||||
slideUp = false;
|
||||
}
|
||||
|
||||
// Get nb items per page
|
||||
var n = '';
|
||||
if (params_plus)
|
||||
{
|
||||
$('div.pagination select[name=n]').children().each(function(it, option) {
|
||||
if (option.selected)
|
||||
n = '&n=' + option.value;
|
||||
});
|
||||
}
|
||||
ajaxQuery = $.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: baseDir + 'modules/blocklayered/blocklayered-ajax.php',
|
||||
data: data + '&' + params_plus + n,
|
||||
dataType: 'json',
|
||||
cache: false, // @todo see a way to use cache and to add a timestamps parameter to refresh cache each 10 minutes for example
|
||||
success: function(result)
|
||||
{
|
||||
if (typeof(result) === 'undefined')
|
||||
return;
|
||||
|
||||
if (result.meta_description != '')
|
||||
$('meta[name="description"]').attr('content', result.meta_description);
|
||||
|
||||
if (result.meta_keywords != '')
|
||||
$('meta[name="keywords"]').attr('content', result.meta_keywords);
|
||||
|
||||
if (result.meta_title != '')
|
||||
$('title').html(result.meta_title);
|
||||
|
||||
if (result.heading != '')
|
||||
$('h1.page-heading .cat-name').html(result.heading);
|
||||
|
||||
$('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock));
|
||||
$('.category-product-count, .heading-counter').html(result.categoryCount);
|
||||
|
||||
if (result.nbRenderedProducts == result.nbAskedProducts)
|
||||
$('div.clearfix.selector1').hide();
|
||||
|
||||
if (result.productList)
|
||||
$('.product_list').replaceWith(utf8_decode(result.productList));
|
||||
else
|
||||
$('.product_list').html('');
|
||||
|
||||
$('.product_list').css('opacity', '1');
|
||||
if ($.browser.msie) // Fix bug with IE8 and aliasing
|
||||
$('.product_list').css('filter', '');
|
||||
|
||||
if (result.pagination.search(/[^\s]/) >= 0)
|
||||
{
|
||||
var pagination = $('<div/>').html(result.pagination)
|
||||
var pagination_bottom = $('<div/>').html(result.pagination_bottom);
|
||||
|
||||
if ($('<div/>').html(pagination).find('#pagination').length)
|
||||
{
|
||||
$('#pagination').show();
|
||||
$('#pagination').replaceWith(pagination.find('#pagination'));
|
||||
}
|
||||
else
|
||||
$('#pagination').hide();
|
||||
|
||||
if ($('<div/>').html(pagination_bottom).find('#pagination_bottom').length)
|
||||
{
|
||||
$('#pagination_bottom').show();
|
||||
$('#pagination_bottom').replaceWith(pagination_bottom.find('#pagination_bottom'));
|
||||
}
|
||||
else
|
||||
$('#pagination_bottom').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#pagination').hide();
|
||||
$('#pagination_bottom').hide();
|
||||
}
|
||||
|
||||
paginationButton(result.nbRenderedProducts, result.nbAskedProducts);
|
||||
ajaxLoaderOn = 0;
|
||||
|
||||
// On submiting nb items form, relaod with the good nb of items
|
||||
$('div.pagination form').on('submit', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
val = $('div.pagination select[name=n]').val();
|
||||
|
||||
$('div.pagination select[name=n]').children().each(function(it, option) {
|
||||
if (option.value == val)
|
||||
$(option).attr('selected', true);
|
||||
else
|
||||
$(option).removeAttr('selected');
|
||||
});
|
||||
|
||||
// Reload products and pagination
|
||||
reloadContent();
|
||||
});
|
||||
if (typeof(ajaxCart) != "undefined")
|
||||
ajaxCart.overrideButtonsInThePage();
|
||||
|
||||
if (typeof(reloadProductComparison) == 'function')
|
||||
reloadProductComparison();
|
||||
|
||||
filters = result.filters;
|
||||
initFilters();
|
||||
initSliders();
|
||||
|
||||
current_friendly_url = result.current_friendly_url;
|
||||
|
||||
// Currente page url
|
||||
if (typeof(current_friendly_url) === 'undefined')
|
||||
current_friendly_url = '#';
|
||||
|
||||
// Get all sliders value
|
||||
$(['price', 'weight']).each(function(it, sliderType)
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_slider').length)
|
||||
{
|
||||
// Check if slider is enable & if slider is used
|
||||
if (typeof($('#layered_'+sliderType+'_slider').slider('values', 0)) != 'object')
|
||||
{
|
||||
if ($('#layered_'+sliderType+'_slider').slider('values', 0) != $('#layered_'+sliderType+'_slider').slider('option' , 'min')
|
||||
|| $('#layered_'+sliderType+'_slider').slider('values', 1) != $('#layered_'+sliderType+'_slider').slider('option' , 'max'))
|
||||
current_friendly_url += '/'+blocklayeredSliderName[sliderType]+'-'+$('#layered_'+sliderType+'_slider').slider('values', 0)+'-'+$('#layered_'+sliderType+'_slider').slider('values', 1)
|
||||
}
|
||||
}
|
||||
else if ($('#layered_'+sliderType+'_range_min').length)
|
||||
current_friendly_url += '/'+blocklayeredSliderName[sliderType]+'-'+$('#layered_'+sliderType+'_range_min').val()+'-'+$('#layered_'+sliderType+'_range_max').val();
|
||||
});
|
||||
|
||||
window.location.href = current_friendly_url;
|
||||
|
||||
if (current_friendly_url != '#/show-all')
|
||||
$('div.clearfix.selector1').show();
|
||||
|
||||
lockLocationChecking = true;
|
||||
|
||||
if (slideUp)
|
||||
$.scrollTo('.product_list', 400);
|
||||
updateProductUrl();
|
||||
|
||||
$('.hide-action').each(function() {
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
|
||||
if (display instanceof Function) {
|
||||
var view = $.totalStorage('display');
|
||||
|
||||
if (view && view != 'grid')
|
||||
display(view);
|
||||
}
|
||||
}
|
||||
});
|
||||
ajaxQueries.push(ajaxQuery);
|
||||
}
|
||||
|
||||
function initLocationChange(func, time)
|
||||
{
|
||||
if (!time)
|
||||
time = 500;
|
||||
var current_friendly_url = getUrlParams();
|
||||
setInterval(function()
|
||||
{
|
||||
if(getUrlParams() != current_friendly_url && !lockLocationChecking)
|
||||
{
|
||||
// Don't reload page if current_friendly_url and real url match
|
||||
if (current_friendly_url.replace(/^#(\/)?/, '') == getUrlParams().replace(/^#(\/)?/, ''))
|
||||
return;
|
||||
|
||||
lockLocationChecking = true;
|
||||
reloadContent('&selected_filters='+getUrlParams().replace(/^#/, ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
lockLocationChecking = false;
|
||||
current_friendly_url = getUrlParams();
|
||||
}
|
||||
}, time);
|
||||
}
|
||||
|
||||
function getUrlParams()
|
||||
{
|
||||
if (typeof(current_friendly_url) === 'undefined')
|
||||
current_friendly_url = '#';
|
||||
|
||||
var params = current_friendly_url;
|
||||
if(window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
|
||||
params = '#'+window.location.href.split('#')[1];
|
||||
return params;
|
||||
}
|
||||
|
||||
function updateProductUrl()
|
||||
{
|
||||
// Adding the filters to URL product
|
||||
if (typeof(param_product_url) != 'undefined' && param_product_url != '' && param_product_url !='#') {
|
||||
$.each($('ul.product_list li.ajax_block_product .product_img_link,'+
|
||||
'ul.product_list li.ajax_block_product h5 a,'+
|
||||
'ul.product_list li.ajax_block_product .product_desc a,'+
|
||||
'ul.product_list li.ajax_block_product .lnk_view'), function() {
|
||||
$(this).attr('href', $(this).attr('href') + param_product_url);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy of the php function utf8_decode()
|
||||
*/
|
||||
function utf8_decode (utfstr)
|
||||
{
|
||||
var res = '';
|
||||
for (var i = 0; i < utfstr.length;) {
|
||||
var c = utfstr.charCodeAt(i);
|
||||
|
||||
if (c < 128)
|
||||
{
|
||||
res += String.fromCharCode(c);
|
||||
i++;
|
||||
}
|
||||
else if((c > 191) && (c < 224))
|
||||
{
|
||||
var c1 = utfstr.charCodeAt(i+1);
|
||||
res += String.fromCharCode(((c & 31) << 6) | (c1 & 63));
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
var c1 = utfstr.charCodeAt(i+1);
|
||||
var c2 = utfstr.charCodeAt(i+2);
|
||||
res += String.fromCharCode(((c & 15) << 12) | ((c1 & 63) << 6) | (c2 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,27 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="product_list">
|
||||
<p class="alert alert-warning">{l s='There are no products.' mod='blocklayered'}</p>
|
||||
</div>
|
||||
@@ -1,238 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $nbr_filterBlocks != 0}
|
||||
<div id="layered_block_left" class="block">
|
||||
<p class="title_block">{l s='Catalog' mod='blocklayered'}</p>
|
||||
<div class="block_content">
|
||||
<form action="#" id="layered_form">
|
||||
<div>
|
||||
{if isset($selected_filters) && $n_filters > 0}
|
||||
<div id="enabled_filters">
|
||||
<span class="layered_subtitle" style="float: none;">
|
||||
{l s='Enabled filters:' mod='blocklayered'}
|
||||
</span>
|
||||
<ul>
|
||||
{foreach from=$selected_filters key=filter_type item=filter_values}
|
||||
{foreach from=$filter_values key=filter_key item=filter_value name=f_values}
|
||||
{foreach from=$filters item=filter}
|
||||
{if $filter.type == $filter_type && isset($filter.values)}
|
||||
{if isset($filter.slider)}
|
||||
{if $smarty.foreach.f_values.first}
|
||||
<li>
|
||||
<a href="#" data-rel="layered_{$filter.type}_slider" title="{l s='Cancel' mod='blocklayered'}"></a>
|
||||
{if $filter.format == 1}
|
||||
{l s='%1$s: %2$s - %3$s'|sprintf:$filter.name:{displayPrice price=$filter.values[0]}:{displayPrice price=$filter.values[1]}|escape:'html':'UTF-8' mod='blocklayered'}
|
||||
{else}
|
||||
{l s='%1$s: %2$s %4$s - %3$s %4$s'|sprintf:$filter.name:$filter.values[0]:$filter.values[1]:$filter.unit|escape:'html':'UTF-8' mod='blocklayered'}
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
{else}
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if $id_value == $filter_key && !is_numeric($filter_value) && ($filter.type eq 'id_attribute_group' || $filter.type eq 'id_feature') || $id_value == $filter_value && $filter.type neq 'id_attribute_group' && $filter.type neq 'id_feature'}
|
||||
<li>
|
||||
<a href="#" data-rel="layered_{$filter.type_lite}_{$id_value}" title="{l s='Cancel' mod='blocklayered'}"><i class="icon-remove"></i></a>
|
||||
{l s='%1$s: %2$s' mod='blocklayered' sprintf=[$filter.name, $value.name]}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach from=$filters item=filter}
|
||||
{if isset($filter.values)}
|
||||
{if isset($filter.slider)}
|
||||
<div class="layered_{$filter.type}" style="display: none;">
|
||||
{else}
|
||||
<div class="layered_filter">
|
||||
{/if}
|
||||
<div class="layered_subtitle_heading">
|
||||
<span class="layered_subtitle">{$filter.name|escape:'html':'UTF-8'}</span>
|
||||
<!--<span class="layered_close">
|
||||
<a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}"></a>
|
||||
</span>-->
|
||||
</div>
|
||||
<ul id="ul_layered_{$filter.type}_{$filter.id_key}" class="col-lg-12 layered_filter_ul{if isset($filter.is_color_group) && $filter.is_color_group} color-group{/if}">
|
||||
{if !isset($filter.slider)}
|
||||
{if $filter.filter_type == 0}
|
||||
{foreach from=$filter.values key=id_value item=value name=fe}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if} col-lg-12">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" data-rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" />
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" data-rel="{$id_value}_{$filter.id_key}"{/if}{/if}>
|
||||
{if !$value.nbr}
|
||||
{$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}
|
||||
{else}
|
||||
<a href="{$value.link}"{if $value.rel|trim != ''} data-rel="{$value.rel}"{/if}>{$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
{/if}
|
||||
</label>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{if $filter.filter_type == 1}
|
||||
{foreach from=$filter.values key=id_value item=value name=fe}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" data-rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};"/>
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="radio" class="radio layered_{$filter.type_lite}_{$id_value}" name="layered_{$filter.type_lite}{if $filter.id_key}_{$filter.id_key}{else}_1{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" data-rel="{$id_value}_{$filter.id_key}"{/if}{/if}>
|
||||
{if !$value.nbr}
|
||||
{$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}
|
||||
{else}
|
||||
<a href="{$value.link}"{if $value.rel|trim != ''} data-rel="{$value.rel}"{/if}>{$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}</a>
|
||||
{/if}
|
||||
</label>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<select class="select form-control" {if $filter.filter_show_limit > 1}multiple="multiple" size="{$filter.filter_show_limit}"{/if}>
|
||||
<option value="">{l s='No filters' mod='blocklayered'}</option>
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<option style="color: {if isset($value.color)}{$value.color}{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}_{$filter.id_key}" {if isset($value.checked) && $value.checked}selected="selected"{/if} {if !$value.nbr}disabled="disabled"{/if}>
|
||||
{$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if}
|
||||
</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
{if $filter.filter_type == 0}
|
||||
<label for="{$filter.type}">
|
||||
{l s='Range:' mod='blocklayered'}
|
||||
</label>
|
||||
<span id="layered_{$filter.type}_range"></span>
|
||||
<div class="layered_slider_container">
|
||||
<div class="layered_slider" id="layered_{$filter.type}_slider" data-type="{$filter.type}" data-format="{$filter.format}" data-unit="{$filter.unit}"></div>
|
||||
</div>
|
||||
{else}
|
||||
{if $filter.filter_type == 1}
|
||||
<li class="nomargin row">
|
||||
<div class="col-xs-6 col-sm-12 col-lg-6 first-item">
|
||||
{l s='From' mod='blocklayered'}
|
||||
<input class="layered_{$filter.type}_range layered_input_range_min layered_input_range form-control grey" id="layered_{$filter.type}_range_min" type="text" value="{$filter.values[0]}"/>
|
||||
<span class="layered_{$filter.type}_range_unit">
|
||||
{$filter.unit}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-12 col-lg-6">
|
||||
{l s='to' mod='blocklayered'}
|
||||
<input class="layered_{$filter.type}_range layered_input_range_max layered_input_range form-control grey" id="layered_{$filter.type}_range_max" type="text" value="{$filter.values[1]}"/>
|
||||
<span class="layered_{$filter.type}_range_unit">
|
||||
{$filter.unit}
|
||||
</span>
|
||||
</div>
|
||||
<span class="layered_{$filter.type}_format" style="display:none;">
|
||||
{$filter.format}
|
||||
</span>
|
||||
</li>
|
||||
{else}
|
||||
{foreach from=$filter.list_of_values item=values}
|
||||
<li class="nomargin {if $filter.values[1] == $values[1] && $filter.values[0] == $values[0]}layered_list_selected{/if} layered_list" onclick="$('#layered_{$filter.type}_range_min').val({$values[0]});$('#layered_{$filter.type}_range_max').val({$values[1]});reloadContent();">
|
||||
- {l s='From' mod='blocklayered'} {$values[0]} {$filter.unit} {l s='to' mod='blocklayered'} {$values[1]} {$filter.unit}
|
||||
</li>
|
||||
{/foreach}
|
||||
<li style="display: none;">
|
||||
<input class="layered_{$filter.type}_range" id="layered_{$filter.type}_range_min" type="hidden" value="{$filter.values[0]}"/>
|
||||
<input class="layered_{$filter.type}_range" id="layered_{$filter.type}_range_max" type="hidden" value="{$filter.values[1]}"/>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if count($filter.values) > $filter.filter_show_limit && $filter.filter_show_limit > 0 && $filter.filter_type != 2}
|
||||
<span class="hide-action more">{l s='Show more' mod='blocklayered'}</span>
|
||||
<span class="hide-action less">{l s='Show less' mod='blocklayered'}</span>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
<input type="hidden" name="id_category_layered" value="{$id_category_layered}" />
|
||||
{foreach from=$filters item=filter}
|
||||
{if $filter.type_lite == 'id_attribute_group' && isset($filter.is_color_group) && $filter.is_color_group && $filter.filter_type != 2}
|
||||
{foreach from=$filter.values key=id_value item=value}
|
||||
{if isset($value.checked)}
|
||||
<input type="hidden" name="layered_id_attribute_group_{$id_value}" value="{$id_value}_{$filter.id_key}" />
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</form>
|
||||
</div>
|
||||
<div id="layered_ajax_loader" style="display: none;">
|
||||
<p>
|
||||
<img src="{$img_ps_dir}loader.gif" alt="" />
|
||||
<br />{l s='Loading...' mod='blocklayered'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div id="layered_block_left" class="block">
|
||||
<div class="block_content">
|
||||
<form action="#" id="layered_form">
|
||||
<input type="hidden" name="id_category_layered" value="{$id_category_layered}" />
|
||||
</form>
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<p>
|
||||
<img src="{$img_ps_dir}loader.gif" alt="" />
|
||||
<br />{l s='Loading...' mod='blocklayered'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $nbr_filterBlocks != 0}
|
||||
{strip}
|
||||
{if version_compare($smarty.const._PS_VERSION_,'1.5','>')}
|
||||
{addJsDef param_product_url='#'|cat:$param_product_url}
|
||||
{else}
|
||||
{addJsDef param_product_url=''}
|
||||
{/if}
|
||||
{addJsDef blocklayeredSliderName=$blocklayeredSliderName}
|
||||
|
||||
{if isset($filters) && $filters|@count}
|
||||
{addJsDef filters=$filters}
|
||||
{/if}
|
||||
{/strip}
|
||||
{/if}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||