/** * Renders products to document */ public function render() { $this->printHeader(); if (Registry::get('addons.price_list.group_by_category') == 'Y') { $categories = fn_get_plain_categories_tree(0, false); foreach ($categories as $category) { if (empty($category['product_count'])) { continue; } $this->printCategoryRow($category); $params = array(); $params['sort_by'] = $this->price_schema['fields'][Registry::get('addons.price_list.price_list_sorting')]['sort_by']; $params['page'] = 1; $params['skip_view'] = 'Y'; $params['cid'] = $category['category_id']; $params['subcats'] = 'N'; $this->processProducts($params); } } else { $total = static::ITEMS_PER_PAGE; $params = array(); $params['sort_by'] = $this->price_schema['fields'][Registry::get('addons.price_list.price_list_sorting')]['sort_by']; $params['page'] = 1; $params['skip_view'] = 'Y'; $this->processProducts($params); } $this->printFooter(); }
function fn_settings_variants_addons_rus_exim_1c_exim_1c_default_category() { $categories_tree = array(); $categories = fn_get_plain_categories_tree(0, false); foreach ($categories as $key => $category_data) { if (isset($category_data['level'])) { $indent = ''; for ($i = 0; $i < $category_data['level']; $i++) { $indent = $indent . "¦__"; } $categories_tree[$category_data['category_id']] = $indent . $category_data['category']; } } return $categories_tree; }
$col = 'A'; $row = 1; $width = array(); $counter = new Counter(100, '.'); $workbook =& new writeexcel_workbook($filename); $worksheet =& $workbook->addworksheet(fn_get_lang_var('price_list')); $field_heading =& $workbook->addformat(array(bold => FIELD_HEADING_BOLD, size => FIELD_HEADING_FONT_SIZE, font => FIELD_HEADING_FONT_FAMILY, align => FIELD_HEADING_ALIGN)); $category_heading =& $workbook->addformat(array(bold => CATEGORY_HEADING_BOLD, size => CATEGORY_HEADING_FONT_SIZE, font => CATEGORY_HEADING_FONT_FAMILY, merge => CATEGORY_HEADING_MERGE, bg_color => CATEGORY_HEADING_BG_COLOR, color => CATEGORY_HEADING_FONT_COLOR, align => CATEGORY_HEADING_ALIGN)); $field_simple =& $workbook->addformat(array(bold => FIELD_BOLD, size => FIELD_FONT_SIZE, font => FIELD_FONT_FAMILY, bottom => FIELD_BOTTOM_BORDER, bottom_color => FIELD_BOTTOM_BORDER_COLOR, align => FIELD_ALIGN, text_wrap => FIELD_TEXT_WRAP, num_format => FIELD_NUM_FORMAT)); $field_simple_odd =& $workbook->addformat(array(bold => FIELD_BOLD, size => FIELD_FONT_SIZE, font => FIELD_FONT_FAMILY, bottom => FIELD_BOTTOM_BORDER, bottom_color => FIELD_BOTTOM_BORDER_COLOR, align => FIELD_ALIGN, text_wrap => FIELD_TEXT_WRAP, num_format => FIELD_NUM_FORMAT, bg_color => FIELD_BG_COLOR)); if (Registry::get('addons.price_list.group_by_category') == "Y") { // Display products according to the categories names. fn_echo(fn_get_lang_var('generating_xls') . '<br />'); // Group the products by categories // Prepare XLS data $categories = fn_get_plain_categories_tree(0, false); foreach ($categories as $category) { if ($category['product_count'] == 0) { continue; } fn_echo('<br />' . $category['category']); $counter->Clear(); // Write category name $worksheet->set_row($row - 1, CATEGORY_NAME_HEIGHT); $worksheet->write($col . $row, array_pad(array(fn_price_list_build_category_name($category['id_path'])), count($selected_fields), ''), $category_heading); $worksheet->set_row($row, FIELD_HEADING_HEIGHT); $row++; foreach ($selected_fields as $field => $active) { if ($field == 'image') { continue; // FIX ME! Some problems with the compability of the Excel format
} if ($mode == 'view') { fn_add_breadcrumb(__('sitemap')); $sitemap_settings = Settings::instance()->getValues('Sitemap'); Registry::get('view')->assign('sitemap_settings', $sitemap_settings); if ($sitemap_settings['show_cats'] == 'Y') { if ($sitemap_settings['show_rootcats_only'] == 'Y') { $categories = fn_get_plain_categories_tree(0, true); $sitemap['categories'] = array(); foreach ($categories as $c) { if ($c['level'] == 0) { $sitemap['categories'][] = $c; } } } else { $sitemap['categories_tree'] = fn_get_plain_categories_tree(0, true); } } if ($sitemap_settings['show_site_info'] == 'Y') { $_params = array('get_tree' => 'plain', 'status' => 'A', 'simple' => true); list($sitemap['pages_tree']) = fn_get_pages($_params); } $section_fields = array('s.*', '?:common_descriptions.object as section'); $section_tables = array('?:sitemap_sections AS s'); $section_left_joins = array(db_quote('?:common_descriptions ON s.section_id = ?:common_descriptions.object_id AND ?:common_descriptions.object_holder = "sitemap_sections" AND ?:common_descriptions.lang_code = ?s', CART_LANGUAGE)); $section_conditions = array(db_quote('status = ?s', 'A')); $section_orders = array('s.position'); fn_set_hook('sitemap_get_sections', $section_fields, $section_tables, $section_left_joins, $section_conditions, $section_orders); $custom_sections = db_get_array('SELECT ' . implode(', ', $section_fields) . ' FROM ' . implode(', ', $section_tables) . ' LEFT JOIN ' . implode(', ', $section_left_joins) . ' WHERE ' . implode(' AND ', $section_conditions) . ' ORDER BY ' . implode(', ', $section_orders)); foreach ($custom_sections as $k => $section) { $links = db_get_array("SELECT link_id, link_href, section_id, status, position, link_type, description, object as link FROM ?:sitemap_links LEFT JOIN ?:common_descriptions ON ?:common_descriptions.object_id = ?:sitemap_links.link_id AND ?:common_descriptions.object_holder = 'sitemap_links' AND ?:common_descriptions.lang_code = ?s WHERE section_id = ?i ORDER BY position, link", CART_LANGUAGE, $section['section_id']);
} $banners['groups'][$k]['groups'] = fn_get_group_data($banner['group_id']); if ($banners['groups'][$k]['groups']['status'] == 'D') { unset($banners['groups'][$k]); continue; } if (!empty($banners['groups'][$k]['groups']['product_ids'])) { $banners['groups'][$k]['groups']['products'] = fn_get_product_name($banners['groups'][$k]['groups']['product_ids']); } } } // [/Groups banners] } if ($selected_section == 'categories') { // [Categoties banners] $all_categories_list = fn_get_plain_categories_tree(0, false); $view->assign('all_categories_list', $all_categories_list); $banners['categories'] = fn_get_aff_banners($_REQUEST['banner_type'], 'C', true); // [/Categoties banners] } if ($selected_section == 'products') { // [Products banners] $banners['products'] = fn_get_aff_banners($_REQUEST['banner_type'], 'P', true); // [/Products banners] } if ($selected_section == 'url') { // [Products banners] $banners['url'] = fn_get_aff_banners($_REQUEST['banner_type'], 'U', true); // [/Products banners] } $js_banners = array();
function content_55d3121dab33e1_00340469($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.truncate.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('find_results_with', 'any_words', 'all_words', 'exact_phrase', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_in_category', 'all_categories', 'all_categories', 'search_in_subcategories', 'advanced_search_options', 'search_by_vendor', 'all_vendors', 'search_by_sku', 'search_by_price', 'search_by_weight', 'or', 'reset', 'search_options', 'find_results_with', 'any_words', 'all_words', 'exact_phrase', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_in_category', 'all_categories', 'all_categories', 'search_in_subcategories', 'advanced_search_options', 'search_by_vendor', 'all_vendors', 'search_by_sku', 'search_by_price', 'search_by_weight', 'or', 'reset', 'search_options')); 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(); $_smarty_tpl->_capture_stack[0][] = array("section", null, null); ob_start(); ?> <div class="ls_advanced_search_form_container"> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " name="advanced_search_form" method="get" class="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="hidden" name="search_performed" value="Y" /> <?php if ($_smarty_tpl->tpl_vars['put_request_vars']->value) { ?> <?php $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["v"]->_loop = false; $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable(); $_from = $_REQUEST; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) { $_smarty_tpl->tpl_vars["v"]->_loop = true; $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key; ?> <?php if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") { ?> <input type="hidden" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> <?php } ?> <?php } ?> <?php echo $_smarty_tpl->tpl_vars['search_extra']->value; ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_query_input")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_query_input"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="ls_simple_search_options span6"> <div class="ty-control-group"> <label for="match" class="ty-control-group__title"><?php echo $_smarty_tpl->__("find_results_with"); ?> </label> <select name="match" id="match"> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "any") { ?> selected="selected"<?php } ?> value="any"><?php echo $_smarty_tpl->__("any_words"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "all") { ?> selected="selected"<?php } ?> value="all"><?php echo $_smarty_tpl->__("all_words"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "exact") { ?> selected="selected"<?php } ?> value="exact"><?php echo $_smarty_tpl->__("exact_phrase"); ?> </option> </select> <input type="text" name="q" size="38" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8'); ?> " class="ty-search-form__input ty-search-form__input-large" /> </div> <div class="ty-control-group"> <label class="ty-control-group__title"><?php echo $_smarty_tpl->__("search_in"); ?> </label> <div class="ty-select-field"> <input type="hidden" name="pname" value="N" /> <input type="hidden" name="ls_cname" value="N" /> <label for="pname" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['pname']) { ?> checked="checked"<?php } ?> name="pname" id="pname" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("product_name"); ?> </label> <label for="pshort" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") { ?> checked="checked"<?php } ?> name="pshort" id="pshort" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("short_description"); ?> </label> <label for="pfull" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") { ?> checked="checked"<?php } ?> name="pfull" id="pfull" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("full_description"); ?> </label> <label for="pkeywords" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") { ?> checked="checked"<?php } ?> name="pkeywords" id="pkeywords" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("keywords"); ?> </label> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_in"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_in"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_query_input"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <div class="ty-control-group"> <label class="ty-control-group__title"><?php echo $_smarty_tpl->__("search_in_category"); ?> </label> <?php if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['cid']) { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0); ?> <?php } else { ?> <div class="ty-float-left"> <?php $_smarty_tpl->tpl_vars["all_categories"] = new Smarty_variable(fn_get_plain_categories_tree(0, false), null, 0); ?> <select name="cid"> <option value="0" <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") { ?> selected<?php } ?> >- <?php echo $_smarty_tpl->__("all_categories"); ?> -</option> <?php $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["cat"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['all_categories']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) { $_smarty_tpl->tpl_vars["cat"]->_loop = true; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) { ?> disabled="disabled"<?php } if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) { ?> selected="selected"<?php } ?> title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo preg_replace('!^!m', str_repeat("¦ ", $_smarty_tpl->tpl_vars['cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true), 50, "...", true)); ?> </option> <?php } ?> </select> </div> <?php } ?> <div class="ty-select-field ty-subcategories-field clearfix"> <input type="hidden" name="subcats" value="N" /> <label for="subcats" class="ty-select-field__label"> <input type="checkbox" value="Y"<?php if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) { ?> checked="checked"<?php } ?> name="subcats" id="subcats" class="checkbox ty-select-field__checkbox" /> <?php echo $_smarty_tpl->__("search_in_subcategories"); ?> </label> </div> </div> </div> <?php if (!$_smarty_tpl->tpl_vars['simple_search_form']->value) { ?> <div class="ls_advanced_search_options span5"> <div class="ty-control-group__title"><?php echo $_smarty_tpl->__("advanced_search_options"); ?> </div> <div class="ty-control-group"> <input type="hidden" name="company_id" id="company_id" value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['company_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8'); ?> " /> <?php if (fn_allowed_for("MULTIVENDOR")) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('label' => __("search_by_vendor"), 'data_url' => "companies.get_companies_list?show_all=Y&search=Y", 'text' => ($tmp = @fn_get_company_name($_smarty_tpl->tpl_vars['search']->value['company_id'])) === null || $tmp === '' ? $_smarty_tpl->__("all_vendors") : $tmp, 'result_elm' => "company_id", 'id' => "company_id_selector"), 0); ?> <?php } ?> </div> <div class="ty-control-group"> <label for="pcode" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_sku"); ?> </label> <input type="text" name="pcode" id="pcode" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(0, null, 0); ?> <?php $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["ff"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter_features']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) { $_smarty_tpl->tpl_vars["ff"]->_loop = true; if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "P") { $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(1, null, 0); } } ?> <?php if (!$_smarty_tpl->tpl_vars['have_price_filter']->value) { ?> <div class="ty-control-group"> <label for="price_from" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_price"); ?> (<?php echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol']; ?> )</label> <input type="text" name="price_from" id="price_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> - <input type="text" name="price_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php } ?> <div class="ty-control-group"> <label for="weight_from" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_weight"); ?> (<?php if ($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8'); } ?> )</label> <input type="text" name="weight_from" id="weight_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> - <input type="text" name="weight_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php echo $_smarty_tpl->getSubTemplate("views/products/components/product_filters_advanced_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> </div> <div class="ty-search-form__buttons-container buttons-container ls_search_page_buttons span12"> <?php echo $_smarty_tpl->getSubTemplate("buttons/search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_smarty_tpl->tpl_vars['dispatch']->value . "]"), 0); ?> <?php echo $_smarty_tpl->__("or"); ?> <a class="ty-btn ty-btn__tertiary cm-reset-link"><?php echo $_smarty_tpl->__("reset"); ?> </a> </div> </form> </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 echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("search_options"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'class' => "ty-search-form"), 0); ?> <?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/products_search_form.tpl" id="<?php echo smarty_function_set_id(array('name' => "views/products/components/products_search_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 { $_smarty_tpl->_capture_stack[0][] = array("section", null, null); ob_start(); ?> <div class="ls_advanced_search_form_container"> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " name="advanced_search_form" method="get" class="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="hidden" name="search_performed" value="Y" /> <?php if ($_smarty_tpl->tpl_vars['put_request_vars']->value) { ?> <?php $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["v"]->_loop = false; $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable(); $_from = $_REQUEST; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) { $_smarty_tpl->tpl_vars["v"]->_loop = true; $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key; ?> <?php if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") { ?> <input type="hidden" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> <?php } ?> <?php } ?> <?php echo $_smarty_tpl->tpl_vars['search_extra']->value; ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_query_input")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_query_input"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="ls_simple_search_options span6"> <div class="ty-control-group"> <label for="match" class="ty-control-group__title"><?php echo $_smarty_tpl->__("find_results_with"); ?> </label> <select name="match" id="match"> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "any") { ?> selected="selected"<?php } ?> value="any"><?php echo $_smarty_tpl->__("any_words"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "all") { ?> selected="selected"<?php } ?> value="all"><?php echo $_smarty_tpl->__("all_words"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['match'] == "exact") { ?> selected="selected"<?php } ?> value="exact"><?php echo $_smarty_tpl->__("exact_phrase"); ?> </option> </select> <input type="text" name="q" size="38" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8'); ?> " class="ty-search-form__input ty-search-form__input-large" /> </div> <div class="ty-control-group"> <label class="ty-control-group__title"><?php echo $_smarty_tpl->__("search_in"); ?> </label> <div class="ty-select-field"> <input type="hidden" name="pname" value="N" /> <input type="hidden" name="ls_cname" value="N" /> <label for="pname" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['pname']) { ?> checked="checked"<?php } ?> name="pname" id="pname" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("product_name"); ?> </label> <label for="pshort" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") { ?> checked="checked"<?php } ?> name="pshort" id="pshort" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("short_description"); ?> </label> <label for="pfull" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") { ?> checked="checked"<?php } ?> name="pfull" id="pfull" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("full_description"); ?> </label> <label for="pkeywords" class="ty-select-field__label"> <input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") { ?> checked="checked"<?php } ?> name="pkeywords" id="pkeywords" class="checkbox ty-select-field__checkbox" /><?php echo $_smarty_tpl->__("keywords"); ?> </label> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_in"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_in"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_query_input"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <div class="ty-control-group"> <label class="ty-control-group__title"><?php echo $_smarty_tpl->__("search_in_category"); ?> </label> <?php if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['cid']) { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0); ?> <?php } else { ?> <div class="ty-float-left"> <?php $_smarty_tpl->tpl_vars["all_categories"] = new Smarty_variable(fn_get_plain_categories_tree(0, false), null, 0); ?> <select name="cid"> <option value="0" <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") { ?> selected<?php } ?> >- <?php echo $_smarty_tpl->__("all_categories"); ?> -</option> <?php $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["cat"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['all_categories']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) { $_smarty_tpl->tpl_vars["cat"]->_loop = true; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) { ?> disabled="disabled"<?php } if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) { ?> selected="selected"<?php } ?> title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo preg_replace('!^!m', str_repeat("¦ ", $_smarty_tpl->tpl_vars['cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true), 50, "...", true)); ?> </option> <?php } ?> </select> </div> <?php } ?> <div class="ty-select-field ty-subcategories-field clearfix"> <input type="hidden" name="subcats" value="N" /> <label for="subcats" class="ty-select-field__label"> <input type="checkbox" value="Y"<?php if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) { ?> checked="checked"<?php } ?> name="subcats" id="subcats" class="checkbox ty-select-field__checkbox" /> <?php echo $_smarty_tpl->__("search_in_subcategories"); ?> </label> </div> </div> </div> <?php if (!$_smarty_tpl->tpl_vars['simple_search_form']->value) { ?> <div class="ls_advanced_search_options span5"> <div class="ty-control-group__title"><?php echo $_smarty_tpl->__("advanced_search_options"); ?> </div> <div class="ty-control-group"> <input type="hidden" name="company_id" id="company_id" value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['company_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8'); ?> " /> <?php if (fn_allowed_for("MULTIVENDOR")) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('label' => __("search_by_vendor"), 'data_url' => "companies.get_companies_list?show_all=Y&search=Y", 'text' => ($tmp = @fn_get_company_name($_smarty_tpl->tpl_vars['search']->value['company_id'])) === null || $tmp === '' ? $_smarty_tpl->__("all_vendors") : $tmp, 'result_elm' => "company_id", 'id' => "company_id_selector"), 0); ?> <?php } ?> </div> <div class="ty-control-group"> <label for="pcode" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_sku"); ?> </label> <input type="text" name="pcode" id="pcode" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(0, null, 0); ?> <?php $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["ff"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter_features']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) { $_smarty_tpl->tpl_vars["ff"]->_loop = true; if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "P") { $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(1, null, 0); } } ?> <?php if (!$_smarty_tpl->tpl_vars['have_price_filter']->value) { ?> <div class="ty-control-group"> <label for="price_from" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_price"); ?> (<?php echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol']; ?> )</label> <input type="text" name="price_from" id="price_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> - <input type="text" name="price_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php } ?> <div class="ty-control-group"> <label for="weight_from" class="ty-select-field__label"><?php echo $_smarty_tpl->__("search_by_weight"); ?> (<?php if ($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8'); } ?> )</label> <input type="text" name="weight_from" id="weight_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> - <input type="text" name="weight_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="ty-search-form__input" size="30" /> </div> <?php echo $_smarty_tpl->getSubTemplate("views/products/components/product_filters_advanced_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> </div> <div class="ty-search-form__buttons-container buttons-container ls_search_page_buttons span12"> <?php echo $_smarty_tpl->getSubTemplate("buttons/search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_smarty_tpl->tpl_vars['dispatch']->value . "]"), 0); ?> <?php echo $_smarty_tpl->__("or"); ?> <a class="ty-btn ty-btn__tertiary cm-reset-link"><?php echo $_smarty_tpl->__("reset"); ?> </a> </div> </form> </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 echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("search_options"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'class' => "ty-search-form"), 0); ?> <?php } }
function content_55ccecb4b64bd2_27511562($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.truncate.php'; } fn_preload_lang_vars(array('search', 'find_results_with', 'price', 'search_in_category', 'all_categories', 'all_categories', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_by_product_filters', 'search_by_product_features', 'search_by_sku', 'popularity', 'ttc_popularity', 'subcategories', 'shipping_freight', 'weight', 'quantity', 'free_shipping', 'yes', 'no', 'status', 'active', 'hidden', 'disabled', 'purchased_in_orders', 'no_items', 'sort_by', 'list_price', 'name', 'price', 'sku', 'quantity', 'status', 'desc', 'asc')); if ($_smarty_tpl->tpl_vars['in_popup']->value) { ?> <div class="adv-search"> <div class="group"> <?php } else { ?> <div class="sidebar-row"> <h6><?php echo $_smarty_tpl->__("search"); ?> </h6> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['page_part']->value) { ?> <?php $_smarty_tpl->tpl_vars["_page_part"] = new Smarty_variable("#" . (string) $_smarty_tpl->tpl_vars['page_part']->value, null, 0); } ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); echo htmlspecialchars($_smarty_tpl->tpl_vars['_page_part']->value, ENT_QUOTES, 'UTF-8'); ?> " name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product_search_form_prefix']->value, ENT_QUOTES, 'UTF-8'); ?> search_form" method="get" class="cm-disable-empty <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="hidden" name="type" value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search_type']->value) === null || $tmp === '' ? "simple" : $tmp, ENT_QUOTES, 'UTF-8'); ?> " /> <?php if ($_REQUEST['redirect_url']) { ?> <input type="hidden" name="redirect_url" value="<?php echo htmlspecialchars($_REQUEST['redirect_url'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } if ($_smarty_tpl->tpl_vars['selected_section']->value != '') { ?> <input type="hidden" id="selected_section" name="selected_section" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['put_request_vars']->value) { $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["v"]->_loop = false; $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable(); $_from = $_REQUEST; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) { $_smarty_tpl->tpl_vars["v"]->_loop = true; $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key; if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") { ?> <input type="hidden" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <?php } } } ?> <?php echo $_smarty_tpl->tpl_vars['extra']->value; ?> <?php $_smarty_tpl->_capture_stack[0][] = array("simple_search", null, null); ob_start(); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:simple_search")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:simple_search"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="sidebar-field"> <label><?php echo $_smarty_tpl->__("find_results_with"); ?> </label> <input type="text" name="q" size="20" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8'); ?> " /> </div> <div class="sidebar-field"> <label><?php echo $_smarty_tpl->__("price"); ?> (<?php echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol']; ?> )</label> <input type="text" name="price_from" size="1" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-small" /> - <input type="text" size="1" name="price_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-small" /> </div> <div class="sidebar-field"> <label><?php echo $_smarty_tpl->__("search_in_category"); ?> </label> <?php if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) { ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['cid']) { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('company_ids' => $_smarty_tpl->tpl_vars['picker_selected_companies']->value, 'data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0); ?> <?php } else { ?> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "picker") { ?> <?php $_smarty_tpl->tpl_vars["trunc"] = new Smarty_variable("38", null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["trunc"] = new Smarty_variable("25", null, 0); ?> <?php } ?> <select name="cid"> <option value="0" <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") { ?> selected="selected"<?php } ?> >- <?php echo $_smarty_tpl->__("all_categories"); ?> -</option> <?php $_smarty_tpl->tpl_vars["search_cat"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["search_cat"]->_loop = false; $_from = fn_get_plain_categories_tree(0, false, @constant('CART_LANGUAGE'), $_smarty_tpl->tpl_vars['picker_selected_companies']->value); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars["search_cat"]->index = -1; foreach ($_from as $_smarty_tpl->tpl_vars["search_cat"]->key => $_smarty_tpl->tpl_vars["search_cat"]->value) { $_smarty_tpl->tpl_vars["search_cat"]->_loop = true; $_smarty_tpl->tpl_vars["search_cat"]->index++; $_smarty_tpl->tpl_vars["search_cat"]->first = $_smarty_tpl->tpl_vars["search_cat"]->index === 0; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['search_cat']['first'] = $_smarty_tpl->tpl_vars["search_cat"]->first; ?> <?php if ($_smarty_tpl->tpl_vars['search_cat']->value['store']) { ?> <?php if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['search_cat']['first']) { ?> </optgroup> <?php } ?> <optgroup label="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8'); ?> "> <?php $_smarty_tpl->tpl_vars["close_optgroup"] = new Smarty_variable(true, null, 0); ?> <?php } else { ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search_cat']->value['disabled']) { ?> disabled="disabled"<?php } ?> <?php if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['search_cat']->value['category_id']) { ?> selected="selected"<?php } ?> title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8'); ?> "><?php echo preg_replace('!^!m', str_repeat("¦ ", $_smarty_tpl->tpl_vars['search_cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8', true), $_smarty_tpl->tpl_vars['trunc']->value, "...", true)); ?> </option> <?php } ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['close_optgroup']->value) { ?> </optgroup> <?php } ?> </select> <?php } ?> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:simple_search"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?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 $_smarty_tpl->_capture_stack[0][] = array("advanced_search", null, null); ob_start(); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:advanced_search")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:advanced_search"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="group form-horizontal"> <div class="control-group"> <label><?php echo $_smarty_tpl->__("search_in"); ?> </label> <table width="100%"> <tr class="nowrap"> <td><label for="pname" class="checkbox inline"><input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y") { ?> checked="checked"<?php } ?> name="pname" id="pname" /><?php echo $_smarty_tpl->__("product_name"); ?> </label></td> <td><label for="pshort" class="checkbox inline"><input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") { ?> checked="checked"<?php } ?> name="pshort" id="pshort" /><?php echo $_smarty_tpl->__("short_description"); ?> </label></td> <td><label for="pfull" class="checkbox inline"><input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") { ?> checked="checked"<?php } ?> name="pfull" id="pfull" /><?php echo $_smarty_tpl->__("full_description"); ?> </label></td> <td><label for="pkeywords" class="checkbox inline"><input type="checkbox" value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") { ?> checked="checked"<?php } ?> name="pkeywords" id="pkeywords" /><?php echo $_smarty_tpl->__("keywords"); ?> </label></td> </tr> </table> </div> </div> <div class="group form-horizontal"> <?php if (!fn_allowed_for("ULTIMATE:FREE") && $_smarty_tpl->tpl_vars['filter_items']->value) { ?> <div class="control-group"> <a href="#" class="search-link cm-combination open cm-save-state" id="sw_filter"> <span id="on_filter" class="exicon-expand cm-save-state <?php if ($_COOKIE['filter']) { ?> hidden<?php } ?> "> </span> <span id="off_filter" class="exicon-collapse cm-save-state <?php if (!$_COOKIE['filter']) { ?> hidden<?php } ?> "></span> <?php echo $_smarty_tpl->__("search_by_product_filters"); ?> </a> <div class="controls"> <div id="filter"<?php if (!$_COOKIE['filter']) { ?> class="hidden"<?php } ?> > <?php echo $_smarty_tpl->getSubTemplate("views/products/components/advanced_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('filter_features' => $_smarty_tpl->tpl_vars['filter_items']->value, 'prefix' => "filter_"), 0); ?> </div> </div> </div> <?php } ?> </div> <?php if ($_smarty_tpl->tpl_vars['feature_items']->value) { ?> <div class="group form-horizontal"> <div class="control-group"> <a class="search-link cm-combination nowrap open cm-save-state" id="sw_feature"><span id="on_feature" class="cm-combination cm-save-state <?php if ($_COOKIE['feature']) { ?> hidden<?php } ?> "><span class="exicon-expand"></span></span><span id="off_feature" class="cm-combination cm-save-state <?php if (!$_COOKIE['feature']) { ?> hidden<?php } ?> "><span class="exicon-collapse"></span></span><?php echo $_smarty_tpl->__("search_by_product_features"); ?> </a> <div class="controls"> <div id="feature"<?php if (!$_COOKIE['feature']) { ?> class="hidden"<?php } ?> > <input type="hidden" name="advanced_filter" value="Y" /> <?php echo $_smarty_tpl->getSubTemplate("views/products/components/advanced_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('filter_features' => $_smarty_tpl->tpl_vars['feature_items']->value, 'prefix' => "feature_"), 0); ?> </div> </div> </div> </div> <?php } ?> <div class="row-fluid"> <div class="group span6"> <div class="form-horizontal"> <div class="control-group"> <label for="pcode" class="control-label"><?php echo $_smarty_tpl->__("search_by_sku"); ?> </label> <div class="controls"> <input type="text" name="pcode" id="pcode" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();"/> </div> </div> <div class="control-group"> <label class="control-label" for="popularity_from"><?php echo $_smarty_tpl->__("popularity"); echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_popularity")), 0); ?> </label> <div class="controls"> <input type="text" name="popularity_from" id="popularity_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['popularity_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> - <input type="text" name="popularity_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['popularity_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> </div> </div> <div class="control-group"> <label class="control-label" for="subcats"><?php echo $_smarty_tpl->__("subcategories"); ?> </label> <div class="controls"> <input type="hidden" name="subcats" value="N" /> <input type="checkbox" value="Y"<?php if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) { ?> checked="checked"<?php } ?> name="subcats" id="subcats" /> </div> </div> </div> </div> <div class="group span6 form-horizontal"> <div class="control-group"> <label class="control-label" for="shipping_freight_from"><?php echo $_smarty_tpl->__("shipping_freight"); ?> (<?php echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol']; ?> )</label> <div class="controls"> <input type="text" name="shipping_freight_from" id="shipping_freight_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['shipping_freight_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> - <input type="text" name="shipping_freight_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['shipping_freight_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> </div> </div> <div class="control-group"> <label class="control-label" for="weight_from"><?php echo $_smarty_tpl->__("weight"); ?> (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8'); ?> )</label> <div class="controls"> <input type="text" name="weight_from" id="weight_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> - <input type="text" name="weight_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> </div> </div> <?php $_smarty_tpl->tpl_vars["have_amount_filter"] = new Smarty_variable(0, null, 0); ?> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["ff"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['filter_items']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) { $_smarty_tpl->tpl_vars["ff"]->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "A") { ?> <?php $_smarty_tpl->tpl_vars["have_amount_filter"] = new Smarty_variable(1, null, 0); ?> <?php } ?> <?php } ?> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['have_amount_filter']->value) { ?> <div class="control-group"> <label class="control-label" for="amount_from"><?php echo $_smarty_tpl->__("quantity"); ?> :</label> <div class="controls"> <input type="text" name="amount_from" id="amount_from" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['amount_from'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> - <input type="text" name="amount_to" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['amount_to'], ENT_QUOTES, 'UTF-8'); ?> " onfocus="this.select();" class="input-mini" /> </div> </div> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "companies:products_advanced_search")); $_block_repeat = true; echo smarty_block_hook(array('name' => "companies:products_advanced_search"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if (fn_string_not_empty($_smarty_tpl->tpl_vars['picker_selected_company']->value)) { ?> <input type="hidden" name="company_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['picker_selected_company']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("common/select_vendor.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "companies:products_advanced_search"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> </div> <div class="row-fluid"> <div class="group span6 form-horizontal"> <div class="control-group"> <label class="control-label" for="free_shipping"><?php echo $_smarty_tpl->__("free_shipping"); ?> </label> <div class="controls"> <select name="free_shipping" id="free_shipping"> <option value="">--</option> <option value="Y" <?php if ($_smarty_tpl->tpl_vars['search']->value['free_shipping'] == "Y") { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__("yes"); ?> </option> <option value="N" <?php if ($_smarty_tpl->tpl_vars['search']->value['free_shipping'] == "N") { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__("no"); ?> </option> </select> </div> </div> <div class="control-group"> <label for="status" class="control-label"><?php echo $_smarty_tpl->__("status"); ?> </label> <div class="controls"> <select name="status" id="status"> <option value="">--</option> <option value="A" <?php if ($_smarty_tpl->tpl_vars['search']->value['status'] == "A") { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__("active"); ?> </option> <option value="H" <?php if ($_smarty_tpl->tpl_vars['search']->value['status'] == "H") { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__("hidden"); ?> </option> <option value="D" <?php if ($_smarty_tpl->tpl_vars['search']->value['status'] == "D") { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__("disabled"); ?> </option> </select> </div> </div> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_form")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_form"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_form"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <div class="group span6 form-horizontal"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in_orders")); $_block_repeat = true; echo smarty_block_hook(array('name' => "products:search_in_orders"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="control-group"> <label class="control-label" for="popularity_from"><?php echo $_smarty_tpl->__("purchased_in_orders"); ?> </label> <div class="controls"> <?php echo $_smarty_tpl->getSubTemplate("pickers/orders/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item_ids' => $_smarty_tpl->tpl_vars['search']->value['order_ids'], 'no_item_text' => __("no_items"), 'data_id' => "order_ids", 'input_name' => "order_ids", 'view_mode' => "simple"), 0); ?> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:search_in_orders"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <div class="control-group"> <label class="control-label" for="sort_by"><?php echo $_smarty_tpl->__("sort_by"); ?> </label> <div class="controls"> <select class="input-mini" name="sort_by" id="sort_by"> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "list_price") { ?> selected="selected"<?php } ?> value="list_price"><?php echo $_smarty_tpl->__("list_price"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "product") { ?> selected="selected"<?php } ?> value="product"><?php echo $_smarty_tpl->__("name"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "price") { ?> selected="selected"<?php } ?> value="price"><?php echo $_smarty_tpl->__("price"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "code") { ?> selected="selected"<?php } ?> value="code"><?php echo $_smarty_tpl->__("sku"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "amount") { ?> selected="selected"<?php } ?> value="amount"><?php echo $_smarty_tpl->__("quantity"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "status") { ?> selected="selected"<?php } ?> value="status"><?php echo $_smarty_tpl->__("status"); ?> </option> </select> - <select class="input-mini" name="sort_order" id="sort_order"> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] == "asc") { ?> selected="selected"<?php } ?> value="desc"><?php echo $_smarty_tpl->__("desc"); ?> </option> <option <?php if ($_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] == "desc") { ?> selected="selected"<?php } ?> value="asc"><?php echo $_smarty_tpl->__("asc"); ?> </option> </select> </div> </div> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "products:advanced_search"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?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 echo $_smarty_tpl->getSubTemplate("common/advanced_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('simple_search' => Smarty::$_smarty_vars['capture']['simple_search'], 'advanced_search' => Smarty::$_smarty_vars['capture']['advanced_search'], 'dispatch' => $_smarty_tpl->tpl_vars['dispatch']->value, 'view_type' => "products", 'in_popup' => $_smarty_tpl->tpl_vars['in_popup']->value), 0); ?> </form> <?php if ($_smarty_tpl->tpl_vars['in_popup']->value) { ?> </div></div> <?php } else { ?> </div><hr> <?php } }
function content_55ddd1046232f5_25391883($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } fn_preload_lang_vars(array('information', 'name', 'location', 'root_level', 'location', 'root_level', 'description', 'images', 'text_category_icon', 'text_category_detailed_image', 'seo_meta_data', 'page_title', 'ttc_page_title', 'meta_description', 'meta_keywords', 'availability', 'usergroups', 'ttc_usergroups', 'to_all_subcats', 'position', 'creation_date', 'product_details_view', 'use_custom_view', 'product_columns', 'available_views', 'default_category_view', 'add_subcategory', 'add_product', 'preview', 'view_products', 'delete_this_category', 'categories', 'new_category', 'editing_category')); if ($_smarty_tpl->tpl_vars['category_data']->value['category_id']) { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['category_data']->value['category_id'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0); } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null); ob_start(); ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" name="category_update_form" class="form-horizontal form-edit <?php if (fn_check_form_permissions('')) { ?> cm-hide-inputs<?php } ?> " enctype="multipart/form-data"> <input type="hidden" name="fake" value="1" /> <input type="hidden" name="category_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" name="selected_section" value="<?php echo htmlspecialchars($_REQUEST['selected_section'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null); ob_start(); ?> <div id="content_detailed"> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("information"), 'target' => "#acc_information"), 0); ?> <div id="acc_information" class="collapsed in"> <div class="control-group"> <label for="elm_category_name" class="control-label cm-required"><?php echo $_smarty_tpl->__("name"); ?> :</label> <div class="controls"> <input type="text" name="category_data[category]" id="elm_category_name" size="55" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['category'], ENT_QUOTES, 'UTF-8'); ?> " class="input-large" /> </div> </div> <div class="control-group"> <?php if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) { ?> <label class="control-label cm-required" for="elm_category_parent_id"><?php echo $_smarty_tpl->__("location"); ?> :</label> <div class="controls"> <?php echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "category_data[parent_id]", 'item_ids' => ($tmp = @$_smarty_tpl->tpl_vars['category_data']->value['parent_id']) === null || $tmp === '' ? "0" : $tmp, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("root_level"), 'display_input_id' => "elm_category_parent_id", 'except_id' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> </div> <?php } else { ?> <label class="control-label" for="elm_category_parent_id"><?php echo $_smarty_tpl->__("location"); ?> :</label> <div class="controls"> <select name="category_data[parent_id]" id="elm_category_parent_id"> <option value="0" <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") { ?> selected="selected"<?php } ?> >- <?php echo $_smarty_tpl->__("root_level"); ?> -</option> <?php $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["cat"]->_loop = false; $_from = fn_get_plain_categories_tree(0, false); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars["cat"]->index = -1; foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) { $_smarty_tpl->tpl_vars["cat"]->_loop = true; $_smarty_tpl->tpl_vars["cat"]->index++; $_smarty_tpl->tpl_vars["cat"]->first = $_smarty_tpl->tpl_vars["cat"]->index === 0; $_smarty_tpl->tpl_vars['smarty']->value['foreach']["categories"]['first'] = $_smarty_tpl->tpl_vars["cat"]->first; ?> <?php if (!fn_allowed_for("ULTIMATE")) { ?> <?php if (strpos($_smarty_tpl->tpl_vars['cat']->value['id_path'], (string) $_smarty_tpl->tpl_vars['category_data']->value['id_path'] . "/") === false && $_smarty_tpl->tpl_vars['cat']->value['category_id'] != $_smarty_tpl->tpl_vars['id']->value || !$_smarty_tpl->tpl_vars['id']->value) { ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) { ?> disabled="disabled"<?php } ?> <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) { ?> selected="selected"<?php } ?> ><?php echo preg_replace('!^!m', str_repeat("¦ ", $_smarty_tpl->tpl_vars['cat']->value['level']), htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true)); ?> </option> <?php } ?> <?php } ?> <?php if (fn_allowed_for("ULTIMATE")) { ?> <?php if ($_smarty_tpl->tpl_vars['cat']->value['store']) { ?> <?php if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['categories']['first']) { ?> </optgroup> <?php } ?> <optgroup label="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8'); ?> "> <?php } else { ?> <?php if (strpos($_smarty_tpl->tpl_vars['cat']->value['id_path'], (string) $_smarty_tpl->tpl_vars['category_data']->value['id_path'] . "/") === false && $_smarty_tpl->tpl_vars['cat']->value['category_id'] != $_smarty_tpl->tpl_vars['id']->value || !$_smarty_tpl->tpl_vars['id']->value) { ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) { ?> disabled="disabled"<?php } ?> <?php if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) { ?> selected="selected"<?php } ?> ><?php echo preg_replace('!^!m', str_repeat("¦ ", $_smarty_tpl->tpl_vars['cat']->value['level']), htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true)); ?> </option> <?php } ?> <?php } ?> <?php } ?> <?php } ?> </select> </div> <?php } ?> </div> <div class="control-group"> <label class="control-label" for="elm_category_descr"><?php echo $_smarty_tpl->__("description"); ?> :</label> <div class="controls"> <textarea id="elm_category_descr" name="category_data[description]" cols="55" rows="8" class="input-large cm-wysiwyg input-textarea-long"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['description'], ENT_QUOTES, 'UTF-8'); ?> </textarea> </div> </div> <?php echo $_smarty_tpl->getSubTemplate("common/select_status.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('input_name' => "category_data[status]", 'id' => "elm_category_status", 'obj' => $_smarty_tpl->tpl_vars['category_data']->value, 'hidden' => true), 0); ?> <?php if (fn_allowed_for("ULTIMATE")) { ?> <?php echo $_smarty_tpl->getSubTemplate("views/companies/components/company_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "category_data[company_id]", 'id' => "category_data_company_id", 'selected' => $_smarty_tpl->tpl_vars['category_data']->value['company_id']), 0); ?> <?php } ?> <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("images"); ?> :</label> <div class="controls"> <?php echo $_smarty_tpl->getSubTemplate("common/attach_images.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_name' => "category_main", 'image_object_type' => "category", 'image_pair' => $_smarty_tpl->tpl_vars['category_data']->value['main_pair'], 'image_object_id' => $_smarty_tpl->tpl_vars['id']->value, 'icon_text' => __("text_category_icon"), 'detailed_text' => __("text_category_detailed_image"), 'no_thumbnail' => true), 0); ?> </div> </div> </div> <hr /> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("seo_meta_data"), 'target' => "#acc_seo"), 0); ?> <div id="acc_seo" class="collapsed in"> <div class="control-group"> <label class="control-label" for="elm_category_page_title"><?php echo $_smarty_tpl->__("page_title"); echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_page_title")), 0); ?> :</label> <div class="controls"> <input type="text" name="category_data[page_title]" id="elm_category_page_title" size="55" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['page_title'], ENT_QUOTES, 'UTF-8'); ?> " class="input-large" /> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_meta_description"><?php echo $_smarty_tpl->__("meta_description"); ?> :</label> <div class="controls"> <textarea name="category_data[meta_description]" id="elm_category_meta_description" cols="55" rows="4" class="input-large"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['meta_description'], ENT_QUOTES, 'UTF-8'); ?> </textarea> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_meta_keywords"><?php echo $_smarty_tpl->__("meta_keywords"); ?> :</label> <div class="controls"> <textarea name="category_data[meta_keywords]" id="elm_category_meta_keywords" cols="55" rows="4" class="input-large"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['meta_keywords'], ENT_QUOTES, 'UTF-8'); ?> </textarea> </div> </div> </div> <hr /> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("availability"), 'target' => "#acc_availability"), 0); ?> <div id="acc_availability"> <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("usergroups"); echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_usergroups")), 0); ?> :</label> <div class="controls"> <?php echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "ug_id", 'name' => "category_data[usergroup_ids]", 'usergroups' => fn_get_usergroups("C", @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['category_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0); ?> <label class="checkbox" for="usergroup_to_subcats"><?php echo $_smarty_tpl->__("to_all_subcats"); ?> <input id="usergroup_to_subcats" type="checkbox" name="category_data[usergroup_to_subcats]" value="Y" /> </label> </div> </div> <?php } ?> <div class="control-group"> <label class="control-label" for="elm_category_position"><?php echo $_smarty_tpl->__("position"); ?> :</label> <div class="controls"> <input type="text" name="category_data[position]" id="elm_category_position" size="10" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['position'], ENT_QUOTES, 'UTF-8'); ?> " class="input-text-short" /> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_creation_date"><?php echo $_smarty_tpl->__("creation_date"); ?> :</label> <div class="controls"> <?php echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "elm_category_creation_date", 'date_name' => "category_data[timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['category_data']->value['timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0); ?> </div> </div> <?php echo $_smarty_tpl->getSubTemplate("views/localizations/components/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_from' => $_smarty_tpl->tpl_vars['category_data']->value['localization'], 'data_name' => "category_data[localization]"), 0); ?> </div> </div> <div id="content_views"> <div id="extra"> <div class="control-group"> <label class="control-label" for="elm_category_product_layout"><?php echo $_smarty_tpl->__("product_details_view"); ?> :</label> <div class="controls"> <select id="elm_category_product_layout" name="category_data[product_details_layout]"> <?php $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["item"]->_loop = false; $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable(); $_from = fn_get_product_details_views("category"); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) { $_smarty_tpl->tpl_vars["item"]->_loop = true; $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key; ?> <option <?php if ($_smarty_tpl->tpl_vars['category_data']->value['product_details_layout'] == $_smarty_tpl->tpl_vars['layout']->value) { ?> selected="selected"<?php } ?> value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value, ENT_QUOTES, 'UTF-8'); ?> </option> <?php } ?> </select> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_use_custom_templates"><?php echo $_smarty_tpl->__("use_custom_view"); ?> :</label> <div class="controls"> <input type="hidden" value="N" name="category_data[use_custom_templates]"/> <input type="checkbox" class="cm-toggle-checkbox" value="Y" name="category_data[use_custom_templates]" id="elm_category_use_custom_templates"<?php if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) { ?> checked="checked"<?php } ?> /> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_product_columns"><?php echo $_smarty_tpl->__("product_columns"); ?> :</label> <div class="controls"> <input type="text" name="category_data[product_columns]" id="elm_category_product_columns" size="10" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['product_columns'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-toggle-element" <?php if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) { ?> disabled="disabled"<?php } ?> /> </div> </div> <?php $_smarty_tpl->tpl_vars["layouts"] = new Smarty_variable(fn_get_products_views('', false, false), null, 0); ?> <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("available_views"); ?> :</label> <div class="controls"> <?php $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["item"]->_loop = false; $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['layouts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) { $_smarty_tpl->tpl_vars["item"]->_loop = true; $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key; ?> <label class="checkbox" for="elm_category_layout_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> "><input type="checkbox" class="cm-combo-checkbox cm-toggle-element" name="category_data[selected_layouts][<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> ]" id="elm_category_layout_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'][$_smarty_tpl->tpl_vars['layout']->value] || !$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'] && $_smarty_tpl->tpl_vars['item']->value['active']) { ?> checked="checked"<?php } ?> <?php if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) { ?> disabled="disabled"<?php } ?> /><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['title'], ENT_QUOTES, 'UTF-8'); ?> </label> <?php } ?> </div> </div> <div class="control-group"> <label class="control-label" for="elm_category_default_layout"><?php echo $_smarty_tpl->__("default_category_view"); ?> :</label> <div class="controls"> <select id="elm_category_default_layout" class="cm-combo-select cm-toggle-element" name="category_data[default_layout]" <?php if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) { ?> disabled="disabled"<?php } ?> > <?php $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["item"]->_loop = false; $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['layouts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) { $_smarty_tpl->tpl_vars["item"]->_loop = true; $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key; ?> <?php if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'][$_smarty_tpl->tpl_vars['layout']->value] || !$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'] && $_smarty_tpl->tpl_vars['item']->value['active']) { ?> <option <?php if ($_smarty_tpl->tpl_vars['category_data']->value['default_layout'] == $_smarty_tpl->tpl_vars['layout']->value) { ?> selected="selected"<?php } ?> value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['title'], ENT_QUOTES, 'UTF-8'); ?> </option> <?php } ?> <?php } ?> </select> </div> </div> </div> </div> <div id="content_addons"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:detailed_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "categories:detailed_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "categories:detailed_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:tabs_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "categories:tabs_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "categories:tabs_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/view_tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('url' => "categories.update?category_id="), 0); ?> <?php $_smarty_tpl->tpl_vars['view_uri'] = new Smarty_variable(fn_get_preview_url("categories.view?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, $_smarty_tpl->tpl_vars['category_data']->value, $_smarty_tpl->tpl_vars['auth']->value['user_id']), null, 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:update_tools_list")); $_block_repeat = true; echo smarty_block_hook(array('name' => "categories:update_tools_list"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "categories.add?parent_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("add_subcategory"))); ?> </li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "products.add?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("add_product"))); ?> </li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("preview"), 'href' => $_smarty_tpl->tpl_vars['view_uri']->value)); ?> </li> <li class="divider"></li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "products.manage?cid=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("view_products"))); ?> </li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'class' => "cm-confirm", 'text' => __("delete_this_category"), 'href' => "categories.delete?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value)); ?> </li> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "categories:update_tools_list"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?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 smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'])); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_role' => "submit-link", 'but_target_form' => "category_update_form", 'but_name' => "dispatch[categories.update]", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?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['id']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:tabs_extra")); $_block_repeat = true; echo smarty_block_hook(array('name' => "categories:tabs_extra"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "categories:tabs_extra"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?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(); } echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'group_name' => $_smarty_tpl->tpl_vars['runtime']->value['controller'], 'active_tab' => $_REQUEST['selected_section'], 'track' => true), 0); ?> </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 $_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null); ob_start(); if ($_smarty_tpl->tpl_vars['categories_tree']->value) { ?> <div class="sidebar-row"> <h6><?php echo $_smarty_tpl->__("categories"); ?> </h6> <div class="nested-tree"> <?php echo $_smarty_tpl->getSubTemplate("views/categories/components/categories_links_tree.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('show_all' => false, 'categories_tree' => $_smarty_tpl->tpl_vars['categories_tree']->value), 0); ?> </div> </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['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("new_category"), 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'sidebar_position' => "left", 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons']), 0); ?> <?php } else { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_category"); $_tmp1 = ob_get_clean(); echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'sidebar_position' => "left", 'title' => $_tmp1 . ": " . (string) $_smarty_tpl->tpl_vars['category_data']->value['category'], 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'select_languages' => true, 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons']), 0); ?> <?php } ?> <?php }