function content_55deaa21624ff6_83896300($_smarty_tpl)
    {
        if (!is_callable('smarty_function_script')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
        }
        fn_preload_lang_vars(array('editing_filter', 'edit', 'viewing_filter', 'view', 'no_data', 'new_filter', 'add_filter', 'filters'));
        echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl);
        ?>


<script type="text/javascript">
    var filter_fields = {};
    <?php 
        $_smarty_tpl->tpl_vars['filter_field'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['filter_field']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['filter_fields']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['filter_field']->key => $_smarty_tpl->tpl_vars['filter_field']->value) {
            $_smarty_tpl->tpl_vars['filter_field']->_loop = true;
            $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['filter_field']->key;
            ?>
    filter_fields['<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['key']->value, ENT_QUOTES, 'UTF-8');
            ?>
'] = '<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['filter_field']->value['slider'], ENT_QUOTES, 'UTF-8');
            ?>
';
    <?php 
        }
        ?>


function fn_check_product_filter_type(value, tab_id, id)
{
    var $ = Tygh.$;
    $('#' + tab_id).toggleBy(!(value.indexOf('R') == 0) && !(value.indexOf('D') == 0));
    $('[id^=inputs_ranges' + id + ']').toggleBy((value.indexOf('D') == 0));
    $('[id^=dates_ranges' + id + ']').toggleBy(!(value.indexOf('D') == 0));
    $('#round_to_' + id + '_container').toggleBy(!filter_fields[value.replace(/\w+-/, '')]);
    $('#display_count_' + id + '_container').toggleBy(!(value.indexOf('R') == 0) && !(value.indexOf('F') == 0) && !(value.indexOf('S') > 0));
    $('#display_more_count_' + id + '_container').toggleBy(!(value.indexOf('R') == 0) && !(value.indexOf('F') == 0) && !(value.indexOf('S') > 0));
}
</script>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_type' => "filters"), 0);
        ?>


<?php 
        $_smarty_tpl->tpl_vars["r_url"] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0);
        ?>

<div class="items-container<?php 
        if (fn_check_form_permissions('')) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
" id="manage_filters_list">
<table width="100%" class="table table-middle table-objects">
<tbody>

<?php 
        $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["filter"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['filters']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
            $_smarty_tpl->tpl_vars["filter"]->_loop = true;
            ?>
    
    <?php 
            if (fn_allow_save_object($_smarty_tpl->tpl_vars['filter']->value, "product_filters")) {
                ?>
        <?php 
                ob_start();
                echo $_smarty_tpl->__("editing_filter");
                $_tmp1 = ob_get_clean();
                echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['filter']->value['filter_id'], 'show_id' => true, 'details' => $_smarty_tpl->tpl_vars['filter']->value['filter_description'], 'text' => $_smarty_tpl->tpl_vars['filter']->value['filter'], 'status' => $_smarty_tpl->tpl_vars['filter']->value['status'], 'href' => "product_filters.update?filter_id=" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "filter_id", 'href_delete' => "product_filters.delete?filter_id=" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'], 'delete_target_id' => "pagination_contents", 'table' => "product_filters", 'no_table' => true, 'additional_class' => "cm-no-hide-input", 'header_text' => $_tmp1 . ": " . (string) $_smarty_tpl->tpl_vars['filter']->value['filter'], 'link_text' => __("edit"), 'company_object' => $_smarty_tpl->tpl_vars['filter']->value), 0);
                ?>

    <?php 
            } else {
                ?>
        <?php 
                ob_start();
                echo $_smarty_tpl->__("viewing_filter");
                $_tmp2 = ob_get_clean();
                echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['filter']->value['filter_id'], 'show_id' => true, 'details' => $_smarty_tpl->tpl_vars['filter']->value['filter_description'], 'text' => $_smarty_tpl->tpl_vars['filter']->value['filter'], 'status' => $_smarty_tpl->tpl_vars['filter']->value['status'], 'href' => "product_filters.update?filter_id=" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "filter_id", 'table' => "product_filters", 'no_table' => true, 'additional_class' => '', 'header_text' => $_tmp2 . ":&nbsp;" . (string) $_smarty_tpl->tpl_vars['filter']->value['filter'], 'link_text' => __("view"), 'non_editable' => true, 'is_view_link' => true, 'company_object' => $_smarty_tpl->tpl_vars['filter']->value), 0);
                ?>

    <?php 
            }
            ?>

<?php 
        }
        if (!$_smarty_tpl->tpl_vars["filter"]->_loop) {
            ?>

    <p class="no-items"><?php 
            echo $_smarty_tpl->__("no_data");
            ?>
</p>

<?php 
        }
        ?>
</tbody>
</table>
<!--manage_filters_list--></div>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object_type' => "filters"), 0);
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("adv_buttons", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->_capture_stack[0][] = array("add_new_picker", null, null);
        ob_start();
        ?>
        <?php 
        echo $_smarty_tpl->getSubTemplate("views/product_filters/update.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('filter' => array()), 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 (!fn_allowed_for("MULTIVENDOR") || !$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && fn_allowed_for("MULTIVENDOR")) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "add_product_filter", 'text' => __("new_filter"), 'content' => Smarty::$_smarty_vars['capture']['add_new_picker'], 'title' => __("add_filter"), 'act' => "general", 'icon' => "icon-plus"), 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 
        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();
        echo $_smarty_tpl->getSubTemplate("common/saved_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "product_filters.manage", 'view_type' => "product_filters"), 0);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("views/product_filters/components/product_filters_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "product_filters.manage"), 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 
        echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("filters"), 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons'], 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'select_languages' => true), 0);
    }
    function content_55e61f9ae0ca45_28054294($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_function_math')) {
            include '/var/www/html/market/app/lib/vendor/smarty/smarty/libs/plugins/function.math.php';
        }
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        if (!is_callable('smarty_modifier_in_array')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.in_array.php';
        }
        fn_preload_lang_vars(array('information', 'name', 'text_ult_product_store_field_tooltip', 'categories', 'tt_views_products_update_categories', 'price', 'full_description', 'edit_content_on_site', 'images', 'text_product_thumbnail', 'text_product_detailed_image', 'options_settings', 'options_type', 'simultaneous', 'sequential', 'exceptions_type', 'forbidden', 'allowed', 'pricing_inventory', 'sku', 'list_price', 'tt_views_products_update_list_price', 'in_stock', 'edit', 'zero_price_action', 'zpa_refuse', 'zpa_permit', 'zpa_ask_price', 'inventory', 'tt_views_products_update_inventory', 'track_with_options', 'track_without_options', 'dont_track', 'min_order_qty', 'max_order_qty', 'quantity_step', 'list_quantity_count', 'taxes', 'availability', 'usergroups', 'creation_date', 'available_since', 'out_of_stock_actions', 'tt_views_products_update_out_of_stock_actions', 'none', 'buy_in_advance', 'sign_up_for_notification', 'extra', 'product_details_view', 'feature_comparison', 'downloadable', 'edp_enable_shipping', 'time_unlimited_download', 'short_description', 'popularity', 'ttc_popularity', 'search_words', 'promo_text', 'additional_images', 'sort_images', 'sort', 'additional_thumbnail', 'additional_popup_larger_image', 'text_additional_thumbnail', 'text_additional_detailed_image', 'additional_thumbnail', 'additional_popup_larger_image', 'text_additional_thumbnail', 'text_additional_detailed_image', 'seo_meta_data', 'page_title', 'ttc_page_title', 'meta_description', 'meta_keywords', 'preview', 'clone', 'delete', 'editing_product', 'new_product'));
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        ?>

    <?php 
        $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null);
        ob_start();
        ?>
        

        <?php 
        $_smarty_tpl->tpl_vars["categories_company_id"] = new Smarty_variable($_smarty_tpl->tpl_vars['product_data']->value['company_id'], null, 0);
        ?>
        <?php 
        $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['product_data']->value, "product"), null, 0);
        ?>

        <?php 
        if (fn_allowed_for("ULTIMATE")) {
            ?>
            <?php 
            $_smarty_tpl->tpl_vars["categories_company_id"] = new Smarty_variable('', null, 0);
            ?>
            <?php 
            if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['shared_product'] == "Y" && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
                ?>
                <?php 
                $_smarty_tpl->tpl_vars["no_hide_input_if_shared_product"] = new Smarty_variable("cm-no-hide-input", null, 0);
                ?>
            <?php 
            }
            ?>

            <?php 
            if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['shared_product'] == "Y") {
                ?>
                <?php 
                $_smarty_tpl->tpl_vars["show_update_for_all"] = new Smarty_variable(true, null, 0);
                ?>
            <?php 
            }
            ?>
        <?php 
        }
        ?>

        <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['product_id']) {
            ?>
            <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['product_data']->value['product_id'], null, 0);
            ?>
        <?php 
        } else {
            ?>
            <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
            ?>
        <?php 
        }
        ?>
        <form id='form' action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" method="post" name="product_update_form" class="form-horizontal form-edit  cm-disable-empty-files <?php 
        if (fn_check_form_permissions('') || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['shared_product'] == "Y" && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
" enctype="multipart/form-data"> 
            <input type="hidden" name="fake" value="1" />
            <input type="hidden" class="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="selected_section" id="selected_section" value="<?php 
        echo htmlspecialchars($_REQUEST['selected_section'], ENT_QUOTES, 'UTF-8');
        ?>
" />
            <input type="hidden" class="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="product_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />

            

            <div class="product-manage" 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="collapse in">

                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label for="product_description_product" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("name");
        ?>
</label>
                        <div class="controls">
                            <input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['product'], ENT_QUOTES, 'UTF-8');
        ?>
" />
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => 'product', 'name' => "update_all_vendors[product]"), 0);
        ?>

                        </div>
                    </div>

                    <?php 
        $_smarty_tpl->tpl_vars["result_ids"] = new Smarty_variable("product_categories", null, 0);
        ?>

                    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "companies:product_details_fields"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "companies:product_details_fields"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

                    <?php 
            if (fn_allowed_for("MULTIVENDOR") && $_smarty_tpl->tpl_vars['mode']->value != "add") {
                ?>
                        <?php 
                $_smarty_tpl->tpl_vars["reload_form"] = new Smarty_variable(true, null, 0);
                ?>
                    <?php 
            }
            ?>

                    <?php 
            if (fn_allowed_for("ULTIMATE")) {
                ?>
                        <?php 
                $_smarty_tpl->tpl_vars["companies_tooltip"] = new Smarty_variable($_smarty_tpl->__("text_ult_product_store_field_tooltip"), null, 0);
                ?>
                    <?php 
            }
            ?>

                    <?php 
            echo $_smarty_tpl->getSubTemplate("views/companies/components/company_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "product_data[company_id]", 'id' => "product_data_company_id", 'selected' => $_smarty_tpl->tpl_vars['product_data']->value['company_id'], 'tooltip' => $_smarty_tpl->tpl_vars['companies_tooltip']->value, 'reload_form' => $_smarty_tpl->tpl_vars['reload_form']->value), 0);
            ?>


                    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "companies:product_details_fields"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


                    <input type="hidden" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['result_ids']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="result_ids">

                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
" id="product_categories">
                        <?php 
        echo smarty_function_math(array('equation' => "rand()", 'assign' => "rnd"), $_smarty_tpl);
        ?>

                        <?php 
        if ($_REQUEST['category_id']) {
            ?>
                            <?php 
            $_smarty_tpl->tpl_vars["request_category_id"] = new Smarty_variable(explode(",", $_REQUEST['category_id']), null, 0);
            ?>
                        <?php 
        } else {
            ?>
                            <?php 
            $_smarty_tpl->tpl_vars["request_category_id"] = new Smarty_variable('', null, 0);
            ?>
                        <?php 
        }
        ?>
                        <label for="ccategories_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['rnd']->value, ENT_QUOTES, 'UTF-8');
        ?>
_ids" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("categories");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_products_update_categories")), 0);
        ?>
</label>
                        <div class="controls">
                            <?php 
        echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('hide_input' => $_smarty_tpl->tpl_vars['product_data']->value['shared_product'], 'company_ids' => $_smarty_tpl->tpl_vars['product_data']->value['company_id'], 'rnd' => $_smarty_tpl->tpl_vars['rnd']->value, 'data_id' => "categories", 'input_name' => "product_data[category_ids]", 'radio_input_name' => "product_data[main_category]", 'main_category' => $_smarty_tpl->tpl_vars['product_data']->value['main_category'], 'item_ids' => ($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['category_ids']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['request_category_id']->value : $tmp, 'hide_link' => true, 'hide_delete_button' => true, 'display_input_id' => "category_ids", 'disable_no_item_text' => true, 'view_mode' => "list", 'but_meta' => "btn"), 0);
        ?>

                        </div>
                    <!--product_categories--></div>

                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label for="elm_price_price" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("price");
        ?>
 (<?php 
        echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
        ?>
):</label>
                        <div class="controls">
                            <input type="text" name="product_data[price]" id="elm_price_price" size="10" value="<?php 
        echo htmlspecialchars(fn_format_price(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['price']) === null || $tmp === '' ? "0.00" : $tmp, $_smarty_tpl->tpl_vars['primary_currency']->value, null, false), ENT_QUOTES, 'UTF-8');
        ?>
" class="input-long" />
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => 'price', 'name' => "update_all_vendors[price]"), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group cm-no-hide-input">
                        <label class="control-label" for="elm_product_full_descr"><?php 
        echo $_smarty_tpl->__("full_description");
        ?>
:</label>
                        <div class="controls">
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => 'full_description', 'name' => "update_all_vendors[full_description]"), 0);
        ?>

                            <textarea id="elm_product_full_descr" name="product_data[full_description]" cols="55" rows="8" class="cm-wysiwyg input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['full_description'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>

                            <?php 
        if ($_smarty_tpl->tpl_vars['view_uri']->value) {
            ?>
                                <?php 
            ob_start();
            echo htmlspecialchars(urlencode($_smarty_tpl->tpl_vars['view_uri']->value), ENT_QUOTES, 'UTF-8');
            $_tmp1 = ob_get_clean();
            ob_start();
            if (fn_allowed_for("ULTIMATE")) {
                echo "&switch_company_id=";
                echo (string) $_smarty_tpl->tpl_vars['product_data']->value['company_id'];
            }
            $_tmp2 = ob_get_clean();
            echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_href' => "customization.update_mode?type=live_editor&status=enable&frontend_url=" . $_tmp1 . $_tmp2, 'but_text' => __("edit_content_on_site"), 'but_role' => "action", 'but_meta' => "btn-small btn-live-edit cm-post", 'but_target' => "_blank"), 0);
            ?>

                            <?php 
        }
        ?>
                        </div>
                    </div>
                    

                    <?php 
        echo $_smarty_tpl->getSubTemplate("common/select_status.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('input_name' => "product_data[status]", 'id' => "elm_product_status", 'obj' => $_smarty_tpl->tpl_vars['product_data']->value, 'hidden' => true), 0);
        ?>


                    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:update_detailed_images"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:update_detailed_images"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

                    <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' => "product_main", 'image_object_type' => "product", 'image_pair' => $_smarty_tpl->tpl_vars['product_data']->value['main_pair'], 'icon_text' => __("text_product_thumbnail"), 'detailed_text' => __("text_product_detailed_image"), 'no_thumbnail' => true), 0);
            ?>

                        </div>
                    </div>
                    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:update_detailed_images"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


                </div>

                <hr>

                <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("options_settings"), 'target' => "#acc_options"), 0);
        ?>

                <?php 
        if (fn_allowed_for("ULTIMATE:FREE")) {
            ?>
                    <?php 
            $_smarty_tpl->tpl_vars['promo_class'] = new Smarty_variable("cm-promo-popup", null, 0);
            ?>
                    <?php 
            $_smarty_tpl->tpl_vars['disable_selectors'] = new Smarty_variable(true, null, 0);
            ?>
                <?php 
        }
        ?>

                <div id="acc_options" class="collapse in">
                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['promo_class']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label class="control-label" for="elm_options_type"><?php 
        echo $_smarty_tpl->__("options_type");
        ?>
:</label>
                        <div class="controls">
                            <select class="span3" name="product_data[options_type]" id="elm_options_type" <?php 
        if ($_smarty_tpl->tpl_vars['disable_selectors']->value) {
            ?>
disabled="disabled"<?php 
        }
        ?>
>
                                <option value="P" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['options_type'] == "P") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("simultaneous");
        ?>
</option>
                                <option value="S" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['options_type'] == "S") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("sequential");
        ?>
</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['promo_class']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label class="control-label" for="elm_exceptions_type"><?php 
        echo $_smarty_tpl->__("exceptions_type");
        ?>
:</label>
                        <div class="controls">
                            <select class="span3" name="product_data[exceptions_type]" id="elm_exceptions_type" <?php 
        if ($_smarty_tpl->tpl_vars['disable_selectors']->value) {
            ?>
disabled="disabled"<?php 
        }
        ?>
>
                                <option value="F" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['exceptions_type'] == "F") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("forbidden");
        ?>
</option>
                                <option value="A" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['exceptions_type'] == "A") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("allowed");
        ?>
</option>
                            </select>
                        </div>
                    </div>
                </div>

                <hr>

                <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("pricing_inventory"), 'target' => "#acc_pricing_inventory"), 0);
        ?>

                <div id="acc_pricing_inventory" class="collapse in">
                    <div class="control-group">
                        <label class="control-label" for="elm_product_code"><?php 
        echo $_smarty_tpl->__("sku");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[product_code]" id="elm_product_code" size="20" maxlength="32"  value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['product_code'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-long" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_list_price"><?php 
        echo $_smarty_tpl->__("list_price");
        ?>
 (<?php 
        echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
        ?>
) <?php 
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_products_update_list_price")), 0);
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[list_price]" id="elm_list_price" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['list_price']) === null || $tmp === '' ? "0.00" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-long" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_in_stock"><?php 
        echo $_smarty_tpl->__("in_stock");
        ?>
:</label>
                        <div class="controls">
                            <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
            ?>
                                <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("edit"), 'but_href' => "product_options.inventory?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'but_role' => "edit"), 0);
            ?>

                            <?php 
        } else {
            ?>
                                <input type="text" name="product_data[amount]" id="elm_in_stock" size="10" value="<?php 
            echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['amount']) === null || $tmp === '' ? "1" : $tmp, ENT_QUOTES, 'UTF-8');
            ?>
" class="input-small" />
                            <?php 
        }
        ?>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_zero_price_action"><?php 
        echo $_smarty_tpl->__("zero_price_action");
        ?>
:</label>
                        <div class="controls">
                            <select class="span5" name="product_data[zero_price_action]" id="elm_zero_price_action">
                                <option value="R" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['zero_price_action'] == "R") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("zpa_refuse");
        ?>
</option>
                                <option value="P" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['zero_price_action'] == "P") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("zpa_permit");
        ?>
</option>
                                <option value="A" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['zero_price_action'] == "A") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("zpa_ask_price");
        ?>
</option>
                            </select>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_product_tracking"><?php 
        echo $_smarty_tpl->__("inventory");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_products_update_inventory")), 0);
        ?>
:</label>
                        <div class="controls">
                            <select class="span3" name="product_data[tracking]" id="elm_product_tracking" <?php 
        if ($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "N") {
            ?>
disabled="disabled"<?php 
        }
        ?>
>
                                <?php 
        if ($_smarty_tpl->tpl_vars['product_options']->value) {
            ?>
                                    <option value="<?php 
            echo htmlspecialchars(smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS"), ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS") && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("track_with_options");
            ?>
</option>
                                <?php 
        }
        ?>
                                <option value="<?php 
        echo htmlspecialchars(smarty_modifier_enum("ProductTracking::TRACK_WITHOUT_OPTIONS"), ENT_QUOTES, 'UTF-8');
        ?>
" <?php 
        ob_start();
        echo htmlspecialchars(smarty_modifier_enum("ProductTracking::TRACK_WITHOUT_OPTIONS"), ENT_QUOTES, 'UTF-8');
        $_tmp3 = ob_get_clean();
        if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == $_tmp3 && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("track_without_options");
        ?>
</option>
                                <option value="<?php 
        echo htmlspecialchars(smarty_modifier_enum("ProductTracking::DO_NOT_TRACK"), ENT_QUOTES, 'UTF-8');
        ?>
" <?php 
        ob_start();
        echo htmlspecialchars(smarty_modifier_enum("ProductTracking::DO_NOT_TRACK"), ENT_QUOTES, 'UTF-8');
        $_tmp4 = ob_get_clean();
        if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == $_tmp4 || $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "N") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("dont_track");
        ?>
</option>
                            </select>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_min_qty"><?php 
        echo $_smarty_tpl->__("min_order_qty");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[min_qty]" size="10" id="elm_min_qty" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['min_qty']) === null || $tmp === '' ? "0" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_max_qty"><?php 
        echo $_smarty_tpl->__("max_order_qty");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[max_qty]" id="elm_max_qty" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['max_qty']) === null || $tmp === '' ? "0" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_qty_step"><?php 
        echo $_smarty_tpl->__("quantity_step");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[qty_step]" id="elm_qty_step" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['qty_step']) === null || $tmp === '' ? "0" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_list_qty_count"><?php 
        echo $_smarty_tpl->__("list_quantity_count");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[list_qty_count]" id="elm_list_qty_count" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['list_qty_count']) === null || $tmp === '' ? "0" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label"><?php 
        echo $_smarty_tpl->__("taxes");
        ?>
:</label>
                        <div class="controls">
                            <input type="hidden" name="product_data[tax_ids]" value="" />
                            <?php 
        $_smarty_tpl->tpl_vars["tax"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["tax"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['taxes']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["tax"]->key => $_smarty_tpl->tpl_vars["tax"]->value) {
            $_smarty_tpl->tpl_vars["tax"]->_loop = true;
            ?>
                                <label class="checkbox inline" for="elm_taxes_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['tax_id'], ENT_QUOTES, 'UTF-8');
            ?>
">
                                    <input type="checkbox" name="product_data[tax_ids][<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['tax_id'], ENT_QUOTES, 'UTF-8');
            ?>
]" id="elm_taxes_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['tax_id'], ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if (smarty_modifier_in_array($_smarty_tpl->tpl_vars['tax']->value['tax_id'], $_smarty_tpl->tpl_vars['product_data']->value['tax_ids'])) {
                ?>
checked="checked"<?php 
            }
            ?>
 value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['tax_id'], ENT_QUOTES, 'UTF-8');
            ?>
" />
                                    <?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['tax'], ENT_QUOTES, 'UTF-8');
            ?>
</label>
                                <?php 
        }
        if (!$_smarty_tpl->tpl_vars["tax"]->_loop) {
            ?>
                                &ndash;
                            <?php 
        }
        ?>
                        </div>
                    </div>
                </div>

                <hr>
                <?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" class="collapse in">
                    <?php 
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
                        <div class="control-group">
                            <label class="control-label"><?php 
            echo $_smarty_tpl->__("usergroups");
            ?>
:</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' => "product_data[usergroup_ids]", 'usergroups' => fn_get_usergroups(array("type" => "C", "status" => array("A", "H")), @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['product_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
            ?>

                            </div>
                        </div>
                    <?php 
        }
        ?>

                    <div class="control-group">
                        <label class="control-label" for="elm_date_holder"><?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_date_holder", 'date_name' => "product_data[timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_date_avail_holder"><?php 
        echo $_smarty_tpl->__("available_since");
        ?>
:</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_date_avail_holder", 'date_name' => "product_data[avail_since]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['avail_since']) === null || $tmp === '' ? '' : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_out_of_stock_actions"><?php 
        echo $_smarty_tpl->__("out_of_stock_actions");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_products_update_out_of_stock_actions")), 0);
        ?>
:</label>
                        <div class="controls">
                            <select class="span3" name="product_data[out_of_stock_actions]" id="elm_out_of_stock_actions">
                                <option value="N" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['out_of_stock_actions'] == "N") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("none");
        ?>
</option>
                                <option value="B" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['out_of_stock_actions'] == "B") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("buy_in_advance");
        ?>
</option>
                                <option value="S" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['out_of_stock_actions'] == "S") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("sign_up_for_notification");
        ?>
</option>
                            </select>
                        </div>
                    </div>
                </div>

                <hr>

                <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("extra"), 'target' => "#acc_extra"), 0);
        ?>

                <div id="acc_extra" class="collapse in">
                    <div class="control-group">
                        <label class="control-label" for="elm_details_layout"><?php 
        echo $_smarty_tpl->__("product_details_view");
        ?>
:</label>
                        <div class="controls">
                            <select class="span5" id="elm_details_layout" name="product_data[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($_smarty_tpl->tpl_vars['id']->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;
            ?>
                                    <option <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['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_product_feature_comparison"><?php 
        echo $_smarty_tpl->__("feature_comparison");
        ?>
:</label>
                        <div class="controls">
                            <label class="checkbox">
                                <input type="hidden" name="product_data[feature_comparison]" value="N" />
                                <input type="checkbox" name="product_data[feature_comparison]" id="elm_product_feature_comparison" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['feature_comparison'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
/>
                            </label>
                        </div>
                    </div>

                    <?php 
        if ($_smarty_tpl->tpl_vars['settings']->value['General']['enable_edp'] == "Y") {
            ?>
                    <div class="control-group">
                        <label class="control-label" for="elm_product_is_edp"><?php 
            echo $_smarty_tpl->__("downloadable");
            ?>
:</label>
                        <div class="controls">
                            <label class="checkbox">
                                <input type="hidden" name="product_data[is_edp]" value="N" />
                                <input type="checkbox" name="product_data[is_edp]" id="elm_product_is_edp" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['is_edp'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 onclick="Tygh.$('#edp_shipping').toggleBy(); Tygh.$('#edp_unlimited').toggleBy();"/>
                            </label>
                        </div>
                    </div>

                    <div class="control-group <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['is_edp'] != "Y") {
                ?>
hidden<?php 
            }
            ?>
" id="edp_shipping">
                        <label class="control-label" for="elm_product_edp_shipping"><?php 
            echo $_smarty_tpl->__("edp_enable_shipping");
            ?>
:</label>
                        <div class="controls">
                            <label class="checkbox">
                                <input type="hidden" name="product_data[edp_shipping]" value="N" />
                                <input type="checkbox" name="product_data[edp_shipping]" id="elm_product_edp_shipping" value="Y"<?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['edp_shipping'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 />
                            </label>
                        </div>
                    </div>

                    <div class="control-group <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['is_edp'] != "Y") {
                ?>
hidden<?php 
            }
            ?>
" id="edp_unlimited">
                        <label class="control-label" for="elm_product_edp_unlimited"><?php 
            echo $_smarty_tpl->__("time_unlimited_download");
            ?>
:</label>
                        <div class="controls">
                            <label class="checkbox">
                                <input type="hidden" name="product_data[unlimited_download]" value="N" />
                                <input type="checkbox" name="product_data[unlimited_download]" id="elm_product_edp_unlimited" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['unlimited_download'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 />
                            </label>
                        </div>
                    </div>
                    <?php 
        }
        ?>

                    <?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['product_data']->value['localization'], 'data_name' => "product_data[localization]"), 0);
        ?>


                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label class="control-label" for="elm_product_short_descr"><?php 
        echo $_smarty_tpl->__("short_description");
        ?>
:</label>
                        <div class="controls">
                            <textarea id="elm_product_short_descr" name="product_data[short_description]" cols="55" rows="2" class="cm-wysiwyg input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['short_description'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => "short_description", 'name' => "update_all_vendors[short_description]"), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_product_popularity"><?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="product_data[popularity]" id="elm_product_popularity" size="55" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['popularity']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-long" />
                        </div>
                    </div>

                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label class="control-label" for="elm_product_search_words"><?php 
        echo $_smarty_tpl->__("search_words");
        ?>
:</label>
                        <div class="controls">
                            <textarea name="product_data[search_words]" id="elm_product_search_words" cols="55" rows="2" class="input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['search_words'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => 'search_words', 'name' => "update_all_vendors[search_words]"), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                        <label class="control-label" for="elm_product_promo_text"><?php 
        echo $_smarty_tpl->__("promo_text");
        ?>
:</label>
                        <div class="controls">
                            <textarea id="elm_product_promo_text" name="product_data[promo_text]" cols="55" rows="2" class="cm-wysiwyg input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['promo_text'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
                            <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => "promo_text", 'name' => "update_all_vendors[promo_text]"), 0);
        ?>

                        </div>
                    </div>
                </div>
                <!--content_detailed--></div> 

            

            
            <div id="content_images" class="hidden clearfix"> 
                <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("additional_images")), 0);
        ?>

                <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['image_pairs']) {
            ?>
                    <div class="cm-sortable sortable-box" data-ca-sortable-table="images_links" data-ca-sortable-id-name="pair_id" id="additional_images">
                        <?php 
            $_smarty_tpl->tpl_vars["new_image_position"] = new Smarty_variable("0", null, 0);
            ?>
                        <?php 
            $_smarty_tpl->tpl_vars['pair'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['pair']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['product_data']->value['image_pairs'];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['pair']->key => $_smarty_tpl->tpl_vars['pair']->value) {
                $_smarty_tpl->tpl_vars['pair']->_loop = true;
                ?>
                            <div class="cm-row-item cm-sortable-id-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['pair']->value['pair_id'], ENT_QUOTES, 'UTF-8');
                ?>
 cm-sortable-box">
                                <div class="cm-sortable-handle sortable-bar"><img src="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                ?>
/icon_sort_bar.gif" width="26" height="25" border="0" title="<?php 
                echo $_smarty_tpl->__("sort_images");
                ?>
" alt="<?php 
                echo $_smarty_tpl->__("sort");
                ?>
" class="valign" /></div>
                                <div class="sortable-item">
                                    <?php 
                echo $_smarty_tpl->getSubTemplate("common/attach_images.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_name' => "product_additional", 'image_object_type' => "product", 'image_key' => $_smarty_tpl->tpl_vars['pair']->value['pair_id'], 'image_type' => "A", 'image_pair' => $_smarty_tpl->tpl_vars['pair']->value, 'icon_title' => __("additional_thumbnail"), 'detailed_title' => __("additional_popup_larger_image"), 'icon_text' => __("text_additional_thumbnail"), 'detailed_text' => __("text_additional_detailed_image"), 'delete_pair' => true, 'no_thumbnail' => true), 0);
                ?>

                                </div>
                                <div class="clear"></div>
                            </div>
                            <?php 
                if ($_smarty_tpl->tpl_vars['new_image_position']->value <= $_smarty_tpl->tpl_vars['pair']->value['position']) {
                    ?>
                                <?php 
                    $_smarty_tpl->tpl_vars["new_image_position"] = new Smarty_variable($_smarty_tpl->tpl_vars['pair']->value['position'], null, 0);
                    ?>
                            <?php 
                }
                ?>
                        <?php 
            }
            ?>
                    </div>
                <?php 
        }
        ?>

                <div id="box_new_image">
                    <div class="clear cm-row-item">
                        <input type="hidden" name="product_add_additional_image_data[0][position]" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['new_image_position']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-image-field" />
                        <div class="image-upload-wrap pull-left"><?php 
        echo $_smarty_tpl->getSubTemplate("common/attach_images.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_name' => "product_add_additional", 'image_object_type' => "product", 'image_type' => "A", 'icon_title' => __("additional_thumbnail"), 'detailed_title' => __("additional_popup_larger_image"), 'icon_text' => __("text_additional_thumbnail"), 'detailed_text' => __("text_additional_detailed_image"), 'no_thumbnail' => true), 0);
        ?>
</div>
                        <div class="pull-right"><?php 
        echo $_smarty_tpl->getSubTemplate("buttons/multiple_buttons.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item_id' => "new_image"), 0);
        ?>
</div>
                    </div>
                </div>

            </div> 
            

            
            <div id="content_seo" class="hidden">

                <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:update_seo"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:update_seo"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

                <?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_meta"), 0);
            ?>

                <div id="acc_seo_meta" class="collapse in">
                    <div class="control-group <?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
                        <label class="control-label" for="elm_product_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="product_data[page_title]" id="elm_product_page_title" size="55" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['page_title'], ENT_QUOTES, 'UTF-8');
            ?>
" class="input-large" />
                            <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => "page_title", 'name' => "update_all_vendors[page_title]"), 0);
            ?>

                        </div>
                    </div>

                    <div class="control-group <?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
                        <label class="control-label" for="elm_product_meta_descr"><?php 
            echo $_smarty_tpl->__("meta_description");
            ?>
:</label>
                        <div class="controls">
                            <textarea name="product_data[meta_description]" id="elm_product_meta_descr" cols="55" rows="2" class="input-large"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['meta_description'], ENT_QUOTES, 'UTF-8');
            ?>
</textarea>
                            <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => "meta_description", 'name' => "update_all_vendors[meta_description]"), 0);
            ?>

                        </div>
                    </div>

                    <div class="control-group <?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
                        <label class="control-label" for="elm_product_meta_keywords"><?php 
            echo $_smarty_tpl->__("meta_keywords");
            ?>
:</label>
                        <div class="controls">
                            <textarea name="product_data[meta_keywords]" id="elm_product_meta_keywords" cols="55" rows="2" class="input-large"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['meta_keywords'], ENT_QUOTES, 'UTF-8');
            ?>
</textarea>
                            <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/update_for_all.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('display' => $_smarty_tpl->tpl_vars['show_update_for_all']->value, 'object_id' => "meta_keywords", 'name' => "update_all_vendors[meta_keywords]"), 0);
            ?>

                        </div>
                    </div>
                </div>
                <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:update_seo"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

            </div>
            

            
            <div id="content_shippings" class="hidden"> 
                <?php 
        echo $_smarty_tpl->getSubTemplate("views/products/components/products_shipping_settings.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

            </div> 
            

            
            <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:update_qty_discounts"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:update_qty_discounts"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

            <?php 
            echo $_smarty_tpl->getSubTemplate("views/products/components/products_update_qty_discounts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>

            <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:update_qty_discounts"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

            
            
            <?php 
        echo $_smarty_tpl->getSubTemplate("views/products/components/products_update_features.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('product_id' => $_smarty_tpl->tpl_vars['product_data']->value['product_id']), 0);
        ?>

            


            <div id="content_addons">
                <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:detailed_content"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products: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' => "products: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' => "products:tabs_content"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products: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' => "products: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 
        echo $_smarty_tpl->getSubTemplate("common/view_tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('url' => "products.update?product_id="), 0);
        ?>


                <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
                    <?php 
            $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
            ob_start();
            ?>
                        <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:update_tools_list"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:update_tools_list"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

                            <?php 
                if ($_smarty_tpl->tpl_vars['view_uri']->value) {
                    ?>
                                <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>
                            <?php 
                }
                ?>
                            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("clone"), 'class' => "cm-post", 'href' => "products.clone?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value));
                ?>
</li>
                            <?php 
                if ($_smarty_tpl->tpl_vars['allow_save']->value) {
                    ?>
                                <li><?php 
                    smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm cm-post", 'href' => "products.delete?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value));
                    ?>
</li>
                            <?php 
                }
                ?>
                        <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products: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_name' => "dispatch[products.update]", 'but_target_form' => "product_update_form", '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();
        }
        ?>
            

        </form> 

        <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:tabs_extra"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:tabs_extra"), 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:tabs_extra"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


        <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
            
            <div class="cm-hide-save-button hidden" id="content_options">
                <?php 
            echo $_smarty_tpl->getSubTemplate("views/products/components/products_update_options.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>

            </div>
            

            
            <?php 
            if ($_smarty_tpl->tpl_vars['settings']->value['General']['enable_edp'] == "Y") {
                ?>
            <div id="content_files" class="cm-hide-save-button hidden">
                <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:content_files"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:content_files"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

                <?php 
                    echo $_smarty_tpl->getSubTemplate("views/products/components/products_update_files.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                    ?>

                <?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:content_files"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

            </div>
            <?php 
            }
            ?>
            

            
            <div id="content_subscribers" class="cm-hide-save-button hidden">
                <?php 
            echo $_smarty_tpl->getSubTemplate("views/products/components/product_subscribers.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('product_id' => $_smarty_tpl->tpl_vars['id']->value), 0);
            ?>

            </div>
            
        <?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 
        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);
        ?>


<?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->smarty->_tag_stack[] = array('hook', array('name' => "products:update_mainbox_params"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:update_mainbox_params"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>


<?php 
            if ($_smarty_tpl->tpl_vars['id']->value) {
                ?>
    <?php 
                $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null);
                ob_start();
                ?>
        <?php 
                ob_start();
                echo $_smarty_tpl->__("editing_product");
                $_tmp5 = ob_get_clean();
                echo htmlspecialchars(preg_replace('!<[^>]*?>!', ' ', $_tmp5 . ": " . (string) $_smarty_tpl->tpl_vars['product_data']->value['product']), ENT_QUOTES, 'UTF-8');
                ?>

    <?php 
                list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
                if (!empty($_capture_buffer)) {
                    if (isset($_capture_assign)) {
                        $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                    }
                    if (isset($_capture_append)) {
                        $_smarty_tpl->append($_capture_append, ob_get_contents());
                    }
                    Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
                } else {
                    $_smarty_tpl->capture_error();
                }
            } else {
                ?>
    <?php 
                $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null);
                ob_start();
                ?>
        <?php 
                echo $_smarty_tpl->__("new_product");
                ?>

    <?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 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:update_mainbox_params"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


<?php 
        echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => Smarty::$_smarty_vars['capture']['mainbox_title'], 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'select_languages' => $_smarty_tpl->tpl_vars['id']->value, 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons']), 0);
    }
    function content_55e61f9bd91919_70061537($_smarty_tpl)
    {
        fn_preload_lang_vars(array('email', 'new_subscribers', 'add_subscriber', 'add_subscribers_from_users', 'email', 'no_data'));
        ?>
<div class="btn-toolbar clearfix">
    <?php 
        if ($_smarty_tpl->tpl_vars['product_subscribers']->value) {
            ?>
        <div class="pull-left">
            <?php 
            if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] == $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
                ?>
                <?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "delete_selected", 'icon' => "icon-trash", 'dispatch' => "dispatch[products.update]", 'form' => "subscribers_form"));
                ?>

            <?php 
            }
            ?>
        </div>
    <?php 
        }
        ?>
        <div class="pull-left">
            <?php 
        echo $_smarty_tpl->getSubTemplate("views/products/components/search_product_subscribers.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "products.update", 'search' => $_smarty_tpl->tpl_vars['product_subscribers_search']->value), 0);
        ?>

        </div>
    <?php 
        if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] == $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
            ?>
        
        <div class="pull-right">
            <?php 
            $_smarty_tpl->_capture_stack[0][] = array("new_email_picker", null, null);
            ob_start();
            ?>
                <form action="<?php 
            echo htmlspecialchars(fn_url("products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product_id']->value . "&selected_section=subscribers"), ENT_QUOTES, 'UTF-8');
            ?>
" method="post" name="subscribers_form_0" class=" ">
                    <div class="form-horizontal form-edit cm-tabs-content" id="content_tab_user_details">
                        <div class="control-group">
                            <label for="users_email" class="control-label cm-required cm-email"><?php 
            echo $_smarty_tpl->__("email");
            ?>
</label>
                            <div class="controls">
                                <input type="text" name="add_users_email" id="users_email" value="" class="span8" />
                                <input type="hidden" name="add_users[0]" id="users_id" value="0"/>
                            </div>
                        </div>
                    </div>
                <div class="buttons-container">
                    <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[products.update]", 'cancel_action' => "close"), 0);
            ?>

                </div>
                </form>
            <?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>
            <span class="shift-right">
                <?php 
            echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "add_new_subscribers", 'text' => __("new_subscribers"), 'content' => Smarty::$_smarty_vars['capture']['new_email_picker'], 'link_text' => __("add_subscriber"), 'act' => "general", 'icon' => "icon-plus"), 0);
            ?>

            </span>

            <?php 
            echo $_smarty_tpl->getSubTemplate("pickers/users/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('no_container' => true, 'data_id' => "subscr_user", 'picker_for' => "subscribers", 'extra_var' => "products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product_id']->value . "&selected_section=subscribers", 'but_text' => __("add_subscribers_from_users"), 'view_mode' => "button", 'but_meta' => "btn"), 0);
            ?>


        </div>
    <?php 
        }
        ?>
</div>
<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" method="post" name="subscribers_form" class="<?php 
        if (fn_check_form_permissions('') || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['shared_product'] == "Y" && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
">

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('save_current_page' => true, 'div_id' => "product_subscribers", 'search' => $_smarty_tpl->tpl_vars['product_subscribers_search']->value), 0);
        ?>


<?php 
        if ($_smarty_tpl->tpl_vars['product_subscribers']->value) {
            ?>
<table width="100%" class="table table-middle">
<thead>
    <tr>
    <th class="center" width="1%">
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/check_items.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>
</th>
    <th width="50%"><?php 
            echo $_smarty_tpl->__("email");
            ?>
</th>
    <th>&nbsp;</th>
</tr>
</thead>
<tbody>
    <?php 
            $_smarty_tpl->tpl_vars["s"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["s"]->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['product_subscribers']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["s"]->key => $_smarty_tpl->tpl_vars["s"]->value) {
                $_smarty_tpl->tpl_vars["s"]->_loop = true;
                ?>
    <tr>
        <td class="center">
               <input type="checkbox" name="subscriber_ids[]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['s']->value['subscriber_id'], ENT_QUOTES, 'UTF-8');
                ?>
" class="cm-item" /></td>
        <td><input type="hidden" name="subscribers[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['s']->value['subscriber_id'], ENT_QUOTES, 'UTF-8');
                ?>
][email]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['s']->value['email'], ENT_QUOTES, 'UTF-8');
                ?>
" />
            <a href="mailto:<?php 
                echo htmlspecialchars(rawurlencode($_smarty_tpl->tpl_vars['s']->value['email']), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['s']->value['email'], ENT_QUOTES, 'UTF-8');
                ?>
</a></td>
            <input type="hidden" name="product_id" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <td class="nowrap right" width="5%">
            <?php 
                $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
                ob_start();
                ?>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "delete", 'href' => "products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product_id']->value . "&selected_section=subscribers&deleted_subscription_id=" . (string) $_smarty_tpl->tpl_vars['s']->value['subscriber_id']));
                ?>
</li>
            <?php 
                list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
                if (!empty($_capture_buffer)) {
                    if (isset($_capture_assign)) {
                        $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                    }
                    if (isset($_capture_append)) {
                        $_smarty_tpl->append($_capture_append, ob_get_contents());
                    }
                    Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
                } else {
                    $_smarty_tpl->capture_error();
                }
                ?>
            <div class="hidden-tools">
            <?php 
                if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product_data']->value['company_id'] == $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
                    ?>
                <?php 
                    smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
                    ?>

            <?php 
                }
                ?>
            </div>
        </td>
    </tr>
    <?php 
            }
            ?>
</tbody>
</table>
<?php 
        } else {
            ?>
    <p class="no-items"><?php 
            echo $_smarty_tpl->__("no_data");
            ?>
</p>
<?php 
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('div_id' => "product_subscribers", 'search' => $_smarty_tpl->tpl_vars['product_subscribers_search']->value), 0);
        ?>


</form>
<?php 
    }
    function content_55d2ecf6a248d2_80709672($_smarty_tpl)
    {
        fn_preload_lang_vars(array('position_short', 'name', 'delivery_time', 'weight_limit', 'usergroups', 'status', 'edit', 'view', 'usergroup', 'delete', 'no_data', 'add_shipping_method', 'manage_shippings'));
        $_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="shippings_form" class="<?php 
        if (fn_check_form_permissions('')) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
">
<?php 
        if ($_smarty_tpl->tpl_vars['shippings']->value) {
            ?>
<table width="100%" class="table table-middle">
<thead>
<tr>
    <th width="1%">
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/check_items.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>
</th>
    <th width="1%"><?php 
            echo $_smarty_tpl->__("position_short");
            ?>
</th>
    <th width="20%"><?php 
            echo $_smarty_tpl->__("name");
            ?>
</th>
    <th><?php 
            echo $_smarty_tpl->__("delivery_time");
            ?>
</th>
    <th><?php 
            echo $_smarty_tpl->__("weight_limit");
            ?>
&nbsp;(<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8');
            ?>
)</th>
    <?php 
            if (!fn_allowed_for("ULTIMATE:FREE")) {
                ?>
        <th><?php 
                echo $_smarty_tpl->__("usergroups");
                ?>
</th>
    <?php 
            }
            ?>
    <th width="5%">&nbsp;</th>
    <th width="10%" class="right"><?php 
            echo $_smarty_tpl->__("status");
            ?>
</th>
</tr>
</thead>
<?php 
            $_smarty_tpl->tpl_vars['shipping'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['shipping']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['shippings']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['shipping']->key => $_smarty_tpl->tpl_vars['shipping']->value) {
                $_smarty_tpl->tpl_vars['shipping']->_loop = true;
                ?>

<?php 
                $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['shipping']->value, "shippings"), null, 0);
                ?>

<?php 
                if ($_smarty_tpl->tpl_vars['allow_save']->value) {
                    ?>
    <?php 
                    $_smarty_tpl->tpl_vars["status_display"] = new Smarty_variable('', null, 0);
                    ?>
    <?php 
                    $_smarty_tpl->tpl_vars["link_text"] = new Smarty_variable($_smarty_tpl->__("edit"), null, 0);
                } else {
                    ?>
    <?php 
                    $_smarty_tpl->tpl_vars["status_display"] = new Smarty_variable("text", null, 0);
                    ?>
    <?php 
                    $_smarty_tpl->tpl_vars["link_text"] = new Smarty_variable($_smarty_tpl->__("view"), null, 0);
                }
                ?>

<tr class="cm-row-status-<?php 
                echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['shipping']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if (!$_smarty_tpl->tpl_vars['allow_save']->value) {
                    ?>
cm-hide-inputs<?php 
                } else {
                    ?>
cm-no-hide-input<?php 
                }
                ?>
">
<input type="hidden" name="shipping_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
][tax_ids][<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['tax_ids'], ENT_QUOTES, 'UTF-8');
                ?>
]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['tax_ids'], ENT_QUOTES, 'UTF-8');
                ?>
" />
    <td>
        <input type="checkbox" name="shipping_ids[]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
" class="cm-item" /></td>
    <td>
        <input type="text" name="shipping_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
][position]" size="3" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['position'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-micro input-hidden" /></td>
    <td data-ct-shipping-name="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping'], ENT_QUOTES, 'UTF-8');
                ?>
">
        <a href="<?php 
                echo htmlspecialchars(fn_url("shippings.update?shipping_id=" . (string) $_smarty_tpl->tpl_vars['shipping']->value['shipping_id']), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping'], ENT_QUOTES, 'UTF-8');
                ?>
</a>
        <?php 
                echo $_smarty_tpl->getSubTemplate("views/companies/components/company_name.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object' => $_smarty_tpl->tpl_vars['shipping']->value), 0);
                ?>

    </td>
    <td>
        <input type="text" name="shipping_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
][delivery_time]" size="20" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['delivery_time'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-mini input-hidden" /></td>
    <td class="nowrap">
        <input type="text" name="shipping_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
][min_weight]" size="4" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['min_weight'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-mini input-hidden" />&nbsp;-&nbsp;<input type="text" name="shipping_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], ENT_QUOTES, 'UTF-8');
                ?>
][max_weight]" size="4" value="<?php 
                if ($_smarty_tpl->tpl_vars['shipping']->value['max_weight'] != "0.00") {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['shipping']->value['max_weight'], ENT_QUOTES, 'UTF-8');
                }
                ?>
" class="input-mini input-hidden right" /></td>
    <?php 
                if (!fn_allowed_for("ULTIMATE:FREE")) {
                    ?>
        <td class="nowrap">
            <?php 
                    echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('select_mode' => true, 'title' => __("usergroup"), 'id' => "ship_data_" . (string) $_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], 'name' => "shipping_data[" . (string) $_smarty_tpl->tpl_vars['shipping']->value['shipping_id'] . "][usergroup_ids]", 'usergroups' => $_smarty_tpl->tpl_vars['usergroups']->value, 'usergroup_ids' => $_smarty_tpl->tpl_vars['shipping']->value['usergroup_ids'], 'input_extra' => ''), 0);
                    ?>

        </td>
    <?php 
                }
                ?>
    <td class="nowrap">
        <?php 
                $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
                ob_start();
                ?>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => $_smarty_tpl->tpl_vars['link_text']->value, 'href' => "shippings.update?shipping_id=" . (string) $_smarty_tpl->tpl_vars['shipping']->value['shipping_id']));
                ?>
</li>
            <?php 
                if ($_smarty_tpl->tpl_vars['allow_save']->value) {
                    ?>
                <li><?php 
                    smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm", 'href' => "shippings.delete?shipping_id=" . (string) $_smarty_tpl->tpl_vars['shipping']->value['shipping_id']));
                    ?>
</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();
                }
                ?>
        <div class="hidden-tools">
            <?php 
                smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
                ?>

        </div>
    </td>
    <td class="right">
        <?php 
                echo $_smarty_tpl->getSubTemplate("common/select_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['shipping']->value['shipping_id'], 'display' => $_smarty_tpl->tpl_vars['status_display']->value, 'status' => $_smarty_tpl->tpl_vars['shipping']->value['status'], 'hidden' => '', 'object_id_name' => "shipping_id", 'table' => "shippings"), 0);
                ?>
        
    </td>
</tr>
<?php 
            }
            ?>
</table>
<?php 
        } else {
            ?>
    <p class="no-items"><?php 
            echo $_smarty_tpl->__("no_data");
            ?>
</p>
<?php 
        }
        ?>
</form>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
        ob_start();
        ?>
        <?php 
        if ($_smarty_tpl->tpl_vars['shippings']->value) {
            ?>
            <li><?php 
            smarty_template_function_btn($_smarty_tpl, array('type' => "delete_selected", 'dispatch' => "dispatch[shippings.m_delete]", 'form' => "shippings_form"));
            ?>
</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 
        smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
        ?>


    <?php 
        if ($_smarty_tpl->tpl_vars['shippings']->value) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[shippings.m_update]", 'but_role' => "submit-link", 'but_target_form' => "shippings_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();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("adv_buttons", null, null);
        ob_start();
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tool_href' => "shippings.add", 'prefix' => "top", 'hide_tools' => true, 'link_text' => '', 'title' => __("add_shipping_method"), 'icon' => "icon-plus"), 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 
        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/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("manage_shippings"), 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons'], 'select_languages' => true), 0);
    }
    function content_55deaa21789720_54671987($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
        }
        fn_preload_lang_vars(array('general', 'ranges', 'categories', 'name', 'position_short', 'show_on_home_page', 'filter_by', 'features', 'product_fields', 'round_to', 'display_type', 'expanded', 'minimized', 'display_variants_count', 'tt_views_product_filters_update_display_variants_count', 'display_more_variants_count', 'tt_views_product_filters_update_display_more_variants_count', 'position_short', 'name', 'range_from', 'range_to', 'text_all_categories_included'));
        if ($_smarty_tpl->tpl_vars['filter']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['filter']->value['filter_id'], null, 0);
        } else {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
        }
        ?>

<?php 
        $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(true, null, 0);
        if (fn_allowed_for("ULTIMATE")) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['filter']->value, "product_filters"), null, 0);
        }
        ?>

<?php 
        $_smarty_tpl->tpl_vars["filter_fields"] = new Smarty_variable(fn_get_product_filter_fields(''), null, 0);
        ?>

<div id="content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" name="update_filter_form_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" method="post" class="form-horizontal form-edit <?php 
        if (fn_check_form_permissions('') || !$_smarty_tpl->tpl_vars['allow_save']->value) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
">

<input type="hidden" class="cm-no-hide-input" name="filter_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
<input type="hidden" class="cm-no-hide-input" name="redirect_url" value="<?php 
        echo htmlspecialchars($_REQUEST['return_url'], ENT_QUOTES, 'UTF-8');
        ?>
" />

<div class="tabs cm-j-tabs">
    <ul class="nav nav-tabs">
        <li id="tab_details_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js active"><a><?php 
        echo $_smarty_tpl->__("general");
        ?>
</a></li>
        <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] && strpos("ODN", $_smarty_tpl->tpl_vars['filter']->value['feature_type']) !== false || $_smarty_tpl->tpl_vars['filter']->value['field_type'] && $_smarty_tpl->tpl_vars['filter_fields']->value[$_smarty_tpl->tpl_vars['filter']->value['field_type']]['is_range'] == true || !$_smarty_tpl->tpl_vars['id']->value) {
            ?>
            <li id="tab_variants_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
" class="cm-js <?php 
            if (!$_smarty_tpl->tpl_vars['id']->value) {
                ?>
hidden<?php 
            }
            ?>
"><a><?php 
            echo $_smarty_tpl->__("ranges");
            ?>
</a></li>
        <?php 
        }
        ?>
        <li id="tab_categories_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js"><a><?php 
        echo $_smarty_tpl->__("categories");
        ?>
</a></li>
    </ul>
</div>
<div class="cm-tabs-content" id="tabs_content_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
    <div id="content_tab_details_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
    <fieldset>
        <div class="control-group">
            <label for="elm_filter_name_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("name");
        ?>
</label>
            <div class="controls">
                <input type="text" id="elm_filter_name_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="filter_data[filter]" class="span9" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['filter'], ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <?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' => "filter_data[company_id]", 'id' => "elm_filter_data_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'selected' => $_smarty_tpl->tpl_vars['filter']->value['company_id']), 0);
            ?>

        <?php 
        }
        ?>

        <div class="control-group">
            <label class="control-label" for="elm_filter_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("position_short");
        ?>
</label>
            <div class="controls">
            <input type="text" id="elm_filter_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="filter_data[position]" size="3" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['position'], ENT_QUOTES, 'UTF-8');
        if (!$_smarty_tpl->tpl_vars['id']->value) {
            ?>
0<?php 
        }
        ?>
"/>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_filter_show_on_home_page_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("show_on_home_page");
        ?>
</label>
            <div class="controls">
            <input type="hidden" name="filter_data[show_on_home_page]" value="N" />
            <input type="checkbox" id="elm_filter_show_on_home_page_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="filter_data[show_on_home_page]" <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['show_on_home_page'] == "Y" || !$_smarty_tpl->tpl_vars['filter']->value) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="Y"/>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_filter_filter_by_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("filter_by");
        ?>
</label>
            <div class="controls">
            <?php 
        if (!$_smarty_tpl->tpl_vars['id']->value) {
            ?>
                
                <select name="filter_data[filter_type]" onchange="fn_check_product_filter_type(this.value, 'tab_variants_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
', <?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
);" id="elm_filter_filter_by_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
                <?php 
            if ($_smarty_tpl->tpl_vars['filter_features']->value) {
                ?>
                    <optgroup label="<?php 
                echo $_smarty_tpl->__("features");
                ?>
">
                    <?php 
                $_smarty_tpl->tpl_vars['feature'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['feature']->_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['feature']->key => $_smarty_tpl->tpl_vars['feature']->value) {
                    $_smarty_tpl->tpl_vars['feature']->_loop = true;
                    ?>
                        <option value="<?php 
                    if (strpos("ON", $_smarty_tpl->tpl_vars['feature']->value['feature_type']) !== false) {
                        ?>
R<?php 
                    } elseif ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "D") {
                        ?>
D<?php 
                    } else {
                        ?>
F<?php 
                    }
                    ?>
F-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['description'], ENT_QUOTES, 'UTF-8');
                    ?>
</option>
                    <?php 
                    if ($_smarty_tpl->tpl_vars['feature']->value['subfeatures']) {
                        ?>
                    <?php 
                        $_smarty_tpl->tpl_vars['subfeature'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['subfeature']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['feature']->value['subfeatures'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['subfeature']->key => $_smarty_tpl->tpl_vars['subfeature']->value) {
                            $_smarty_tpl->tpl_vars['subfeature']->_loop = true;
                            ?>
                        <option value="<?php 
                            if (strpos("ON", $_smarty_tpl->tpl_vars['feature']->value['feature_type']) !== false) {
                                ?>
R<?php 
                            } elseif ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "D") {
                                ?>
D<?php 
                            } else {
                                ?>
F<?php 
                            }
                            ?>
F-<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['subfeature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['subfeature']->value['description'], ENT_QUOTES, 'UTF-8');
                            ?>
</option>
                    <?php 
                        }
                        ?>
                    <?php 
                    }
                    ?>
                    <?php 
                }
                ?>
                    </optgroup>
                <?php 
            }
            ?>
                    <optgroup label="<?php 
            echo $_smarty_tpl->__("product_fields");
            ?>
">
                    <?php 
            $_smarty_tpl->tpl_vars["field"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["field"]->_loop = false;
            $_smarty_tpl->tpl_vars["field_type"] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['filter_fields']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["field"]->key => $_smarty_tpl->tpl_vars["field"]->value) {
                $_smarty_tpl->tpl_vars["field"]->_loop = true;
                $_smarty_tpl->tpl_vars["field_type"]->value = $_smarty_tpl->tpl_vars["field"]->key;
                ?>
                        <?php 
                if (!$_smarty_tpl->tpl_vars['field']->value['hidden']) {
                    ?>
                            <option value="<?php 
                    if ($_smarty_tpl->tpl_vars['field']->value['is_range']) {
                        ?>
R<?php 
                    } else {
                        ?>
B<?php 
                    }
                    ?>
-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['field_type']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['field']->value['description']);
                    ?>
</option>
                        <?php 
                }
                ?>
                    <?php 
            }
            ?>
                    </optgroup>
                </select>
            <?php 
        } else {
            ?>
                <input type="hidden" name="filter_data[filter_type]" value="<?php 
            if ($_smarty_tpl->tpl_vars['filter']->value['feature_id']) {
                ?>
FF-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_id'], ENT_QUOTES, 'UTF-8');
            } else {
                if ($_smarty_tpl->tpl_vars['filter_fields']->value[$_smarty_tpl->tpl_vars['filter']->value['field_type']]['is_range']) {
                    ?>
R<?php 
                } else {
                    ?>
B<?php 
                }
                ?>
-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['field_type'], ENT_QUOTES, 'UTF-8');
            }
            ?>
">
                <span class="shift-input"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature'], ENT_QUOTES, 'UTF-8');
            if ($_smarty_tpl->tpl_vars['filter']->value['feature_group']) {
                ?>
 (<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['feature_group'], ENT_QUOTES, 'UTF-8');
                ?>
)<?php 
            }
            ?>
</span>
            <?php 
        }
        ?>
            </div>
        </div>

        <div class="control-group<?php 
        if (!$_smarty_tpl->tpl_vars['filter']->value['slider']) {
            ?>
 hidden<?php 
        }
        ?>
" id="round_to_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
_container">
            <label class="control-label" for="elm_filter_round_to_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("round_to");
        ?>
</label>
            <div class="controls">
            <select name="filter_data[round_to]" id="elm_filter_round_to_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                <option value="1"  <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['round_to'] == 1) {
            ?>
   selected="selected"<?php 
        }
        ?>
>1</option>
                <option value="10" <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['round_to'] == 10) {
            ?>
  selected="selected"<?php 
        }
        ?>
>10</option>
                <option value="100"<?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['round_to'] == 100) {
            ?>
 selected="selected"<?php 
        }
        ?>
>100</option>
            </select>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_filter_display_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("display_type");
        ?>
</label>
            <div class="controls">
            <select name="filter_data[display]" id="elm_filter_display_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
                <option value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['display'] == 'Y') {
            ?>
 selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("expanded");
        ?>
</option>
                <option value="N" <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['display'] == 'N') {
            ?>
 selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("minimized");
        ?>
</option>
            </select>
            </div>
        </div>

        <div class="control-group <?php 
        if (!($_smarty_tpl->tpl_vars['filter']->value['feature_id'] || $_smarty_tpl->tpl_vars['filter_fields']->value[$_smarty_tpl->tpl_vars['filter']->value['field_type']]['is_range'] || $_smarty_tpl->tpl_vars['filter']->value['feature'] == 'Vendor')) {
            ?>
 hidden<?php 
        }
        ?>
" id="display_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
_container">
            <label class="control-label" for="elm_filter_display_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("display_variants_count");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_filters_update_display_variants_count")), 0);
        ?>
</label>
            <div class="controls">
            <input type="text" id="elm_filter_display_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="filter_data[display_count]" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['display_count']) === null || $tmp === '' ? "10" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <div class="control-group <?php 
        if (!($_smarty_tpl->tpl_vars['filter']->value['feature_id'] || $_smarty_tpl->tpl_vars['filter_fields']->value[$_smarty_tpl->tpl_vars['filter']->value['field_type']]['is_range'] || $_smarty_tpl->tpl_vars['filter']->value['feature'] == 'Vendor')) {
            ?>
 hidden<?php 
        }
        ?>
" id="display_more_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
_container">
            <label class="control-label" for="elm_filter_display_more_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("display_more_variants_count");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_filters_update_display_more_variants_count")), 0);
        ?>
</label>
            <div class="controls">
            <input type="text" id="elm_filter_display_more_count_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="filter_data[display_more_count]" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['display_more_count']) === null || $tmp === '' ? "20" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>
        
    </fieldset>
    </div>

    <div class="hidden" id="content_tab_variants_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        <table class="table table-middle">
        <thead>
        <tr>
            <th><?php 
        echo $_smarty_tpl->__("position_short");
        ?>
</th>
            <th><?php 
        echo $_smarty_tpl->__("name");
        ?>
</th>
            <th><?php 
        echo $_smarty_tpl->__("range_from");
        ?>
&nbsp;-&nbsp;<?php 
        echo $_smarty_tpl->__("range_to");
        ?>
</th>
            <th>&nbsp;</th>
        </tr>
        </thead>
        <?php 
        if ($_smarty_tpl->tpl_vars['filter']->value['ranges']) {
            ?>
        <?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');
            }
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']["fe_f"]['iteration'] = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars["range"]->key => $_smarty_tpl->tpl_vars["range"]->value) {
                $_smarty_tpl->tpl_vars["range"]->_loop = true;
                $_smarty_tpl->tpl_vars['smarty']->value['foreach']["fe_f"]['iteration']++;
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["num"] = new Smarty_variable($_smarty_tpl->getVariable('smarty')->value['foreach']['fe_f']['iteration'], null, 0);
                ?>
        <tr  name="sub"} id="range_item_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8');
                ?>
">
            <td>
                <input type="hidden" name="filter_data[ranges][<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
                ?>
][range_id]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_id'], ENT_QUOTES, 'UTF-8');
                ?>
" />
                <input type="text" name="filter_data[ranges][<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
                ?>
][position]" size="3" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['position'], ENT_QUOTES, 'UTF-8');
                ?>
"  />
            </td>
            <td><input type="text" name="filter_data[ranges][<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
                ?>
][range_name]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['range_name'], ENT_QUOTES, 'UTF-8');
                ?>
" /></td>
            <td class="nowrap">
                <?php 
                if ($_smarty_tpl->tpl_vars['features']->value[$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['prefix']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['features']->value[$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['prefix'], ENT_QUOTES, 'UTF-8');
                    ?>
&nbsp;<?php 
                }
                ?>
                <?php 
                if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] !== "D") {
                    ?>
                    <input type="text" name="filter_data[ranges][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][from]" size="3" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['from'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="cm-value-decimal" />&nbsp;-&nbsp;<input type="text" name="filter_data[ranges][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][to]" size="3" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['range']->value['to'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="cm-value-decimal" />
                <?php 
                } else {
                    ?>
                    <?php 
                    echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "date_1_" . (string) $_smarty_tpl->tpl_vars['id']->value . "_" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'], 'date_name' => "filter_data[dates_ranges][" . (string) $_smarty_tpl->tpl_vars['num']->value . "][from]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['range']->value['from']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
                    ?>
&nbsp;-&nbsp;
                    <?php 
                    echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "date_2_" . (string) $_smarty_tpl->tpl_vars['id']->value . "_" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'], 'date_name' => "filter_data[dates_ranges][" . (string) $_smarty_tpl->tpl_vars['num']->value . "][to]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['range']->value['to']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
                    ?>

                <?php 
                }
                ?>
                <?php 
                if ($_smarty_tpl->tpl_vars['features']->value[$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['suffix']) {
                    ?>
&nbsp;<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['features']->value[$_smarty_tpl->tpl_vars['filter']->value['feature_id']]['suffix'], ENT_QUOTES, 'UTF-8');
                }
                ?>
</td>
            <td class="right">
                <?php 
                echo $_smarty_tpl->getSubTemplate("buttons/multiple_buttons.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item_id' => "range_item_" . (string) $_smarty_tpl->tpl_vars['id']->value . "_" . (string) $_smarty_tpl->tpl_vars['range']->value['range_id'], 'tag_level' => "1", 'only_delete' => "Y"), 0);
                ?>

            </td>
        </tr>
        <?php 
            }
            ?>
        <?php 
        }
        ?>
        
        <?php 
        echo smarty_function_math(array('equation' => "x + 1", 'assign' => "num", 'x' => ($tmp = @$_smarty_tpl->tpl_vars['num']->value) === null || $tmp === '' ? 0 : $tmp), $_smarty_tpl);
        ?>

        <tr id="box_add_to_range_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
            <td class="nowrap">
                <input type="text" name="filter_data[ranges][<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
        ?>
][position]" size="3" value="0" />
            </td>
            <td><input type="text" name="filter_data[ranges][<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
        ?>
][range_name]" /></td>
            <td class="nowrap">
                <?php 
        if (!$_smarty_tpl->tpl_vars['id']->value || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] != "D") {
            ?>
                <div id="inputs_ranges<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") {
                ?>
class="hidden"<?php 
            }
            ?>
>
                    <input type="text" name="filter_data[ranges][<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
            ?>
][from]" value="" class="input-text-medium cm-value-decimal" />&nbsp;-&nbsp;<input type="text" name="filter_data[ranges][<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['num']->value, ENT_QUOTES, 'UTF-8');
            ?>
][to]" value="" class="cm-value-decimal" />
                </div>
                <?php 
        }
        ?>
                <?php 
        if (!$_smarty_tpl->tpl_vars['id']->value || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == "D") {
            ?>
                <div id="dates_ranges<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if (!$_smarty_tpl->tpl_vars['id']->value || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] != "D") {
                ?>
class="hidden"<?php 
            }
            ?>
>
                    <?php 
            echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "date_3_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'date_name' => "filter_data[dates_ranges][" . (string) $_smarty_tpl->tpl_vars['num']->value . "][from]", 'date_val' => @constant('TIME'), 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
            ?>
&nbsp;-&nbsp;
                    <?php 
            echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "date_4_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'date_name' => "filter_data[dates_ranges][" . (string) $_smarty_tpl->tpl_vars['num']->value . "][to]", 'date_val' => @constant('TIME'), 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
            ?>

                </div>
                <?php 
        }
        ?>
            </td>
            <td>
                <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/multiple_buttons.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item_id' => "add_to_range_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'tag_level' => "1"), 0);
        ?>
</td>
        </tr>
        </table>
    </div>

    <div class="hidden" id="content_tab_categories_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        <?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, 'multiple' => true, 'input_name' => "filter_data[categories_path]", 'item_ids' => $_smarty_tpl->tpl_vars['filter']->value['categories_path'], 'data_id' => "category_ids_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'no_item_text' => __("text_all_categories_included"), 'use_keys' => "N", 'owner_company_id' => $_smarty_tpl->tpl_vars['filter']->value['company_id'], 'but_meta' => "pull-right"), 0);
        ?>

    </div>
</div>

<div class="buttons-container">
    <?php 
        if (fn_allowed_for("ULTIMATE") && !$_smarty_tpl->tpl_vars['allow_save']->value) {
            ?>
        <?php 
            $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable(true, null, 0);
            ?>
    <?php 
        }
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[product_filters.update]", 'cancel_action' => "close", 'hide_first_button' => $_smarty_tpl->tpl_vars['hide_first_button']->value, 'save' => $_smarty_tpl->tpl_vars['id']->value), 0);
        ?>

</div>

</form>
<!--content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
--></div>

<?php 
        if (!$_smarty_tpl->tpl_vars['id']->value) {
            ?>
<script type="text/javascript">
    fn_check_product_filter_type(Tygh.$('#elm_filter_filter_by_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
').val(), 'tab_variants_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
', '<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
');
</script>
<?php 
        }
    }
    function content_55d2ec43d52980_67621944($_smarty_tpl)
    {
        fn_preload_lang_vars(array('no_items', 'text_select_fields2edit_note', 'modify_selected', 'select_fields_to_edit', 'bulk_category_addition', 'edit_selected', 'add_category', 'total', 'categories', 'products', 'active_categories', 'hidden_categories', 'disabled_categories', 'categories'));
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(fn_check_form_permissions(''), null, 0);
        ?>
<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" method="post" name="category_tree_form" class="<?php 
        if ($_smarty_tpl->tpl_vars['hide_inputs']->value) {
            ?>
cm-hide-inputs<?php 
        }
        ?>
">
    <div class="items-container">
    <?php 
        if ($_smarty_tpl->tpl_vars['categories_tree']->value) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("views/categories/components/categories_tree.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('header' => "1", 'parent_id' => $_smarty_tpl->tpl_vars['category_id']->value, 'st_result_ids' => "categories_stats", 'st_return_url' => $_smarty_tpl->tpl_vars['config']->value['current_url']), 0);
            ?>

    <?php 
        } else {
            ?>
        <p class="no-items"><?php 
            echo $_smarty_tpl->__("no_items");
            ?>
</p>
    <?php 
        }
        ?>
</div>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("select_fields_to_edit", null, null);
        ob_start();
        ?>

    <p><?php 
        echo $_smarty_tpl->__("text_select_fields2edit_note");
        ?>
</p>
    <?php 
        echo $_smarty_tpl->getSubTemplate("views/categories/components/categories_select_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>


    <div class="buttons-container">
        <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("modify_selected"), 'but_meta' => "cm-process-items", 'but_name' => "dispatch[categories.store_selection]", 'cancel_action' => "close"), 0);
        ?>

    </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/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "select_fields_to_edit", 'text' => __("select_fields_to_edit"), 'content' => Smarty::$_smarty_vars['capture']['select_fields_to_edit']), 0);
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
        ob_start();
        ?>
        <li><?php 
        smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("bulk_category_addition"), 'href' => "categories.m_add"));
        ?>
</li>
        <?php 
        if ($_smarty_tpl->tpl_vars['categories_tree']->value) {
            ?>
            <?php 
            if (!$_smarty_tpl->tpl_vars['hide_inputs']->value) {
                ?>
            <li class="divider"></li>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "dialog", 'class' => "cm-process-items", 'text' => __("edit_selected"), 'target_id' => "content_select_fields_to_edit", 'form' => "category_tree_form"));
                ?>
</li>
            <?php 
            }
            ?>
            <li><?php 
            smarty_template_function_btn($_smarty_tpl, array('type' => "delete_selected", 'dispatch' => "dispatch[categories.m_delete]", 'form' => "category_tree_form"));
            ?>
</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 
        smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
        ?>


    <?php 
        if ($_smarty_tpl->tpl_vars['categories_tree']->value) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[categories.m_update]", 'but_role' => "submit-link", 'but_target_form' => "category_tree_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();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("adv_buttons", null, null);
        ob_start();
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tool_href' => "categories.add", 'prefix' => "top", 'hide_tools' => "true", 'title' => __("add_category"), 'icon' => "icon-plus"), 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 
        $_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null);
        ob_start();
        ?>
    <div class="sidebar-row" id="categories_stats">
        <h6><?php 
        echo $_smarty_tpl->__("total");
        ?>
</h6>
        <ul class="unstyled sidebar-stat">
            <li><?php 
        echo $_smarty_tpl->__("categories");
        ?>
 <span><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_stats']->value['categories_total'], ENT_QUOTES, 'UTF-8');
        ?>
</span></li>
            <li><?php 
        echo $_smarty_tpl->__("products");
        ?>
 <span><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_stats']->value['products_total'], ENT_QUOTES, 'UTF-8');
        ?>
</span></li>
            <li><?php 
        echo $_smarty_tpl->__("active_categories");
        ?>
 <span><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_stats']->value['categories_active'], ENT_QUOTES, 'UTF-8');
        ?>
</span></li>
            <li><?php 
        echo $_smarty_tpl->__("hidden_categories");
        ?>
 <span><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_stats']->value['categories_hidden'], ENT_QUOTES, 'UTF-8');
        ?>
</span></li>
            <li><?php 
        echo $_smarty_tpl->__("disabled_categories");
        ?>
 <span><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_stats']->value['categories_disabled'], ENT_QUOTES, 'UTF-8');
        ?>
</span></li>
        </ul>
    <!--categories_stats--></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();
        }
        ?>

</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();
        }
        echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("categories"), 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons'], 'select_languages' => true), 0);
        ?>

<?php 
    }
    function content_55deab24f04f67_88833012($_smarty_tpl)
    {
        if (!is_callable('smarty_function_script')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
        }
        fn_preload_lang_vars(array('ungroupped_features', 'editing_product_feature', 'viewing_feature', 'view', 'viewing_feature', 'view', 'editing_group', 'viewing_feature', 'view', 'editing_product_feature', 'no_data', 'new_group', 'add_group', 'new_feature', 'add_feature', 'features'));
        echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_script(array('src' => "js/tygh/product_features.js"), $_smarty_tpl);
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>


<?php 
        $_smarty_tpl->tpl_vars["r_url"] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0);
        ?>

<div class="items-container<?php 
        if (fn_check_form_permissions('')) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
" id="update_features_list">
<?php 
        if ($_smarty_tpl->tpl_vars['features']->value) {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['has_ungroupped']->value) {
                ?>
        <div class="object-group clear no-hover row-gray">
            <strong><?php 
                echo $_smarty_tpl->__("ungroupped_features");
                ?>
</strong>
        </div>
    <?php 
            }
            ?>
<table width="100%" class="table table-middle table-objects">
<tbody>
    <?php 
            if ($_smarty_tpl->tpl_vars['has_ungroupped']->value) {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["p_feature"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["p_feature"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['features']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["p_feature"]->key => $_smarty_tpl->tpl_vars["p_feature"]->value) {
                    $_smarty_tpl->tpl_vars["p_feature"]->_loop = true;
                    ?>
            <?php 
                    if ($_smarty_tpl->tpl_vars['p_feature']->value['feature_type'] != "G") {
                        ?>
                <?php 
                        if (fn_allow_save_object($_smarty_tpl->tpl_vars['p_feature']->value, "product_features")) {
                            ?>
                    <?php 
                            ob_start();
                            echo $_smarty_tpl->__("editing_product_feature");
                            $_tmp1 = ob_get_clean();
                            echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['p_feature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['p_feature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['p_feature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['p_feature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['p_feature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'href_delete' => "product_features.delete?feature_id=" . (string) $_smarty_tpl->tpl_vars['p_feature']->value['feature_id'], 'delete_target_id' => "pagination_contents", 'header_text' => $_tmp1 . ": " . (string) $_smarty_tpl->tpl_vars['p_feature']->value['description'], 'no_table' => true, 'company_object' => $_smarty_tpl->tpl_vars['p_feature']->value), 0);
                            ?>

                <?php 
                        } else {
                            ?>
                    <?php 
                            ob_start();
                            echo $_smarty_tpl->__("viewing_feature");
                            $_tmp2 = ob_get_clean();
                            echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['p_feature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['p_feature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['p_feature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['p_feature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['p_feature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'additional_class' => "cm-hide-inputs", 'header_text' => $_tmp2 . ": " . (string) $_smarty_tpl->tpl_vars['p_feature']->value['description'], 'update_controller' => "product_features", 'no_table' => true, 'non_editable' => true, 'link_text' => __("view"), 'is_view_link' => true, 'company_object' => $_smarty_tpl->tpl_vars['p_feature']->value), 0);
                            ?>

                <?php 
                        }
                        ?>
            <?php 
                    }
                    ?>
        <?php 
                }
                ?>
    <?php 
            }
            ?>

    <?php 
            $_smarty_tpl->tpl_vars["gr_feature"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["gr_feature"]->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['features']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["gr_feature"]->key => $_smarty_tpl->tpl_vars["gr_feature"]->value) {
                $_smarty_tpl->tpl_vars["gr_feature"]->_loop = true;
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['gr_feature']->value['feature_type'] == "G") {
                    ?>

            <?php 
                    if (!fn_allow_save_object($_smarty_tpl->tpl_vars['gr_feature']->value, "product_features")) {
                        ?>
                <?php 
                        ob_start();
                        echo $_smarty_tpl->__("viewing_feature");
                        $_tmp3 = ob_get_clean();
                        echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['gr_feature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['gr_feature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['gr_feature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['gr_feature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['gr_feature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'additional_class' => "row-gray", 'header_text' => $_tmp3 . ": " . (string) $_smarty_tpl->tpl_vars['gr_feature']->value['description'], 'no_table' => true, 'link_meta' => "strong", 'link_text' => __("view"), 'non_editable' => true, 'is_view_link' => true, 'company_object' => $_smarty_tpl->tpl_vars['gr_feature']->value), 0);
                        ?>

            <?php 
                    } else {
                        ?>
                <?php 
                        ob_start();
                        echo $_smarty_tpl->__("editing_group");
                        $_tmp4 = ob_get_clean();
                        echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['gr_feature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['gr_feature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['gr_feature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['gr_feature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['gr_feature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'href_delete' => "product_features.delete?feature_id=" . (string) $_smarty_tpl->tpl_vars['gr_feature']->value['feature_id'], 'delete_target_id' => "pagination_contents,content_add_new_feature", 'header_text' => $_tmp4 . ": " . (string) $_smarty_tpl->tpl_vars['gr_feature']->value['description'], 'no_table' => true, 'link_meta' => "strong", 'company_object' => $_smarty_tpl->tpl_vars['gr_feature']->value, 'additional_class' => "row-gray"), 0);
                        ?>

            <?php 
                    }
                    ?>


            <?php 
                    if ($_smarty_tpl->tpl_vars['gr_feature']->value['subfeatures']) {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["subfeature"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["subfeature"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['gr_feature']->value['subfeatures'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["subfeature"]->key => $_smarty_tpl->tpl_vars["subfeature"]->value) {
                            $_smarty_tpl->tpl_vars["subfeature"]->_loop = true;
                            ?>

                    <?php 
                            if (!fn_allow_save_object($_smarty_tpl->tpl_vars['subfeature']->value, "product_features")) {
                                ?>
                        <?php 
                                ob_start();
                                echo $_smarty_tpl->__("viewing_feature");
                                $_tmp5 = ob_get_clean();
                                echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['subfeature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['subfeature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['subfeature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['subfeature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['subfeature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'additional_class' => "cm-hide-inputs", 'header_text' => $_tmp5 . ": " . (string) $_smarty_tpl->tpl_vars['subfeature']->value['description'], 'update_controller' => "product_features", 'no_table' => true, 'non_editable' => true, 'link_text' => __("view"), 'is_view_link' => true, 'company_object' => $_smarty_tpl->tpl_vars['subfeature']->value), 0);
                                ?>

                    <?php 
                            } else {
                                ?>
                        <?php 
                                ob_start();
                                echo $_smarty_tpl->__("editing_product_feature");
                                $_tmp6 = ob_get_clean();
                                echo $_smarty_tpl->getSubTemplate("common/object_group.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['subfeature']->value['feature_id'], 'details' => $_smarty_tpl->tpl_vars['subfeature']->value['feature_description'], 'text' => $_smarty_tpl->tpl_vars['subfeature']->value['description'], 'status' => $_smarty_tpl->tpl_vars['subfeature']->value['status'], 'hidden' => true, 'href' => "product_features.update?feature_id=" . (string) $_smarty_tpl->tpl_vars['subfeature']->value['feature_id'] . "&return_url=" . (string) $_smarty_tpl->tpl_vars['r_url']->value, 'object_id_name' => "feature_id", 'table' => "product_features", 'href_delete' => "product_features.delete?feature_id=" . (string) $_smarty_tpl->tpl_vars['subfeature']->value['feature_id'], 'delete_target_id' => "pagination_contents", 'header_text' => $_tmp6 . ": " . (string) $_smarty_tpl->tpl_vars['subfeature']->value['description'], 'update_controller' => "product_features", 'no_table' => true, 'company_object' => $_smarty_tpl->tpl_vars['subfeature']->value), 0);
                                ?>

                    <?php 
                            }
                            ?>

                <?php 
                        }
                        ?>
            <?php 
                    }
                    ?>

        <?php 
                }
                ?>
    <?php 
            }
            ?>
    </tbody>
</table>
<?php 
        } else {
            ?>
    <p class="no-items"><?php 
            echo $_smarty_tpl->__("no_data");
            ?>
</p>
<?php 
        }
        ?>
<!--update_features_list--></div>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("adv_buttons", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
        ob_start();
        ?>
        <?php 
        $_smarty_tpl->_capture_stack[0][] = array("add_new_picker", null, null);
        ob_start();
        ?>
            <?php 
        echo $_smarty_tpl->getSubTemplate("views/product_features/update.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('feature' => array(), 'is_group' => true), 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();
        }
        ?>
        <li><?php 
        echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "add_new_group", 'text' => __("new_group"), 'content' => Smarty::$_smarty_vars['capture']['add_new_picker'], 'link_text' => __("add_group"), 'act' => "link", 'icon' => "true"), 0);
        ?>
</li>

        <?php 
        $_smarty_tpl->_capture_stack[0][] = array("add_new_picker_2", null, null);
        ob_start();
        ?>
            <?php 
        echo $_smarty_tpl->getSubTemplate("views/product_features/update.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('feature' => array()), 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();
        }
        ?>
        <li><?php 
        echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "add_new_feature", 'text' => __("new_feature"), 'content' => Smarty::$_smarty_vars['capture']['add_new_picker_2'], 'link_text' => __("add_feature"), 'act' => "link", 'icon' => "true"), 0);
        ?>
</li>
    <?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>
    <?php 
        smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'], 'icon' => "icon-plus", 'no_caret' => true, 'placement' => "right"));
        ?>

<?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();
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/saved_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "product_features.manage", 'view_type' => "product_features"), 0);
        ?>

    <?php 
        echo $_smarty_tpl->getSubTemplate("views/product_features/components/product_features_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "product_features.manage"), 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 
        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/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("features"), 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'select_languages' => true, 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons'], 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar']), 0);
        ?>

<?php 
    }
    function content_55e358937eea47_05815342($_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('general', 'name', 'code', 'primary_currency', 'currency_rate', 'currency_sign', 'after_sum', 'tt_views_currencies_update_after_sum', 'ths_sign', 'tt_views_currencies_update_ths_sign', 'dec_sign', 'tt_views_currencies_update_dec_sign', 'decimals', 'tt_views_currencies_update_decimals'));
        if ($_smarty_tpl->tpl_vars['currency']->value['currency_code']) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['currency']->value['currency_id'], null, 0);
        } else {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable("0", null, 0);
            ?>
    
<?php 
        }
        ?>

<div id="content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" name="update_currency_form_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" method="post" class=" form-horizontal<?php 
        if (fn_check_form_permissions('')) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
">

    <input type="hidden" name="currency_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
<input type="hidden" name="redirect_url" value="<?php 
        echo htmlspecialchars($_REQUEST['return_url'], ENT_QUOTES, 'UTF-8');
        ?>
" />

<div class="tabs cm-j-tabs">
    <ul class="nav nav-tabs">
        <li id="tab_general_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js active"><a><?php 
        echo $_smarty_tpl->__("general");
        ?>
</a></li>
    </ul>
</div>

<div class="cm-tabs-content" id="content_tab_general_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
<fieldset>
    <div class="control-group">
        <label class="control-label cm-required" for="description_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("name");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[description]" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['description'], ENT_QUOTES, 'UTF-8');
        ?>
" id="description_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" size="18">
        </div>
    </div>

    <div class="control-group">
        <label class="control-label cm-required" for="currency_code_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("code");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[currency_code]" size="8" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['currency_code'], ENT_QUOTES, 'UTF-8');
        ?>
" id="currency_code_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" onkeyup="var matches = this.value.match(/^(\w*)/gi);  if (matches) this.value = matches;">
        </div>
    </div>
    
    
    <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
    <div class="control-group">
        <label class="control-label" for="is_primary_currency_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("primary_currency");
            ?>
:</label>
        <div class="controls">
            <input type="hidden" name="currency_data[coefficient]" value="1" />
            <input type="checkbox" name="currency_data[is_primary]" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['currency']->value['is_primary'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 onclick="Tygh.$('.cm-coefficient').prop('disabled', Tygh.$(this).prop('checked'))" id="is_primary_currency_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
        </div>
    </div>
    <?php 
        }
        ?>

    <div class="control-group">
        <label class="control-label cm-required" for="coefficient_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("currency_rate");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[coefficient]" size="7" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['coefficient'], ENT_QUOTES, 'UTF-8');
        ?>
" id="coefficient_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-coefficient" <?php 
        if ($_smarty_tpl->tpl_vars['currency']->value['is_primary'] == "Y") {
            ?>
disabled="disabled"<?php 
        }
        ?>
>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="symbol_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("currency_sign");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[symbol]" size="6" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['symbol'], ENT_QUOTES, 'UTF-8');
        ?>
" id="symbol_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        </div>
    </div>
    
<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "currencies:autoupdate"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "currencies:autoupdate"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "currencies:autoupdate"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


    <div class="control-group">
        <label class="control-label" for="after_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("after_sum");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_currencies_update_after_sum")), 0);
        ?>
:</label>
        <div class="controls">
            <input type="hidden" name="currency_data[after]" value="N" />
            <input type="checkbox" name="currency_data[after]" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['currency']->value['after'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 id="after_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        </div>
    </div>

    <?php 
        if (!$_smarty_tpl->tpl_vars['id']->value && !fn_allowed_for("ULTIMATE:FREE")) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_status.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('input_name' => "currency_data[status]", 'id' => "add_currency", 'hidden' => true), 0);
            ?>

    <?php 
        }
        ?>

    <div class="control-group">
        <label class="control-label" for="thousands_separator_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("ths_sign");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_currencies_update_ths_sign")), 0);
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[thousands_separator]" size="1" maxlength="1" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['thousands_separator'], ENT_QUOTES, 'UTF-8');
        ?>
" id="thousands_separator_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="decimal_separator_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("dec_sign");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_currencies_update_dec_sign")), 0);
        ?>
:</label>
        <div class="controls">
            <input type="text" name="currency_data[decimals_separator]" size="1" maxlength="1" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['decimals_separator'], ENT_QUOTES, 'UTF-8');
        ?>
" id="decimal_separator_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="decimals_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("decimals");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_currencies_update_decimals")), 0);
        ?>
:</label>
       <div class="controls">
            <input type="text" name="currency_data[decimals]" size="1" maxlength="2" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['decimals'], ENT_QUOTES, 'UTF-8');
        ?>
" id="decimals_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
       </div>
    </div>
    </fieldset>
</div>

<?php 
        if (fn_allow_save_object('', '', true)) {
            ?>
    <div class="buttons-container">
        <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[currencies.update]", 'cancel_action' => "close", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0);
            ?>

    </div>
<?php 
        }
        ?>

</form>
<!--content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
--></div>
<?php 
    }
    function content_55deab25236ec0_75734762($_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('general', 'variants', 'categories', 'name', 'feature_code', 'position', 'description', 'type', 'group', 'checkbox', 'single', 'multiple', 'selectbox', 'text', 'number', 'brand_type', 'others', 'text', 'number', 'date', 'warning_variants_removal', 'group', 'none', 'feature_display_on_product', 'tt_views_product_features_update_feature_display_on_product', 'feature_display_on_catalog', 'tt_views_product_features_update_feature_display_on_catalog', 'feature_display_on_header', 'tt_views_product_features_update_feature_display_on_header', '_feature_variants_images', 'prefix', 'tt_views_product_features_update_prefix', 'suffix', 'tt_views_product_features_update_suffix', 'text_all_categories_included'));
        if ($_smarty_tpl->tpl_vars['feature']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['feature']->value['feature_id'], null, 0);
        } else {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['is_group']->value == true) {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(@constant('NEW_FEATURE_GROUP_ID'), null, 0);
                ?>
    <?php 
            } else {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
                ?>
    <?php 
            }
        }
        ?>

<?php 
        $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(true, null, 0);
        if (fn_allowed_for("ULTIMATE")) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["allow_save"] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['feature']->value, "product_features"), null, 0);
        }
        ?>

<?php 
        $_smarty_tpl->tpl_vars['hide_inputs_class'] = new Smarty_variable('', null, 0);
        if (fn_check_form_permissions('') || !$_smarty_tpl->tpl_vars['allow_save']->value) {
            $_smarty_tpl->tpl_vars['hide_inputs_class'] = new Smarty_variable("cm-hide-inputs", null, 0);
        }
        ?>

    <script type="text/javascript">
        function show_additional_images_actions(checkboxValue){
            if(checkboxValue)
                $('.feature_variant_details').show();
            else
                $('.feature_variant_details').hide();
        }
        function show_additional_images_block(myId){
            $('tr#extra_'+myId).toggle();
        }
    </script>

<div id="content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" method="post" name="update_features_form_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="form-horizontal form-edit  cm-disable-empty-files <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['hide_inputs_class']->value, ENT_QUOTES, 'UTF-8');
        ?>
" enctype="multipart/form-data">

<input type="hidden" class="cm-no-hide-input" name="redirect_url" value="<?php 
        echo htmlspecialchars($_REQUEST['return_url'], ENT_QUOTES, 'UTF-8');
        ?>
" />
<input type="hidden" class="cm-no-hide-input" name="feature_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />

<div class="tabs cm-j-tabs">
    <ul class="nav nav-tabs">
        <li id="tab_details_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js active"><a><?php 
        echo $_smarty_tpl->__("general");
        ?>
</a></li>
        <li id="tab_variants_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js cm-ajax <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] && strpos("SMNE", $_smarty_tpl->tpl_vars['feature']->value['feature_type']) === false || !$_smarty_tpl->tpl_vars['feature']->value) {
            ?>
hidden<?php 
        }
        ?>
"><a href="<?php 
        echo htmlspecialchars(fn_url("product_features.get_variants?feature_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&feature_type=" . (string) $_smarty_tpl->tpl_vars['feature']->value['feature_type']), ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("variants");
        ?>
</a></li>
        <li id="tab_categories_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-js <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['parent_id']) {
            ?>
 hidden<?php 
        }
        ?>
"><a><?php 
        echo $_smarty_tpl->__("categories");
        ?>
</a></li>
    </ul>
</div>

<div class="cm-tabs-content" id="tabs_content_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
    
    <div id="content_tab_details_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
    <fieldset>
        <div class="control-group">
            <label class="control-label cm-required" for="elm_feature_name_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("name");
        ?>
</label>
            <div class="controls">
            <input class="span9" type="text" name="feature_data[description]" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['description'], ENT_QUOTES, 'UTF-8');
        ?>
" id="elm_feature_name_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>
        
        <?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' => "feature_data[company_id]", 'id' => "elm_feature_data_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'selected' => $_smarty_tpl->tpl_vars['feature']->value['company_id']), 0);
            ?>

        <?php 
        }
        ?>

        <div class="control-group">
            <label class="control-label" for="elm_feature_code_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("feature_code");
        ?>
</label>
            <div class="controls">
                <input type="text" size="3" name="feature_data[feature_code]" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['feature_code'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-medium" id="elm_feature_code_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_feature_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("position");
        ?>
</label>
            <div class="controls">
                <input type="text" size="3" name="feature_data[position]" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['position'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-medium" id="elm_feature_position_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_feature_description_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("description");
        ?>
</label>
            <div class="controls">
                <textarea name="feature_data[full_description]" cols="55" rows="4" class="span9 cm-wysiwyg" id="elm_feature_description_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['full_description'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
            </div>
        </div>

        <?php 
        if ($_smarty_tpl->tpl_vars['is_group']->value || $_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "G") {
            ?>
            <input type="hidden" name="feature_data[feature_type]" value="G" />
        <?php 
        } else {
            ?>
        <div class="control-group">
            <label class="control-label cm-required" for="elm_feature_type_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("type");
            ?>
</label>
            <div class="controls">
            <?php 
            if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "G") {
                echo $_smarty_tpl->__("group");
            } else {
                ?>
                <select name="feature_data[feature_type]" id="elm_feature_type_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-feature-id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" class="cm-feature-type <?php 
                if (!$_smarty_tpl->tpl_vars['id']->value) {
                    ?>
cm-new-feature<?php 
                }
                ?>
">
                    <optgroup label="<?php 
                echo $_smarty_tpl->__("checkbox");
                ?>
">
                        <option value="C" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "C") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("single");
                ?>
</option>
                        <option value="M" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "M") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("multiple");
                ?>
</option>
                    </optgroup>
                    <optgroup label="<?php 
                echo $_smarty_tpl->__("selectbox");
                ?>
">
                        <option value="S" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "S") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("text");
                ?>
</option>
                        <option value="N" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "N") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("number");
                ?>
</option>
                        <option value="E" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "E") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("brand_type");
                ?>
</option>
                    </optgroup>
                    <optgroup label="<?php 
                echo $_smarty_tpl->__("others");
                ?>
">
                        <option value="T" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "T") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("text");
                ?>
</option>
                        <option value="O" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "O") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("number");
                ?>
</option>
                        <option value="D" <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "D") {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->__("date");
                ?>
</option>
                    </optgroup>
                </select>
                <div class="error-message feature_type_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" style="display: none" id="warning_feature_change_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><div class="arrow"></div><div class="message"><p><?php 
                echo $_smarty_tpl->__("warning_variants_removal");
                ?>
</p></div></div>
            <?php 
            }
            ?>
            </div>
        </div>
            <div class="control-group">
            <label class="control-label" for="elm_feature_group_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("group");
            ?>
</label>
            <div class="controls">
            <?php 
            if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == "G") {
                ?>
-<?php 
            } else {
                ?>
                <select name="feature_data[parent_id]" id="elm_feature_group_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-feature-id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" class="cm-feature-group">
                    <option value="0">-<?php 
                echo $_smarty_tpl->__("none");
                ?>
-</option>
                    <?php 
                $_smarty_tpl->tpl_vars["group_feature"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["group_feature"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['group_features']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["group_feature"]->key => $_smarty_tpl->tpl_vars["group_feature"]->value) {
                    $_smarty_tpl->tpl_vars["group_feature"]->_loop = true;
                    ?>
                        <?php 
                    if ($_smarty_tpl->tpl_vars['group_feature']->value['feature_type'] == "G") {
                        ?>
                            <option data-ca-display-on-product="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['display_on_product'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-display-on-catalog="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['display_on_catalog'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-display-on-header="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['display_on_header'], ENT_QUOTES, 'UTF-8');
                        ?>
" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                        if ($_smarty_tpl->tpl_vars['group_feature']->value['feature_id'] == $_smarty_tpl->tpl_vars['feature']->value['parent_id']) {
                            ?>
selected="selected"<?php 
                        }
                        ?>
><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['description'], ENT_QUOTES, 'UTF-8');
                        ?>
</option>
                        <?php 
                    }
                    ?>
                    <?php 
                }
                ?>
                </select>
            <?php 
            }
            ?>
            </div>
        </div>
        <?php 
        }
        ?>
        <div class="control-group">
            <label class="control-label" for="elm_feature_display_on_product_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("feature_display_on_product");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_features_update_feature_display_on_product")), 0);
        ?>
</label>
            <div class="controls">
            <input type="hidden" name="feature_data[display_on_product]" value="N" />
            <input type="checkbox" name="feature_data[display_on_product]" value="Y" data-ca-display-id="OnProduct" <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['display_on_product'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['parent_id'] && $_smarty_tpl->tpl_vars['group_features']->value[$_smarty_tpl->tpl_vars['feature']->value['parent_id']]['display_on_product'] == "Y") {
            ?>
disabled="disabled"<?php 
        }
        ?>
/>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_feature_display_on_catalog_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("feature_display_on_catalog");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_features_update_feature_display_on_catalog")), 0);
        ?>
</label>
            <div class="controls">
            <input type="hidden" name="feature_data[display_on_catalog]" value="N" />
            <input type="checkbox" name="feature_data[display_on_catalog]" value="Y"  data-ca-display-id="OnCatalog" <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['display_on_catalog'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['parent_id'] && $_smarty_tpl->tpl_vars['group_features']->value[$_smarty_tpl->tpl_vars['feature']->value['parent_id']]['display_on_catalog'] == "Y") {
            ?>
disabled="disabled"<?php 
        }
        ?>
 />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_feature_display_on_header_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("feature_display_on_header");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_features_update_feature_display_on_header")), 0);
        ?>
</label>
            <div class="controls">
            <input type="hidden" name="feature_data[display_on_header]" value="N" />
            <input type="checkbox" name="feature_data[display_on_header]" value="Y"  data-ca-display-id="OnHeader" <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['display_on_header'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['parent_id'] && $_smarty_tpl->tpl_vars['group_features']->value[$_smarty_tpl->tpl_vars['feature']->value['parent_id']]['display_on_header'] == "Y") {
            ?>
disabled="disabled"<?php 
        }
        ?>
 />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="elm_feature_variants_images_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
"><?php 
        echo $_smarty_tpl->__("_feature_variants_images");
        ?>
</label>
            <div class="controls">
            <input type="hidden" name="feature_data[feature_variants_images]" value="0" />
            <input type="checkbox" name="feature_data[feature_variants_images]" value="1"  data-ca-display-id="OnVariantImg" <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['feature_variants_images'] == "1") {
            ?>
checked="checked"<?php 
        }
        ?>
 <?php 
        if ($_smarty_tpl->tpl_vars['feature']->value['parent_id'] && $_smarty_tpl->tpl_vars['group_features']->value[$_smarty_tpl->tpl_vars['feature']->value['parent_id']]['feature_variants_images'] == "1") {
            ?>
disabled="disabled"<?php 
        }
        ?>
 onchange="show_additional_images_actions($(this).prop('checked'))" />
            </div>
        </div>    
        <?php 
        if (!$_smarty_tpl->tpl_vars['feature']->value && !$_smarty_tpl->tpl_vars['is_group']->value || $_smarty_tpl->tpl_vars['feature']->value['feature_type'] && $_smarty_tpl->tpl_vars['feature']->value['feature_type'] != "G") {
            ?>
        <div class="control-group">
            <label class="control-label" for="elm_feature_prefix_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("prefix");
            echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_features_update_prefix")), 0);
            ?>
</label>
            <div class="controls">
            <input type="text" name="feature_data[prefix]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['prefix'], ENT_QUOTES, 'UTF-8');
            ?>
" id="elm_feature_prefix_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_feature_suffix_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("suffix");
            echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_product_features_update_suffix")), 0);
            ?>
</label>
            <div class="controls">
            <input type="text" name="feature_data[suffix]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['suffix'], ENT_QUOTES, 'UTF-8');
            ?>
" id="elm_feature_suffix_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
" /></div>
        </div>
        <?php 
        }
        ?>
        
        <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "product_features:properties"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "product_features:properties"), 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' => "product_features:properties"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

    </fieldset>
    <!--content_tab_details_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
--></div>
    
    <?php 
        if ($_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['id']->value != "0G") {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("views/product_features/components/variants_list.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>

    <?php 
        }
        ?>
    <?php 
        if (!$_smarty_tpl->tpl_vars['feature']->value['parent_id']) {
            ?>
    <div class="hidden" id="content_tab_categories_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
    <?php 
            if ($_smarty_tpl->tpl_vars['feature']->value['categories_path']) {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["items"] = new Smarty_variable(explode(",", $_smarty_tpl->tpl_vars['feature']->value['categories_path']), 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, 'multiple' => true, 'input_name' => "feature_data[categories_path]", 'item_ids' => $_smarty_tpl->tpl_vars['items']->value, 'data_id' => "category_ids_" . (string) $_smarty_tpl->tpl_vars['id']->value, 'no_item_text' => __("text_all_categories_included"), 'use_keys' => "N", 'owner_company_id' => $_smarty_tpl->tpl_vars['feature']->value['company_id'], 'but_meta' => "pull-right"), 0);
            ?>


    <!--content_tab_categories_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
--></div>
    <?php 
        }
        ?>

</div>

<div class="buttons-container">
    <?php 
        if (fn_allowed_for("ULTIMATE") && !$_smarty_tpl->tpl_vars['allow_save']->value) {
            ?>
        <?php 
            $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable(true, null, 0);
            ?>
    <?php 
        }
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[product_features.update]", 'cancel_action' => "close", 'hide_first_button' => $_smarty_tpl->tpl_vars['hide_first_button']->value, 'save' => $_smarty_tpl->tpl_vars['feature']->value['feature_id']), 0);
        ?>

</div>
</form>
<!--content_group<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
--></div><?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("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_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("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_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 
    }