// Blocklayered
This commit is contained in:
@@ -75,21 +75,15 @@
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#layered_block_left span.layered_close a { text-decoration: none; }
|
||||
|
||||
#layered_block_left span.layered_close {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-bottom: 4px;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
#layered_block_left span.layered_close a {
|
||||
display:block;
|
||||
height:12px;
|
||||
width:12px;
|
||||
text-decoration: none;
|
||||
background:url(img/icon/delete.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
|
||||
#layered_block_left ul li input.checkbox {
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -2082,14 +2082,14 @@ class BlockLayered extends Module
|
||||
AND psi.`id_currency` = '.$idCurrency;
|
||||
}
|
||||
|
||||
$allProductsOut = Db::getInstance(_PS_USE_SQL_SLAVE_)->query('
|
||||
$allProductsOut = self::query('
|
||||
SELECT p.`id_product` id_product
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.$priceFilterQueryOut.'
|
||||
'.$queryFiltersFrom.'
|
||||
WHERE 1 '.$queryFiltersWhere.' GROUP BY id_product');
|
||||
|
||||
$allProductsIn = Db::getInstance(_PS_USE_SQL_SLAVE_)->query('
|
||||
$allProductsIn = self::query('
|
||||
SELECT p.`id_product` id_product
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.$priceFilterQueryIn.'
|
||||
@@ -2138,6 +2138,14 @@ class BlockLayered extends Module
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
private static function query($sql_query)
|
||||
{
|
||||
if (version_compare(_PS_VERSION_,'1.5','>'))
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql_query);
|
||||
else
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_query, false);
|
||||
}
|
||||
|
||||
public function getFilterBlock($selectedFilters = array())
|
||||
{
|
||||
global $cookie;
|
||||
@@ -3304,7 +3312,7 @@ class BlockLayered extends Module
|
||||
$nCategories = array();
|
||||
$doneCategories = array();
|
||||
|
||||
$attributeGroups = Db::getInstance(_PS_USE_SQL_SLAVE_)->query('
|
||||
$attributeGroups = self::query('
|
||||
SELECT a.id_attribute, a.id_attribute_group
|
||||
FROM '._DB_PREFIX_.'attribute a
|
||||
LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.id_attribute = a.id_attribute)
|
||||
@@ -3319,7 +3327,7 @@ class BlockLayered extends Module
|
||||
while ($row = $db->nextRow($attributeGroups))
|
||||
$attributeGroupsById[(int)$row['id_attribute']] = (int)$row['id_attribute_group'];
|
||||
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->query('
|
||||
$features = self::query('
|
||||
SELECT fv.id_feature_value, fv.id_feature
|
||||
FROM '._DB_PREFIX_.'feature_value fv
|
||||
LEFT JOIN '._DB_PREFIX_.'feature_product fp ON (fp.id_feature_value = fv.id_feature_value)
|
||||
|
||||
Reference in New Issue
Block a user