// fixing bad code indentation for module block layered
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9488 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -319,8 +319,8 @@ class BlockLayered extends Module
|
|||||||
FROM '._DB_PREFIX_.'category c
|
FROM '._DB_PREFIX_.'category c
|
||||||
INNER JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category)
|
INNER JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category)
|
||||||
WHERE cl.id_lang = '.(int)$filter['id_lang']);
|
WHERE cl.id_lang = '.(int)$filter['id_lang']);
|
||||||
foreach($categories as $category)
|
foreach($categories as $category)
|
||||||
{
|
{
|
||||||
if (!isset($attributeValuesByLang[$category['id_lang']]))
|
if (!isset($attributeValuesByLang[$category['id_lang']]))
|
||||||
$attributeValuesByLang[$category['id_lang']] = array();
|
$attributeValuesByLang[$category['id_lang']] = array();
|
||||||
if (!isset($attributeValuesByLang[$category['id_lang']]['category']))
|
if (!isset($attributeValuesByLang[$category['id_lang']]['category']))
|
||||||
@@ -328,7 +328,7 @@ class BlockLayered extends Module
|
|||||||
$attributeValuesByLang[$category['id_lang']]['category'][] = array('name' => $this->l('Categories'),
|
$attributeValuesByLang[$category['id_lang']]['category'][] = array('name' => $this->l('Categories'),
|
||||||
'id_name' => null, 'value' => $category['name'], 'id_value' => $category['id_category'],
|
'id_name' => null, 'value' => $category['name'], 'id_value' => $category['id_category'],
|
||||||
'category_name' => $filter['link_rewrite'], 'type' => $filter['type']);
|
'category_name' => $filter['link_rewrite'], 'type' => $filter['type']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'manufacturer':
|
case 'manufacturer':
|
||||||
@@ -371,14 +371,14 @@ class BlockLayered extends Module
|
|||||||
'id_name' => null, 'value' => $condition, 'id_value' => $key,
|
'id_name' => null, 'value' => $condition, 'id_value' => $key,
|
||||||
'category_name' => $filter['link_rewrite'], 'type' => $filter['type']);
|
'category_name' => $filter['link_rewrite'], 'type' => $filter['type']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foreach langs
|
// Foreach langs
|
||||||
foreach ($attributeValuesByLang as $id_lang => $attributeValues)
|
foreach ($attributeValuesByLang as $id_lang => $attributeValues)
|
||||||
{
|
{
|
||||||
// Foreach attributes generate a couple "/<attribute_name>_<atttribute_value>". For example: color_blue
|
// Foreach attributes generate a couple "/<attribute_name>_<atttribute_value>". For example: color_blue
|
||||||
foreach ($attributeValues as $attribute)
|
foreach ($attributeValues as $attribute)
|
||||||
foreach($attribute as $param)
|
foreach($attribute as $param)
|
||||||
{
|
{
|
||||||
$selectedFilters = array();
|
$selectedFilters = array();
|
||||||
$link = '/'.str_replace('-', '_', Tools::link_rewrite($param['name'])).'-'.str_replace('-', '_', Tools::link_rewrite($param['value']));
|
$link = '/'.str_replace('-', '_', Tools::link_rewrite($param['name'])).'-'.str_replace('-', '_', Tools::link_rewrite($param['value']));
|
||||||
@@ -395,7 +395,7 @@ class BlockLayered extends Module
|
|||||||
$idLayeredFriendlyUrl = Db::getInstance()->Insert_ID();
|
$idLayeredFriendlyUrl = Db::getInstance()->Insert_ID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ajax)
|
if ($ajax)
|
||||||
return '{"result": 1}';
|
return '{"result": 1}';
|
||||||
else
|
else
|
||||||
@@ -1773,7 +1773,7 @@ class BlockLayered extends Module
|
|||||||
if(!isset($selectedFilters[$keyParams][$keyParam]))
|
if(!isset($selectedFilters[$keyParams][$keyParam]))
|
||||||
$selectedFilters[$keyParams][$keyParam] = array();
|
$selectedFilters[$keyParams][$keyParam] = array();
|
||||||
$selectedFilters[$keyParams][$keyParam] = $param;
|
$selectedFilters[$keyParams][$keyParam] = $param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user