// Blocklayered: Slider could be change with two inputs or a list of values

This commit is contained in:
mDeflotte
2011-12-01 09:16:10 +00:00
parent d019c03bb9
commit 59cbc01d4e
5 changed files with 132 additions and 58 deletions
+14
View File
@@ -2361,6 +2361,20 @@ class BlockLayered extends Module
if ($priceArray['max'] != $priceArray['min'] && $priceArray['min'] != null)
{
if ($filter['filter_type'] == 2)
{
$priceArray['list_of_values'] = array();
$nbr_of_value = $filter['filter_show_limit'];
if ($nbr_of_value < 2)
$nbr_of_value = 4;
$delta = ($priceArray['max'] - $priceArray['min']) / $nbr_of_value;
$current_step = $priceArray['min'];
for ($i = 0; $i < $nbr_of_value; $i++)
$priceArray['list_of_values'][] = array(
(int)($priceArray['min'] + $i * $delta),
(int)($priceArray['min'] + ($i + 1) * $delta)
);
}
if (isset($selectedFilters['price']) && isset($selectedFilters['price'][0])
&& isset($selectedFilters['price'][1]))
{