/** * Return list log items by filter * * @param array $params * @param int $items_per_page * @return array */ public static function getList($params, $items_per_page = 0) { // Set default values to input params $default_params = array('page' => 1, 'items_per_page' => $items_per_page); $types = static::getTypes(); $actions = static::getActions(); $params = array_merge($default_params, $params); $condition = ''; $limit = ''; $sortings = array('id' => 'id', 'datetime' => 'datetime'); if (isset($params['template_id']) && fn_is_not_empty($params['template_id'])) { $condition .= db_quote(' AND template_id = ?i', $params['template_id']); } if (isset($params['product_id']) && fn_is_not_empty($params['product_id'])) { $condition .= db_quote(' AND product_id = ?i', $params['product_id']); } if (isset($params['product_ids']) && fn_is_not_empty($params['product_ids'])) { $condition .= db_quote(' AND product_id IN (?n)', $params['product_ids']); } if (isset($params['code']) && fn_is_not_empty($params['code'])) { $condition .= db_quote(' AND product_id = ?s', $params['code']); } if (isset($params['type']) && fn_is_not_empty($params['type'])) { $condition .= db_quote(' AND type = ?i', $params['type']); } if (isset($params['action']) && fn_is_not_empty($params['action'])) { $condition .= db_quote(' AND action = ?i', $params['action']); } if (!empty($params['period']) && $params['period'] != 'A') { list($time_from, $time_to) = fn_create_periods($params); $condition .= db_quote(' AND (datetime >= ?i AND datetime <= ?i)', $time_from, $time_to); } $sorting = db_sort($params, $sortings, 'id', 'desc'); if (!empty($params['items_per_page'])) { $params['total_items'] = db_get_field("SELECT COUNT(*) FROM ?:ebay_product_log WHERE 1 {$condition}"); $limit = db_paginate($params['page'], $params['items_per_page'], $params['total_items']); } $result = db_get_array("SELECT * FROM ?:ebay_product_log WHERE 1 {$condition} {$sorting} {$limit}"); foreach ($result as &$item) { switch ($item['type']) { case static::TYPE_ERROR: $item['type_code'] = 'error'; break; case static::TYPE_INFO: $item['type_code'] = 'info'; break; case static::TYPE_WARNING: $item['type_code'] = 'warning'; break; default: $item['type_code'] = 'undefined'; break; } $item['type_name'] = isset($types[$item['type']]) ? $types[$item['type']] : 'undefined'; $item['action_name'] = isset($actions[$item['action']]) ? $actions[$item['action']] : 'undefined'; } unset($item); return array($result, $params); }
public function build($product) { $category_id = $product['category_id']; $available = 'true'; if ($product['tracking'] == 'B' && $product['amount'] <= 0) { $available = 'false'; } $offer = array('attr' => array('id' => $product['product_id'], 'available' => $available), 'items' => array('url' => $this->escapeUrl($product['product_url']), 'price' => !empty($product['price']) ? $product['price'] : "0.00", 'currencyId' => !empty($currency) ? $currency['currency_code'] : CART_PRIMARY_CURRENCY, 'categoryId' => $category_id, 'category_model' => $product['category'])); if (!empty($product['yml2_store'])) { $offer['items']['store'] = $product['yml2_store'] == 'Y' ? 'true' : 'false'; } elseif (!empty($this->options['store'])) { $offer['items']['store'] = $this->options['store'] == 'Y' ? 'true' : 'false'; } if (!empty($product['yml2_pickup'])) { $offer['items']['pickup'] = $product['yml2_pickup'] == 'Y' ? 'true' : 'false'; } elseif (!empty($this->options['pickup'])) { $offer['items']['pickup'] = $this->options['pickup'] == 'Y' ? 'true' : 'false'; } if (!empty($product['yml2_delivery'])) { $offer['items']['delivery'] = $product['yml2_delivery'] == 'Y' ? 'true' : 'false'; } elseif (!empty($this->options['delivery'])) { $offer['items']['delivery'] = $this->options['delivery'] == 'Y' ? 'true' : 'false'; } if (!empty($product['base_price']) && $product['price'] < $product['base_price']) { $offer['items']['oldprice'] = $product['base_price']; } elseif (!empty($product['list_price']) && $product['price'] < $product['list_price']) { $offer['items']['oldprice'] = $product['list_price']; } // Images while ($image = array_shift($product['images'])) { $offer['items']['picture'][] = $this->getImageUrl($image); } if (!empty($product['yml2_delivery_options'])) { $product['yml2_delivery_options'] = unserialize($product['yml2_delivery_options']); $options = array(); if (!empty($product['yml2_delivery_options'])) { foreach ($product['yml2_delivery_options'] as $delivery_option) { $option = array('attr' => array('cost' => $delivery_option['cost'], 'days' => $delivery_option['days'])); if (!empty($delivery_option['order_before'])) { $option['attr']['order-before'] = $delivery_option['order_before']; } $options[] = $option; } } if (!empty($options)) { $offer['items']['delivery-options']['option'] = $options; } } if (!empty($product['yml2_sales_notes'])) { $offer['items']['sales_notes'] = $product['yml2_sales_notes']; } if (!empty($product['yml2_manufacturer_warranty'])) { $offer['items']['manufacturer_warranty'] = $product['yml2_manufacturer_warranty']; } if (!empty($product['yml2_seller_warranty'])) { $offer['items']['seller_warranty'] = $product['yml2_seller_warranty']; } if (!empty($product['yml2_origin_country']) && fn_yml_check_country($product['yml2_origin_country'])) { $offer['items']['country_of_origin'] = $product['yml2_origin_country']; } $this->buildFeatures($product, $offer); if (empty($offer['items']['model']) && !empty($this->options['yml2_model_categories'][$category_id]) && !empty($this->options['yml2_model_select'][$category_id]['value']) && $this->options['yml2_model_select'][$category_id]['value'] == 'yml2_model') { $offer['items']['model'] = $this->options['yml2_model_categories'][$category_id]; } if (empty($offer['items']['typePrefix']) && !empty($this->options['yml2_type_prefix_categories'][$category_id])) { $offer['items']['typePrefix'] = $this->options['yml2_type_prefix_categories'][$category_id]; } if (empty($offer['items']['market_category']) && $this->options['export_market_category'] == 'Y') { if (!empty($product['yml2_market_category'])) { $offer['items']['market_category'] = $product['yml2_market_category']; } elseif (!empty($this->options['market_category'][$category_id])) { $offer['items']['market_category'] = $this->options['market_category'][$category_id]; } } if (!empty($product['yml2_bid'])) { $offer['attr']['bid'] = $product['yml2_bid']; } if (!empty($product['yml2_cbid'])) { $offer['attr']['cbid'] = $product['yml2_cbid']; } if (!empty($product['yml2_purchase_price'])) { $offer['items']['purchase_price'] = $product['yml2_purchase_price']; } if ($this->options['weight'] == "Y") { $offer['items']['weight'] = fn_is_not_empty((double) $product['weight']) ? $product['weight'] : '0.01'; } if ($this->options['dimensions'] == "Y") { $product['shipping_params'] = unserialize($product['shipping_params']); if (!empty($product['shipping_params']['min_items_in_box'])) { $length = $product['shipping_params']['box_length']; $width = $product['shipping_params']['box_width']; $height = $product['shipping_params']['box_height']; $offer['items']['dimensions'] = $length . '/' . $width . '/' . $height; } } return $offer; }
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 } }