<?php if (isset($_GET['do']) && $_GET['do'] === 'filter') { $response = filter_get(); echo json_encode($response); exit; }
$item['value'] = $getData[(string) $option['optionID']]['param']; $item['controlIsTextField'] = $set_arbitrarily; $item['name'] = $option['name']; if ($set_arbitrarily == 0) { $item['variants'] = array(); $variants = schGetVariantsForSearch($categoryID, $option['optionID']); foreach ($variants as $variant) { $item['variants'][] = array('variantID' => $variant['variantID'], 'value' => $variant['option_value']); } } $params[] = $item; } } $filter['category'] = $category; $filter['options'] = $params; $filter['set'] = filter_get($categoryID); $smarty->assign('filter', $filter); } // search parametrs to advanced search if ($extraParametrsTemplate != null) { $callBackParam["extraParametrsTemplate"] = $extraParametrsTemplate; } if ($searchParamName != null) { $callBackParam["name"] = $searchParamName; } if ($rangePrice != null) { $callBackParam["price"] = $rangePrice; } if ($category["show_subcategories_products"]) { $callBackParam["searchInSubcategories"] = true; }