function content_55ccf2ea85b705_19170918($_smarty_tpl) { if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); ?> <li class="ty-product-filters__group"> <?php if (!$_smarty_tpl->tpl_vars['range']->value['checked']) { ?> <?php $_smarty_tpl->tpl_vars["filter_query_elm"] = new Smarty_variable(fn_add_range_to_url_hash($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["filter_query_elm"] = new Smarty_variable(fn_delete_range_from_url($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); ?> <?php } ?> <?php if ($_REQUEST['features_hash']) { ?> <?php $_smarty_tpl->tpl_vars["cur_features_hash"] = new Smarty_variable("&features_hash=" . (string) $_REQUEST['features_hash'], null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" && (!$_smarty_tpl->tpl_vars['filter']->value['simple_link'] || $_smarty_tpl->tpl_vars['filter']->value['selected_ranges'] && $_smarty_tpl->tpl_vars['controller']->value == "product_features")) { ?> <?php $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url("product_features.view?variant_id=" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'] . (string) $_smarty_tpl->tpl_vars['cur_features_hash']->value), null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['filter_qstring']->value, "features_hash=" . (string) $_smarty_tpl->tpl_vars['filter_query_elm']->value)), null, 0); ?> <?php } ?> <?php $_smarty_tpl->tpl_vars["use_ajax"] = new Smarty_variable(fn_compare_dispatch($_smarty_tpl->tpl_vars['href']->value, $_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <a <?php if (!$_smarty_tpl->tpl_vars['range']->value['disabled'] || $_smarty_tpl->tpl_vars['range']->value['checked']) { ?> href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['href']->value, ENT_QUOTES, 'UTF-8'); ?> "<?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] != "E") { ?> rel="nofollow"<?php } ?> class="ty-product-filters__item<?php if ($_smarty_tpl->tpl_vars['range']->value['checked']) { ?> checked<?php } if ($_smarty_tpl->tpl_vars['range']->value['disabled']) { ?> disabled<?php } elseif ($_smarty_tpl->tpl_vars['allow_ajax']->value && $_smarty_tpl->tpl_vars['use_ajax']->value) { ?> cm-history<?php } ?> " data-ca-scroll=".cm-pagination-container" data-ca-target-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_div_ids']->value, ENT_QUOTES, 'UTF-8'); ?> "><span class="ty-filter-icon"><i class="ty-icon-ok ty-filter-icon__check"></i><i class="ty-icon-cancel ty-filter-icon__delete"></i></span><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['range']->value['range_name']), ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> <?php if (!$_smarty_tpl->tpl_vars['range']->value['disabled']) { ?> <span class="ty-product-filters__count"> (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['products'], ENT_QUOTES, 'UTF-8'); ?> )</span><?php } ?> </a> </li> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="blocks/product_filters/components/variant_item.tpl" id="<?php echo smarty_function_set_id(array('name' => "blocks/product_filters/components/variant_item.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { ?> <li class="ty-product-filters__group"> <?php if (!$_smarty_tpl->tpl_vars['range']->value['checked']) { ?> <?php $_smarty_tpl->tpl_vars["filter_query_elm"] = new Smarty_variable(fn_add_range_to_url_hash($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["filter_query_elm"] = new Smarty_variable(fn_delete_range_from_url($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); ?> <?php } ?> <?php if ($_REQUEST['features_hash']) { ?> <?php $_smarty_tpl->tpl_vars["cur_features_hash"] = new Smarty_variable("&features_hash=" . (string) $_REQUEST['features_hash'], null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" && (!$_smarty_tpl->tpl_vars['filter']->value['simple_link'] || $_smarty_tpl->tpl_vars['filter']->value['selected_ranges'] && $_smarty_tpl->tpl_vars['controller']->value == "product_features")) { ?> <?php $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url("product_features.view?variant_id=" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'] . (string) $_smarty_tpl->tpl_vars['cur_features_hash']->value), null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['filter_qstring']->value, "features_hash=" . (string) $_smarty_tpl->tpl_vars['filter_query_elm']->value)), null, 0); ?> <?php } ?> <?php $_smarty_tpl->tpl_vars["use_ajax"] = new Smarty_variable(fn_compare_dispatch($_smarty_tpl->tpl_vars['href']->value, $_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <a <?php if (!$_smarty_tpl->tpl_vars['range']->value['disabled'] || $_smarty_tpl->tpl_vars['range']->value['checked']) { ?> href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['href']->value, ENT_QUOTES, 'UTF-8'); ?> "<?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] != "E") { ?> rel="nofollow"<?php } ?> class="ty-product-filters__item<?php if ($_smarty_tpl->tpl_vars['range']->value['checked']) { ?> checked<?php } if ($_smarty_tpl->tpl_vars['range']->value['disabled']) { ?> disabled<?php } elseif ($_smarty_tpl->tpl_vars['allow_ajax']->value && $_smarty_tpl->tpl_vars['use_ajax']->value) { ?> cm-history<?php } ?> " data-ca-scroll=".cm-pagination-container" data-ca-target-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_div_ids']->value, ENT_QUOTES, 'UTF-8'); ?> "><span class="ty-filter-icon"><i class="ty-icon-ok ty-filter-icon__check"></i><i class="ty-icon-cancel ty-filter-icon__delete"></i></span><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['range']->value['range_name']), ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> <?php if (!$_smarty_tpl->tpl_vars['range']->value['disabled']) { ?> <span class="ty-product-filters__count"> (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['products'], ENT_QUOTES, 'UTF-8'); ?> )</span><?php } ?> </a> </li> <?php } }
/** * Gets filter range names * * @param string $range_type Range field type * @param int $range_id Range identifier * @return string Range name */ function fn_get_filter_range_name($range_type, $range_id) { /** * Changes params for getting filter range name * * @param string $range_type Range field type * @param int $range_id Range identifier */ fn_set_hook('get_filter_range_name_pre', $range_type, $range_id); static $fields; if (!isset($fields)) { $fields = fn_get_product_filter_fields(); } if ($range_type == 'F') { $range_name = $fields['F']['variant_descriptions'][$range_id == 1 ? 'Y' : 'N']; } elseif ($range_type == 'P' || $range_type == 'A') { $data = explode('-', $range_id); $from_val = !empty($data[0]) ? $data[0] : 0; $to_val = !empty($data[1]) ? $data[1] : 0; $add_val = !empty($data[2]) ? $data[2] : 0; if (empty($add_val) && $range_type == 'P') { $add_val = CART_SECONDARY_CURRENCY; } $field_name = ''; $from = fn_strtolower(__('range_from')); $to = fn_strtolower(__('range_to')); if ($range_type == 'P') { $field_name = __('price'); if ($add_val != CART_SECONDARY_CURRENCY) { $prev_coef = Registry::get('currencies.' . $add_val . '.coefficient'); $cur_coef = Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.coefficient'); $from_val = floor(floatval($from_val) * floatval($prev_coef) / floatval($cur_coef)); $to_val = ceil(floatval($to_val) * floatval($prev_coef) / floatval($cur_coef)); $add_val = CART_SECONDARY_CURRENCY; } $add_val = Registry::get('currencies.' . $add_val . '.symbol'); } elseif ($range_type == 'A') { $field_name = __('amount'); } $range_name = "{$field_name} : {$from} {$from_val} {$to} {$to_val} " . (!empty($add_val) ? $add_val : ''); } else { $range_name = $range_type == 'V' ? db_get_field("SELECT variant FROM ?:product_feature_variant_descriptions WHERE variant_id = ?i AND lang_code = ?s", $range_id, CART_LANGUAGE) : db_get_field("SELECT range_name FROM ?:product_filter_ranges_descriptions WHERE range_id = ?i AND lang_code = ?s", $range_id, CART_LANGUAGE); } /** * Changes range name * * @param string $range_name Ramge name * @param string $range_type Range field type * @param int $range_id Range identifier */ fn_set_hook('get_filter_range_name_post', $range_name, $range_type, $range_id); return fn_text_placeholders($range_name); }
function content_55d3121df1ce65_07880209($_smarty_tpl) { if (!is_callable('smarty_function_split')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.split.php'; } if (!is_callable('smarty_modifier_in_array')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.in_array.php'; } if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } fn_preload_lang_vars(array('none', 'your_range', 'none', 'yes', 'no', 'any', 'submit', 'or', 'reset_filter', 'advanced_filter', 'advanced_filter', 'none', 'your_range', 'none', 'yes', 'no', 'any', 'submit', 'or', 'reset_filter', 'advanced_filter', 'advanced_filter')); if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); if ($_smarty_tpl->tpl_vars['filter_features']->value) { ?> <?php echo smarty_function_split(array('data' => $_smarty_tpl->tpl_vars['filter_features']->value, 'size' => "3", 'assign' => "splitted_filter", 'preverse_keys' => true), $_smarty_tpl); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("filtering", null, null); ob_start(); ?> <input type="hidden" name="advanced_filter" value="Y" /> <?php if ($_REQUEST['category_id']) { ?> <input type="hidden" name="category_id" value="<?php echo htmlspecialchars($_REQUEST['category_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" name="subcats" value="Y" /> <?php } ?> <?php if ($_REQUEST['variant_id']) { ?> <input type="hidden" name="variant_id" value="<?php echo htmlspecialchars($_REQUEST['variant_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> <div class="ty-filters-search"> <?php $_smarty_tpl->tpl_vars["filters_row"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filters_row"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['splitted_filter']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filters_row"]->key => $_smarty_tpl->tpl_vars["filters_row"]->value) { $_smarty_tpl->tpl_vars["filters_row"]->_loop = true; ?> <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filter"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filters_row']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) { $_smarty_tpl->tpl_vars["filter"]->_loop = true; ?> <?php if (!isset($_smarty_tpl->tpl_vars['filter']->value['feature_type']) && !isset($_smarty_tpl->tpl_vars['filter']->value['condition_type'])) { ?> <?php continue 1; ?> <?php } ?> <span style="display: none"><?php echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['filter']->value), ENT_QUOTES, 'UTF-8'); ?> </span> <div class="ty-column12"> <div class="ty-filters-search__item"> <div class="ty-filters-search__title"><?php echo htmlspecialchars(($tmp = @(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['filter']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['description'] : $tmp)) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8'); ?> </div> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "S" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { ?> <div class="ty-filters-search__scroll"> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <div class="ty-select-field"><input type="checkbox" class="ty-select-field__checkbox" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { ?> multiple_<?php } ?> variants[]" id="variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " value="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); } else { ?> [V<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> " <?php if (smarty_modifier_in_array("[V" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'] . "]", $_smarty_tpl->tpl_vars['search']->value['variants']) || smarty_modifier_in_array($_smarty_tpl->tpl_vars['range']->value['range_id'], $_smarty_tpl->tpl_vars['search']->value['multiple_variants'])) { ?> checked="checked"<?php } ?> /><label class="ty-select-field__title" for="variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_name'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </label></div> <?php } ?> </div> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "O" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "N" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "F") { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <div class="ty-filters-search__scroll"> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("field_" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("feature_" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <p<?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> class="ty-select-field"<?php } ?> ><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="" checked="checked" class="radio ty-select-field__checkbox" /><label class="ty-select-field__title" for="no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("none"); ?> </label></p> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php $_smarty_tpl->tpl_vars["_type"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['field_type']) === null || $tmp === '' ? "R" : $tmp, null, 0); ?> <div class="ty-select-field"><input type="radio" class="ty-select-field__checkbox" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_type']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == (string) $_smarty_tpl->tpl_vars['_type']->value . (string) $_smarty_tpl->tpl_vars['range']->value['range_id']) { ?> checked="checked"<?php } ?> /><label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['range']->value['range_name']), ENT_QUOTES, 'UTF-8'); ?> </label></div> <?php } ?> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type'] != "F") { ?> <p><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="O" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == "O") { ?> checked="checked"<?php } ?> class="radio" /><label for="select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("your_range"); ?> </label></p> <div class="ty-select-field"> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'] || $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable('', null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable("disabled=\"disabled\"", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_from", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][from]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_to", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][to]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <input type="hidden" name="custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ][type]" value="D" /> <?php } else { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to'] : $tmp, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['min'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['max'] : $tmp, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> <?php $_smarty_tpl->tpl_vars["cur"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['cur']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['secondary_currency']->value : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_from"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_from'], null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_to"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_to'], null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_cur"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_cur'], null, 0); ?> <?php } ?> <?php } ?> <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [from]" id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _from" size="3" class="ty-input-text-short<?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['from_value']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> - <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [to]" size="3" class="ty-input-text-short<?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['to_value']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _to" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][cur]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cur']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _cur" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_from]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_from']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_from" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_to]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_to']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_to" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_cur]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_cur']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <?php } ?> <?php } ?> </div> <?php } ?> <script type="text/javascript"> Tygh.$(document).ready(function()<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8'); ?> var $ = Tygh.$; $('input[type=radio][name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]"]').change(function() { var el_id = '<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> '; var flag = (this.value !== 'O'); $('#range_' + el_id + '_from').prop('disabled', flag).toggleClass('disabled', flag); $('#range_' + el_id + '_to').prop('disabled', flag).toggleClass('disabled', flag); <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> $('#range_' + el_id + '_cur').prop('disabled', flag); $('#range_' + el_id + '_orig_from').prop('disabled', flag); $('#range_' + el_id + '_orig_to').prop('disabled', flag); $('#range_' + el_id + '_orig_cur').prop('disabled', flag); <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> $('#range_' + el_id + '_from_but').prop('disabled', flag); $('#range_' + el_id + '_to_but').prop('disabled', flag); <?php } ?> }); <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _to').change(function() { $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur').val(''); }); $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _from').change(function() { $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur').val(''); }); <?php } ?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8'); ?> ); </script> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "C" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "C") { ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['field_type'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none" value="" <?php if (!$_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value]) { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none"><?php echo $_smarty_tpl->__("none"); ?> </label> </div> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "Y") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes"><?php echo $_smarty_tpl->__("yes"); ?> </label> </div> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no" value="N" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "N") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no"><?php echo $_smarty_tpl->__("no"); ?> </label> </div> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <div class="ty-select-field"> <input type="radio" class="radio ty-select-field__checkbox" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any" value="A" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "A") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any"><?php echo $_smarty_tpl->__("any"); ?> </label> </div> <?php } ?> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "T") { ?> <div class="ty-select-field ty-nowrap"> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); ?> <input type="text" name="tx_features[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]" class="ty-filters-search__input-text<?php if ($_smarty_tpl->tpl_vars['filter']->value['prefix'] || $_smarty_tpl->tpl_vars['filter']->value['suffix']) { ?> -medium<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['tx_features'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']], ENT_QUOTES, 'UTF-8'); ?> " /><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </div> <?php } ?> </div> </div> <?php } } ?> </div> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['separate_form']->value) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("section", null, null); ob_start(); ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="get" name="advanced_filter_form"> <?php echo Smarty::$_smarty_vars['capture']['filtering']; ?> <div class="buttons-container"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_REQUEST['dispatch'] . "]", 'but_text' => __("submit")), 0); ?> <?php echo $_smarty_tpl->__("or"); ?> <a class="cm-reset-link"><?php echo $_smarty_tpl->__("reset_filter"); ?> </a> </div> </form> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['variants']) { ?> <?php $_smarty_tpl->tpl_vars["_collapse"] = new Smarty_variable(true, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["_collapse"] = new Smarty_variable(false, null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("advanced_filter"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'collapse' => $_smarty_tpl->tpl_vars['_collapse']->value), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("advanced_filter")), 0); ?> <?php echo Smarty::$_smarty_vars['capture']['filtering']; ?> <?php } ?> <?php } elseif ($_smarty_tpl->tpl_vars['search']->value['features_hash']) { ?> <input type="hidden" name="features_hash" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['features_hash'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="views/products/components/product_filters_advanced_form.tpl" id="<?php echo smarty_function_set_id(array('name' => "views/products/components/product_filters_advanced_form.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { if ($_smarty_tpl->tpl_vars['filter_features']->value) { ?> <?php echo smarty_function_split(array('data' => $_smarty_tpl->tpl_vars['filter_features']->value, 'size' => "3", 'assign' => "splitted_filter", 'preverse_keys' => true), $_smarty_tpl); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("filtering", null, null); ob_start(); ?> <input type="hidden" name="advanced_filter" value="Y" /> <?php if ($_REQUEST['category_id']) { ?> <input type="hidden" name="category_id" value="<?php echo htmlspecialchars($_REQUEST['category_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" name="subcats" value="Y" /> <?php } ?> <?php if ($_REQUEST['variant_id']) { ?> <input type="hidden" name="variant_id" value="<?php echo htmlspecialchars($_REQUEST['variant_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> <div class="ty-filters-search"> <?php $_smarty_tpl->tpl_vars["filters_row"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filters_row"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['splitted_filter']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filters_row"]->key => $_smarty_tpl->tpl_vars["filters_row"]->value) { $_smarty_tpl->tpl_vars["filters_row"]->_loop = true; ?> <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filter"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filters_row']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) { $_smarty_tpl->tpl_vars["filter"]->_loop = true; ?> <?php if (!isset($_smarty_tpl->tpl_vars['filter']->value['feature_type']) && !isset($_smarty_tpl->tpl_vars['filter']->value['condition_type'])) { ?> <?php continue 1; ?> <?php } ?> <span style="display: none"><?php echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['filter']->value), ENT_QUOTES, 'UTF-8'); ?> </span> <div class="ty-column12"> <div class="ty-filters-search__item"> <div class="ty-filters-search__title"><?php echo htmlspecialchars(($tmp = @(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['filter']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['description'] : $tmp)) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8'); ?> </div> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "S" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { ?> <div class="ty-filters-search__scroll"> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <div class="ty-select-field"><input type="checkbox" class="ty-select-field__checkbox" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { ?> multiple_<?php } ?> variants[]" id="variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " value="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); } else { ?> [V<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> " <?php if (smarty_modifier_in_array("[V" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'] . "]", $_smarty_tpl->tpl_vars['search']->value['variants']) || smarty_modifier_in_array($_smarty_tpl->tpl_vars['range']->value['range_id'], $_smarty_tpl->tpl_vars['search']->value['multiple_variants'])) { ?> checked="checked"<?php } ?> /><label class="ty-select-field__title" for="variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_name'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </label></div> <?php } ?> </div> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "O" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "N" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "F") { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <div class="ty-filters-search__scroll"> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("field_" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("feature_" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <p<?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> class="ty-select-field"<?php } ?> ><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="" checked="checked" class="radio ty-select-field__checkbox" /><label class="ty-select-field__title" for="no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("none"); ?> </label></p> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php $_smarty_tpl->tpl_vars["_type"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['field_type']) === null || $tmp === '' ? "R" : $tmp, null, 0); ?> <div class="ty-select-field"><input type="radio" class="ty-select-field__checkbox" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_type']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == (string) $_smarty_tpl->tpl_vars['_type']->value . (string) $_smarty_tpl->tpl_vars['range']->value['range_id']) { ?> checked="checked"<?php } ?> /><label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['range']->value['range_name']), ENT_QUOTES, 'UTF-8'); ?> </label></div> <?php } ?> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type'] != "F") { ?> <p><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="O" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == "O") { ?> checked="checked"<?php } ?> class="radio" /><label for="select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("your_range"); ?> </label></p> <div class="ty-select-field"> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'] || $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable('', null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable("disabled=\"disabled\"", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_from", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][from]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_to", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][to]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <input type="hidden" name="custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ][type]" value="D" /> <?php } else { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to'] : $tmp, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['min'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['max'] : $tmp, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> <?php $_smarty_tpl->tpl_vars["cur"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['cur']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['secondary_currency']->value : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_from"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_from'], null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_to"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_to'], null, 0); ?> <?php $_smarty_tpl->tpl_vars["orig_cur"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['orig_cur'], null, 0); ?> <?php } ?> <?php } ?> <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [from]" id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _from" size="3" class="ty-input-text-short<?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['from_value']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> - <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [to]" size="3" class="ty-input-text-short<?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['to_value']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _to" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][cur]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cur']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _cur" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_from]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_from']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_from" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_to]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_to']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_to" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <input type="hidden" name="field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ][orig_cur]" size="3" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['orig_cur']->value, ENT_QUOTES, 'UTF-8'); ?> " id="range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <?php } ?> <?php } ?> </div> <?php } ?> <script type="text/javascript"> Tygh.$(document).ready(function()<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8'); ?> var $ = Tygh.$; $('input[type=radio][name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]"]').change(function() { var el_id = '<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> '; var flag = (this.value !== 'O'); $('#range_' + el_id + '_from').prop('disabled', flag).toggleClass('disabled', flag); $('#range_' + el_id + '_to').prop('disabled', flag).toggleClass('disabled', flag); <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> $('#range_' + el_id + '_cur').prop('disabled', flag); $('#range_' + el_id + '_orig_from').prop('disabled', flag); $('#range_' + el_id + '_orig_to').prop('disabled', flag); $('#range_' + el_id + '_orig_cur').prop('disabled', flag); <?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> $('#range_' + el_id + '_from_but').prop('disabled', flag); $('#range_' + el_id + '_to_but').prop('disabled', flag); <?php } ?> }); <?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type'] == 'P') { ?> $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _to').change(function() { $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur').val(''); }); $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _from').change(function() { $('#range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _orig_cur').val(''); }); <?php } ?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8'); ?> ); </script> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "C" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "C") { ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['field_type'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none" value="" <?php if (!$_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value]) { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none"><?php echo $_smarty_tpl->__("none"); ?> </label> </div> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "Y") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes"><?php echo $_smarty_tpl->__("yes"); ?> </label> </div> <div class="ty-select-field"> <input type="radio ty-select-field__checkbox" class="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no" value="N" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "N") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no"><?php echo $_smarty_tpl->__("no"); ?> </label> </div> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <div class="ty-select-field"> <input type="radio" class="radio ty-select-field__checkbox" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any" value="A" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "A") { ?> checked="checked"<?php } ?> /> <label class="ty-select-field__title" for="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any"><?php echo $_smarty_tpl->__("any"); ?> </label> </div> <?php } ?> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "T") { ?> <div class="ty-select-field ty-nowrap"> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); ?> <input type="text" name="tx_features[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]" class="ty-filters-search__input-text<?php if ($_smarty_tpl->tpl_vars['filter']->value['prefix'] || $_smarty_tpl->tpl_vars['filter']->value['suffix']) { ?> -medium<?php } ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['tx_features'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']], ENT_QUOTES, 'UTF-8'); ?> " /><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </div> <?php } ?> </div> </div> <?php } } ?> </div> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['separate_form']->value) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("section", null, null); ob_start(); ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="get" name="advanced_filter_form"> <?php echo Smarty::$_smarty_vars['capture']['filtering']; ?> <div class="buttons-container"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_REQUEST['dispatch'] . "]", 'but_text' => __("submit")), 0); ?> <?php echo $_smarty_tpl->__("or"); ?> <a class="cm-reset-link"><?php echo $_smarty_tpl->__("reset_filter"); ?> </a> </div> </form> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['variants']) { ?> <?php $_smarty_tpl->tpl_vars["_collapse"] = new Smarty_variable(true, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["_collapse"] = new Smarty_variable(false, null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("advanced_filter"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'collapse' => $_smarty_tpl->tpl_vars['_collapse']->value), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("advanced_filter")), 0); ?> <?php echo Smarty::$_smarty_vars['capture']['filtering']; ?> <?php } ?> <?php } elseif ($_smarty_tpl->tpl_vars['search']->value['features_hash']) { ?> <input type="hidden" name="features_hash" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['features_hash'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } } }
function content_55ccecb4e1aac1_97059005($_smarty_tpl) { if (!is_callable('smarty_function_split')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.split.php'; } if (!is_callable('smarty_modifier_in_array')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.in_array.php'; } fn_preload_lang_vars(array('none', 'your_range', 'none', 'yes', 'no', 'any')); echo smarty_function_split(array('data' => $_smarty_tpl->tpl_vars['filter_features']->value, 'size' => "3", 'assign' => "splitted_filter", 'preverse_keys' => true), $_smarty_tpl); ?> <table cellpadding="8"> <?php $_smarty_tpl->tpl_vars["filters_row"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filters_row"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['splitted_filter']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars["filters_row"]->index = -1; foreach ($_from as $_smarty_tpl->tpl_vars["filters_row"]->key => $_smarty_tpl->tpl_vars["filters_row"]->value) { $_smarty_tpl->tpl_vars["filters_row"]->_loop = true; $_smarty_tpl->tpl_vars["filters_row"]->index++; $_smarty_tpl->tpl_vars["filters_row"]->first = $_smarty_tpl->tpl_vars["filters_row"]->index === 0; $_smarty_tpl->tpl_vars['smarty']->value['foreach']["filters_row"]['first'] = $_smarty_tpl->tpl_vars["filters_row"]->first; ?> <thead> <tr> <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filter"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filters_row']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) { $_smarty_tpl->tpl_vars["filter"]->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value && $_smarty_tpl->tpl_vars['filter']->value['field_type'] != "P") { ?> <td><strong><?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['filter']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['description'] : $tmp, ENT_QUOTES, 'UTF-8'); ?> </strong></td> <?php } ?> <?php } ?> </tr> </thead> <tr valign="top"<?php if (sizeof($_smarty_tpl->tpl_vars['splitted_filter']->value) > 1 && $_smarty_tpl->getVariable('smarty')->value['foreach']['filters_row']['first']) { ?> class="delim"<?php } ?> > <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["filter"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filters_row']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) { $_smarty_tpl->tpl_vars["filter"]->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value && $_smarty_tpl->tpl_vars['filter']->value['field_type'] != "P") { ?> <td width="33%"> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "S" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "N" && !$_smarty_tpl->tpl_vars['filter']->value['filter_id']) { ?> <div class="scroll-y"> <?php $_smarty_tpl->tpl_vars["filter_ranges"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['ranges']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['variants'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_smarty_tpl->tpl_vars["range_id"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['filter_ranges']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; $_smarty_tpl->tpl_vars["range_id"]->value = $_smarty_tpl->tpl_vars["range"]->key; ?> <label for="variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="checkbox"><input type="checkbox" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { ?> multiple_<?php } ?> variants[]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> variants_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "M") { echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); } else { ?> [V<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> " <?php if (smarty_modifier_in_array("[V" . (string) $_smarty_tpl->tpl_vars['range_id']->value . "]", $_smarty_tpl->tpl_vars['search']->value['variants']) || smarty_modifier_in_array($_smarty_tpl->tpl_vars['range_id']->value, $_smarty_tpl->tpl_vars['search']->value['multiple_variants'])) { ?> checked="checked"<?php } ?> /><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['variant'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </label> <?php } ?> </div> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "O" || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "N" && $_smarty_tpl->tpl_vars['filter']->value['filter_id'] || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "D" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "F") { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <div class="scroll-y"><?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("field_" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable("feature_" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="radio"><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> no_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="" checked="checked" /><?php echo $_smarty_tpl->__("none"); ?> </label> <?php $_smarty_tpl->tpl_vars["filter_ranges"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['ranges']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['variants'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["_type"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['field_type']) === null || $tmp === '' ? "R" : $tmp, null, 0); ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_smarty_tpl->tpl_vars["range_id"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['filter_ranges']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; $_smarty_tpl->tpl_vars["range_id"]->value = $_smarty_tpl->tpl_vars["range"]->key; ?> <?php $_smarty_tpl->tpl_vars["range_name"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['range']->value['range_name']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['range']->value['variant'] : $tmp, null, 0); ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="radio"><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_type']->value, ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['range_id']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == (string) $_smarty_tpl->tpl_vars['_type']->value . (string) $_smarty_tpl->tpl_vars['range_id']->value) { ?> checked="checked"<?php } ?> /><?php echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['range_name']->value), ENT_QUOTES, 'UTF-8'); ?> </label> <?php } ?> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> </div><?php } ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type'] != "F") { ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="radio"><input type="radio" name="variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> select_custom_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="O" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] == "O") { ?> checked="checked"<?php } ?> /><?php echo $_smarty_tpl->__("your_range"); ?> </label> <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'] || $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable('', null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["date_extra"] = new Smarty_variable("disabled=\"disabled\"", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => (string) $_smarty_tpl->tpl_vars['prefix']->value . "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_from", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][from]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => (string) $_smarty_tpl->tpl_vars['prefix']->value . "range_" . (string) $_smarty_tpl->tpl_vars['el_id']->value . "_to", 'date_name' => "custom_range[" . (string) $_smarty_tpl->tpl_vars['filter']->value['feature_id'] . "][to]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to'], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> <input type="hidden" name="custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ][type]" value="D" /> <?php } else { ?> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['custom_range'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to'] : $tmp, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["from_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['from']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['min'] : $tmp, null, 0); ?> <?php $_smarty_tpl->tpl_vars["to_value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['search']->value['field_range'][$_smarty_tpl->tpl_vars['filter']->value['field_type']]['to']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['range_values']['max'] : $tmp, null, 0); ?> <?php } ?> <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [from]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _from" size="3" class="input-mini" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['from_value']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> - <input type="text" name="<?php if ($_smarty_tpl->tpl_vars['filter']->value['field_type']) { ?> field_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } else { ?> custom_range[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]<?php } ?> [to]" size="3" class="input-mini" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['to_value']->value, ENT_QUOTES, 'UTF-8'); ?> " id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _to" <?php if ($_smarty_tpl->tpl_vars['search']->value['variants'][$_smarty_tpl->tpl_vars['el_id']->value] != "O") { ?> disabled="disabled"<?php } ?> /> <?php } ?> <?php } ?> <script type="text/javascript"> Tygh.$(document).ready(function() { var $ = Tygh.$; $("input[type=radio][name='variants[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]']").change(function() { var el_id = '<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> '; $('#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_' + el_id + '_from').prop('disabled', this.value !== 'O'); $('#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_' + el_id + '_to').prop('disabled', this.value !== 'O'); <?php if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") { ?> $('#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_' + el_id + '_from_but').prop('disabled', this.value !== 'O'); $('#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> range_' + el_id + '_to_but').prop('disabled', this.value !== 'O'); <?php } ?> }); }); </script> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "C" || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "C") { ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['field_type'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["el_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['feature_id'], null, 0); ?> <?php } ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none" class="radio"> <input type="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _none" value="" <?php if (!$_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value]) { ?> checked="checked"<?php } ?> /> <?php echo $_smarty_tpl->__("none"); ?> </label> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes" class="radio"> <input type="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _yes" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "Y") { ?> checked="checked"<?php } ?> /> <?php echo $_smarty_tpl->__("yes"); ?> </label> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no" class="radio"> <input type="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _no" value="N" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "N") { ?> checked="checked"<?php } ?> /> <?php echo $_smarty_tpl->__("no"); ?> </label> <?php if (!$_smarty_tpl->tpl_vars['filter']->value['condition_type']) { ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any" class="radio"> <input type="radio" name="ch_filters[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8'); ?> ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['el_id']->value, ENT_QUOTES, 'UTF-8'); ?> _any" value="A" <?php if ($_smarty_tpl->tpl_vars['search']->value['ch_filters'][$_smarty_tpl->tpl_vars['el_id']->value] == "A") { ?> checked="checked"<?php } ?> /> <?php echo $_smarty_tpl->__("any"); ?> </label> <?php } ?> <?php } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "T") { ?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); ?> <input type="text" name="tx_features[<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8'); ?> ]" class="input-mini" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['tx_features'][$_smarty_tpl->tpl_vars['filter']->value['feature_id']], ENT_QUOTES, 'UTF-8'); ?> " /><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> <?php } ?> </td> <?php } } ?> </tr> <?php } ?> </table><?php }
function fn_get_filter_range_name($range_type, $range_id) { static $fields; if (!isset($fields)) { $fields = fn_get_product_filter_fields(); } if ($range_type == 'F') { $range_name = $fields['F']['variant_descriptions'][$range_id == 1 ? 'Y' : 'N']; } else { $range_name = $range_type == 'V' ? db_get_field("SELECT variant FROM ?:product_feature_variant_descriptions WHERE variant_id = ?i AND lang_code = ?s", $range_id, CART_LANGUAGE) : db_get_field("SELECT range_name FROM ?:product_filter_ranges_descriptions WHERE range_id = ?i AND lang_code = ?s", $range_id, CART_LANGUAGE); } return fn_text_placeholders($range_name); }
function content_55ccf2ea7e3e06_11166307($_smarty_tpl) { if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } fn_preload_lang_vars(array('view_all', 'more', 'less', 'view_all', 'more', 'less')); if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); ?> <ul class="ty-product-filters <?php if ($_smarty_tpl->tpl_vars['collapse']->value) { ?> hidden<?php } ?> cm-popup-box ty-dropdown-box__content" id="content_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["selected_range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["selected_range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['selected_ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["selected_range"]->key => $_smarty_tpl->tpl_vars["selected_range"]->value) { $_smarty_tpl->tpl_vars["selected_range"]->_loop = true; ?> <?php $_smarty_tpl->_capture_stack[0][] = array("has_selected", null, null); ob_start(); ?> Y<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <li class="ty-product-filters__group"> <?php $_smarty_tpl->tpl_vars["fh"] = new Smarty_variable(fn_delete_range_from_url($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['selected_range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); if ($_smarty_tpl->tpl_vars['fh']->value) { $_smarty_tpl->tpl_vars["attach_query"] = new Smarty_variable("features_hash=" . (string) $_smarty_tpl->tpl_vars['fh']->value, null, 0); } if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" && $_smarty_tpl->tpl_vars['selected_range']->value['range_id'] == $_REQUEST['variant_id']) { $_smarty_tpl->tpl_vars["reset_lnk"] = new Smarty_variable($_smarty_tpl->tpl_vars['reset_qstring']->value, null, 0); } else { $_smarty_tpl->tpl_vars["reset_lnk"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter_qstring']->value, null, 0); } if ($_smarty_tpl->tpl_vars['fh']->value) { $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['reset_lnk']->value, $_smarty_tpl->tpl_vars['attach_query']->value)), null, 0); } else { $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url($_smarty_tpl->tpl_vars['reset_lnk']->value), null, 0); } $_smarty_tpl->tpl_vars["use_ajax"] = new Smarty_variable(fn_compare_dispatch($_smarty_tpl->tpl_vars['href']->value, $_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['href']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__item checked cm-history" data-ca-scroll=".cm-pagination-container" data-ca-target-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_div_ids']->value, ENT_QUOTES, 'UTF-8'); ?> " rel="nofollow"><span class="ty-filter-icon"><i class="ty-icon-ok ty-filter-icon__check"></i><i class="ty-icon-cancel ty-filter-icon__delete"></i></span><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['selected_range']->value['range_name']), ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </a> </li> <?php } ?> <?php if (fn_is_not_empty($_smarty_tpl->tpl_vars['filter']->value['ranges'])) { ?> <li class="ty-product-filters__item-more"> <ul id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/product_filters/components/variant_item.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('range' => $_smarty_tpl->tpl_vars['range']->value, 'filter' => $_smarty_tpl->tpl_vars['filter']->value, 'ajax_div_ids' => $_smarty_tpl->tpl_vars['ajax_div_ids']->value, 'filter_qstring' => $_smarty_tpl->tpl_vars['filter_qstring']->value, 'reset_qstring' => $_smarty_tpl->tpl_vars['reset_qstring']->value, 'allow_ajax' => $_smarty_tpl->tpl_vars['allow_ajax']->value), 0); ?> <?php } ?> </ul> </li> <?php } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("view_all", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['more_cut']) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("q", null, null); ob_start(); echo $_smarty_tpl->tpl_vars['filter_qstring']->value; ?> &filter_id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['filter_id'], ENT_QUOTES, 'UTF-8'); ?> &<?php if ($_REQUEST['features_hash']) { ?> &features_hash=<?php echo htmlspecialchars($_REQUEST['features_hash'], ENT_QUOTES, 'UTF-8'); } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <li class="ty-product-filters__group" id="view_all_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["capture_q"] = new Smarty_variable(rawurlencode(Smarty::$_smarty_vars['capture']['q']), null, 0); ?> <a href="<?php echo htmlspecialchars(fn_url("product_features.view_all?q=" . (string) $_smarty_tpl->tpl_vars['capture_q']->value), ENT_QUOTES, 'UTF-8'); ?> " rel="nofollow" class="ty-product-filters__extra-link ty-extra-link"><?php echo $_smarty_tpl->__("view_all"); ?> </a> </li> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (fn_is_not_empty($_smarty_tpl->tpl_vars['filter']->value['more_ranges'])) { ?> <?php $_smarty_tpl->tpl_vars["cookie_name_show_more"] = new Smarty_variable("more_ranges_" . (string) $_smarty_tpl->tpl_vars['filter_uid']->value, null, 0); ?> <?php $_smarty_tpl->tpl_vars["more_collapse"] = new Smarty_variable(true, null, 0); ?> <?php if ($_COOKIE[$_smarty_tpl->tpl_vars['cookie_name_show_more']->value]) { ?> <?php $_smarty_tpl->tpl_vars["more_collapse"] = new Smarty_variable(false, null, 0); ?> <?php } ?> <li> <ul id="more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['more_collapse']->value) { ?> class="hidden"<?php } ?> > <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['more_ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/product_filters/components/variant_item.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('range' => $_smarty_tpl->tpl_vars['range']->value, 'filter' => $_smarty_tpl->tpl_vars['filter']->value, 'ajax_div_ids' => $_smarty_tpl->tpl_vars['ajax_div_ids']->value, 'filter_qstring' => $_smarty_tpl->tpl_vars['filter_qstring']->value, 'reset_qstring' => $_smarty_tpl->tpl_vars['reset_qstring']->value, 'allow_ajax' => $_smarty_tpl->tpl_vars['allow_ajax']->value), 0); ?> <?php } ?> <?php echo Smarty::$_smarty_vars['capture']['view_all']; ?> </ul> </li> <li class="ty-product-filters__extra-block"> <a id="on_more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__extra-link ty-extra-link cm-save-state cm-combination-more_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); if (!$_smarty_tpl->tpl_vars['more_collapse']->value) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("more"); ?> </a> <a id="off_more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__extra-link ty-extra-link cm-save-state cm-combination-more_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); if ($_smarty_tpl->tpl_vars['more_collapse']->value) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("less"); ?> </a> </li> <?php } else { ?> <?php echo Smarty::$_smarty_vars['capture']['view_all']; ?> <?php } ?> </ul><?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="blocks/product_filters/components/product_filter_variants.tpl" id="<?php echo smarty_function_set_id(array('name' => "blocks/product_filters/components/product_filter_variants.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { ?> <ul class="ty-product-filters <?php if ($_smarty_tpl->tpl_vars['collapse']->value) { ?> hidden<?php } ?> cm-popup-box ty-dropdown-box__content" id="content_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["selected_range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["selected_range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['selected_ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["selected_range"]->key => $_smarty_tpl->tpl_vars["selected_range"]->value) { $_smarty_tpl->tpl_vars["selected_range"]->_loop = true; ?> <?php $_smarty_tpl->_capture_stack[0][] = array("has_selected", null, null); ob_start(); ?> Y<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <li class="ty-product-filters__group"> <?php $_smarty_tpl->tpl_vars["fh"] = new Smarty_variable(fn_delete_range_from_url($_REQUEST['features_hash'], $_smarty_tpl->tpl_vars['selected_range']->value, $_smarty_tpl->tpl_vars['filter']->value['field_type']), null, 0); if ($_smarty_tpl->tpl_vars['fh']->value) { $_smarty_tpl->tpl_vars["attach_query"] = new Smarty_variable("features_hash=" . (string) $_smarty_tpl->tpl_vars['fh']->value, null, 0); } if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "E" && $_smarty_tpl->tpl_vars['selected_range']->value['range_id'] == $_REQUEST['variant_id']) { $_smarty_tpl->tpl_vars["reset_lnk"] = new Smarty_variable($_smarty_tpl->tpl_vars['reset_qstring']->value, null, 0); } else { $_smarty_tpl->tpl_vars["reset_lnk"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter_qstring']->value, null, 0); } if ($_smarty_tpl->tpl_vars['fh']->value) { $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['reset_lnk']->value, $_smarty_tpl->tpl_vars['attach_query']->value)), null, 0); } else { $_smarty_tpl->tpl_vars["href"] = new Smarty_variable(fn_url($_smarty_tpl->tpl_vars['reset_lnk']->value), null, 0); } $_smarty_tpl->tpl_vars["use_ajax"] = new Smarty_variable(fn_compare_dispatch($_smarty_tpl->tpl_vars['href']->value, $_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['href']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__item checked cm-history" data-ca-scroll=".cm-pagination-container" data-ca-target-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_div_ids']->value, ENT_QUOTES, 'UTF-8'); ?> " rel="nofollow"><span class="ty-filter-icon"><i class="ty-icon-ok ty-filter-icon__check"></i><i class="ty-icon-cancel ty-filter-icon__delete"></i></span><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8'); echo htmlspecialchars(fn_text_placeholders($_smarty_tpl->tpl_vars['selected_range']->value['range_name']), ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8'); ?> </a> </li> <?php } ?> <?php if (fn_is_not_empty($_smarty_tpl->tpl_vars['filter']->value['ranges'])) { ?> <li class="ty-product-filters__item-more"> <ul id="ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/product_filters/components/variant_item.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('range' => $_smarty_tpl->tpl_vars['range']->value, 'filter' => $_smarty_tpl->tpl_vars['filter']->value, 'ajax_div_ids' => $_smarty_tpl->tpl_vars['ajax_div_ids']->value, 'filter_qstring' => $_smarty_tpl->tpl_vars['filter_qstring']->value, 'reset_qstring' => $_smarty_tpl->tpl_vars['reset_qstring']->value, 'allow_ajax' => $_smarty_tpl->tpl_vars['allow_ajax']->value), 0); ?> <?php } ?> </ul> </li> <?php } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("view_all", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['filter']->value['more_cut']) { ?> <?php $_smarty_tpl->_capture_stack[0][] = array("q", null, null); ob_start(); echo $_smarty_tpl->tpl_vars['filter_qstring']->value; ?> &filter_id=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['filter_id'], ENT_QUOTES, 'UTF-8'); ?> &<?php if ($_REQUEST['features_hash']) { ?> &features_hash=<?php echo htmlspecialchars($_REQUEST['features_hash'], ENT_QUOTES, 'UTF-8'); } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <li class="ty-product-filters__group" id="view_all_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["capture_q"] = new Smarty_variable(rawurlencode(Smarty::$_smarty_vars['capture']['q']), null, 0); ?> <a href="<?php echo htmlspecialchars(fn_url("product_features.view_all?q=" . (string) $_smarty_tpl->tpl_vars['capture_q']->value), ENT_QUOTES, 'UTF-8'); ?> " rel="nofollow" class="ty-product-filters__extra-link ty-extra-link"><?php echo $_smarty_tpl->__("view_all"); ?> </a> </li> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (fn_is_not_empty($_smarty_tpl->tpl_vars['filter']->value['more_ranges'])) { ?> <?php $_smarty_tpl->tpl_vars["cookie_name_show_more"] = new Smarty_variable("more_ranges_" . (string) $_smarty_tpl->tpl_vars['filter_uid']->value, null, 0); ?> <?php $_smarty_tpl->tpl_vars["more_collapse"] = new Smarty_variable(true, null, 0); ?> <?php if ($_COOKIE[$_smarty_tpl->tpl_vars['cookie_name_show_more']->value]) { ?> <?php $_smarty_tpl->tpl_vars["more_collapse"] = new Smarty_variable(false, null, 0); ?> <?php } ?> <li> <ul id="more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['more_collapse']->value) { ?> class="hidden"<?php } ?> > <?php $_smarty_tpl->tpl_vars["range"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["range"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter']->value['more_ranges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) { $_smarty_tpl->tpl_vars["range"]->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/product_filters/components/variant_item.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('range' => $_smarty_tpl->tpl_vars['range']->value, 'filter' => $_smarty_tpl->tpl_vars['filter']->value, 'ajax_div_ids' => $_smarty_tpl->tpl_vars['ajax_div_ids']->value, 'filter_qstring' => $_smarty_tpl->tpl_vars['filter_qstring']->value, 'reset_qstring' => $_smarty_tpl->tpl_vars['reset_qstring']->value, 'allow_ajax' => $_smarty_tpl->tpl_vars['allow_ajax']->value), 0); ?> <?php } ?> <?php echo Smarty::$_smarty_vars['capture']['view_all']; ?> </ul> </li> <li class="ty-product-filters__extra-block"> <a id="on_more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__extra-link ty-extra-link cm-save-state cm-combination-more_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); if (!$_smarty_tpl->tpl_vars['more_collapse']->value) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("more"); ?> </a> <a id="off_more_ranges_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); ?> " class="ty-product-filters__extra-link ty-extra-link cm-save-state cm-combination-more_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_uid']->value, ENT_QUOTES, 'UTF-8'); if ($_smarty_tpl->tpl_vars['more_collapse']->value) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("less"); ?> </a> </li> <?php } else { ?> <?php echo Smarty::$_smarty_vars['capture']['view_all']; ?> <?php } ?> </ul><?php } }