----------------------------------------------------------------------------------------- Third Party contributions: Loginbox V1.0 Aubrey Kilian <*****@*****.**> Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ $box = new vamTemplate(); $box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); $box_content = ''; require_once DIR_FS_INC . 'vam_get_subcategories.inc.php'; require_once DIR_WS_FUNCTIONS . 'products_specifications.php'; require_once DIR_WS_CLASSES . 'specifications.php'; // костыль для определения минимальной и максимальной цены для фильтра require_once DIR_FS_INC . 'get_price_range.inc.php'; if (isset($current_category_id)) { $minmax_price = get_price_range($current_category_id); } $spec_object = new Specifications(); if (SPECIFICATIONS_FILTERS_BOX == 'True') { $box_text = ''; //HTML string goes into the text part of the box $get_category = ''; if (isset($_GET['cat']) && isset($current_category_id) or FILTERS_MAIN_PAGE == 'False') { $get_category = "and s2c.categories_id = '" . $current_category_id . "'"; } if (!isset($_GET['f1'])) { $except_section = " AND s.specifications_id <> 52"; } $specs_query_raw = "select s.specifications_id,\n s.products_column_name,\n s.filter_class,\n s.filter_show_all,\n s.filter_display,\n sd.specification_name,\n sd.specification_prefix,\n sd.specification_suffix\n from " . TABLE_SPECIFICATION . " s,\n " . TABLE_SPECIFICATION_DESCRIPTION . " sd,\n " . TABLE_SPECIFICATION_GROUPS . " sg,\n " . TABLE_SPECIFICATIONS_TO_CATEGORIES . " s2c\n where s.specification_group_id = sg.specification_group_id\n and sg.specification_group_id = s2c.specification_group_id\n and sd.specifications_id = s.specifications_id\n " . $get_category . "\n and s.show_filter = 'True'\n and sg.show_filter = 'True'\n and sd.language_id = '" . $_SESSION['languages_id'] . "'\n " . $except_section . "\n order by s.specification_sort_order,\n sd.specification_name\n "; // print $specs_query_raw . "<br>\n"; $specs_query = vamDBquery($specs_query_raw);
" /> <div class="dropdown_search cat_filters" style="width:100%"> <p style="float: left; line-height:70px; margin-left: 10px; margin-right: 10px;"> <?php echo $cat_name; ?> </p> <div class="category_filters_containers"> <?php $filters = explode(",", $category_detail['filters']); foreach ($filters as $filter) { if (!$filter) { continue; } if ($filter == 'product_price') { $price_range = get_price_range($cat_id); if ($price_range['min_price'] == $price_range['max_price']) { $price_range['min_price'] = 0; } if (isset($query_params['min_price']) && $query_params['min_price']) { $min_value = intval($query_params['min_price']); } else { $min_value = intval($price_range['min_price']); } if (isset($query_params['max_price']) && $query_params['max_price']) { $max_value = intval($query_params['max_price']); } else { $max_value = intval($price_range['max_price']); } ?> <script type="text/javascript">
// Order By $_REQUEST['order'] = !empty($_REQUEST['order']) ? $_REQUEST['order'] : $idx->getSearchOrder(); $search_order = $_REQUEST['order']; $idx->setSearchOrder($search_order); // Sort Direction $_REQUEST['sort'] = !empty($_REQUEST['sort']) ? $_REQUEST['sort'] : $idx->getSearchSort(); $search_sort = $_REQUEST['sort']; $idx->setSearchSort($search_sort); // Sort Order if (!empty($_REQUEST['sort']) && !empty($_REQUEST['order'])) { $_REQUEST['sortorder'] = $_REQUEST['sort'] . '-' . $_REQUEST['order']; } // Snippet Price Range if (!empty($_REQUEST['snippet']) && strpos(Http_Uri::getUri(), '/blog/') !== 0) { // Get Price Ranges $price_range = get_price_range($_REQUEST['price_range']); $_REQUEST['snip_minimum_price'] = $_REQUEST['minimum_price']; $_REQUEST['snip_maximum_price'] = $_REQUEST['maximum_price']; if (!empty($price_range['minimum_price']) || !empty($price_range['maximum_price'])) { $_REQUEST['minimum_price'] = $price_range['minimum_price']; $_REQUEST['maximum_price'] = $price_range['maximum_price']; } // Snippet title $snippet_title = snippet_title($_REQUEST['snippet_title']); if (!empty($snippet_title)) { // Print Heading echo '<h2>' . $snippet_title . '</h2>'; $page_title = $snippet_title; } } // Build Query