function content_55dc7cc5c1a670_13636549($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_block_inline_script')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
        }
        fn_preload_lang_vars(array('information', 'name', 'description', 'edit_content_on_site', 'seo_meta_data', 'page_title', 'ttc_page_title', 'meta_description', 'meta_keywords', 'availability', 'usergroups', 'creation_date', 'use_avail_period', 'avail_from', 'avail_till', 'preview', 'clone_this_page', 'delete_this_page', 'pages'));
        if ($_smarty_tpl->tpl_vars['page_data']->value['page_id']) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['page_data']->value['page_id'], null, 0);
        } else {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['page_type']->value != @constant('PAGE_TYPE_LINK') && (!fn_allowed_for("ULTIMATE") || $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars['view_uri'] = new Smarty_variable(fn_get_preview_url("pages.view?page_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, $_smarty_tpl->tpl_vars['page_data']->value, $_smarty_tpl->tpl_vars['auth']->value['user_id']), 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['page_data']->value, "pages"), null, 0);
        }
        $_smarty_tpl->tpl_vars['show_save_btn'] = new Smarty_variable($_smarty_tpl->tpl_vars['allow_save']->value, null, 2);
        $_ptr = $_smarty_tpl->parent;
        while ($_ptr != null) {
            $_ptr->tpl_vars['show_save_btn'] = clone $_smarty_tpl->tpl_vars['show_save_btn'];
            $_ptr = $_ptr->parent;
        }
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        ?>

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

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

<div id="update_page_form_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page_id'], ENT_QUOTES, 'UTF-8');
        ?>
">
    <input type="hidden" class="cm-no-hide-input" id="selected_section" name="selected_section" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8');
        ?>
"/>
    <input type="hidden" class="cm-no-hide-input" id="page_id" name="page_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
    <input type="hidden" class="cm-no-hide-input" name="page_data[page_type]" id="page_type" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['page_type']->value, ENT_QUOTES, 'UTF-8');
        ?>
"/>
    <input type="hidden" class="cm-no-hide-input" name="come_from" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['come_from']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
    <input type="hidden" class="cm-no-hide-input" name="result_ids" value="update_page_form_<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page_id'], ENT_QUOTES, 'UTF-8');
        ?>
"/>

    <div id="content_basic">

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

    <div id="pages_information_setting" class="in collapse">
    <fieldset>
        <?php 
        echo $_smarty_tpl->getSubTemplate("views/pages/components/parent_page_selector.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>


        <div class="control-group">
            <label for="elm_page_name" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("name");
        ?>
:</label>
            <div class="controls">
                <input type="text" name="page_data[page]" id="elm_page_name" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-large" />
            </div>
        </div>

        <?php 
        if ($_smarty_tpl->tpl_vars['page_data']->value['parent_id'] != 0 && $_smarty_tpl->tpl_vars['page_data']->value['page_id'] != 0) {
            ?>
            <?php 
            $_smarty_tpl->tpl_vars["disable_company_picker"] = new Smarty_variable(true, null, 0);
            ?>
        <?php 
        }
        ?>
        <?php 
        if (fn_allowed_for("MULTIVENDOR")) {
            ?>
            <?php 
            $_smarty_tpl->tpl_vars["zero_company_id_name_lang_var"] = new Smarty_variable("none", 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' => "page_data[company_id]", 'id' => "elm_page_data_company_id", 'zero_company_id_name_lang_var' => $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var']->value, 'selected' => $_smarty_tpl->tpl_vars['page_data']->value['company_id'], 'reload_form' => true, 'disable_company_picker' => $_smarty_tpl->tpl_vars['disable_company_picker']->value), 0);
        ?>


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


        <?php 
            if ($_smarty_tpl->tpl_vars['page_type']->value != @constant('PAGE_TYPE_LINK')) {
                ?>
        <div class="control-group">
            <label class="control-label" for="elm_page_descr"><?php 
                echo $_smarty_tpl->__("description");
                ?>
:</label>
            <div class="controls">
                <textarea id="elm_page_descr" name="page_data[description]" cols="55" rows="8" class="cm-wysiwyg input-large"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['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['page_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 
            }
            ?>

        <?php 
            if ($_smarty_tpl->tpl_vars['page_type']->value == @constant('PAGE_TYPE_LINK')) {
                ?>
            <?php 
                echo $_smarty_tpl->getSubTemplate("views/pages/components/pages_link.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

        <?php 
            }
            ?>

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


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


    </fieldset>
    </div>

    <?php 
        if ($_smarty_tpl->tpl_vars['page_type']->value != @constant('PAGE_TYPE_LINK')) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("seo_meta_data"), 'target' => "#pages_seo_meta_data_setting"), 0);
            ?>

    <div id="pages_seo_meta_data_setting" class="in collapse">
        <fieldset>

            <div class="control-group">
                <label class="control-label" for="elm_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="page_data[page_title]" id="elm_page_title" size="55" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['page_title'], ENT_QUOTES, 'UTF-8');
            ?>
" class="input-large" />
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="elm_page_meta_descr"><?php 
            echo $_smarty_tpl->__("meta_description");
            ?>
:</label>
                <div class="controls">
                    <textarea name="page_data[meta_description]" id="elm_page_meta_descr" cols="55" rows="2" class="input-large"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['meta_description'], ENT_QUOTES, 'UTF-8');
            ?>
</textarea>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="elm_page_meta_keywords"><?php 
            echo $_smarty_tpl->__("meta_keywords");
            ?>
:</label>
                <div class="controls">
                    <textarea name="page_data[meta_keywords]" id="elm_page_meta_keywords" cols="55" rows="2" class="input-large"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['page_data']->value['meta_keywords'], ENT_QUOTES, 'UTF-8');
            ?>
</textarea>
                </div>
            </div>

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

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


  <div id="pages_availability_setting" class="in collapse">
      <fieldset>
          <?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' => "page_data[usergroup_ids]", 'usergroups' => fn_get_usergroups(array("type" => "C", "status" => array("A", "H")), @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['page_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
            ?>

                      </div>
              </div>
          <?php 
        }
        ?>
          <div class="control-group">
              <label class="control-label" for="elm_page_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_page_date", 'date_name' => "page_data[timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['page_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_name' => "page_data[localization]", 'data_from' => $_smarty_tpl->tpl_vars['page_data']->value['localization']), 0);
        ?>


          <div class="control-group">
              <label class="control-label" for="elm_page_use_avail_period"><?php 
        echo $_smarty_tpl->__("use_avail_period");
        ?>
:</label>
              <div class="controls">
                  <input type="hidden" name="page_data[use_avail_period]" value="N">
                    <span class="checkbox">
                        <input type="checkbox" name="page_data[use_avail_period]" id="elm_page_use_avail_period" <?php 
        if ($_smarty_tpl->tpl_vars['page_data']->value['use_avail_period'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 value="Y"  onclick="fn_activate_calendar(this);">
                    </span>
              </div>
          </div>

          <?php 
        $_smarty_tpl->_capture_stack[0][] = array("calendar_disable", null, null);
        ob_start();
        if ($_smarty_tpl->tpl_vars['page_data']->value['use_avail_period'] != "Y") {
            ?>
disabled="disabled"<?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="control-group">
              <label class="control-label" for="elm_page_avail_from"><?php 
        echo $_smarty_tpl->__("avail_from");
        ?>
:</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_page_avail_from", 'date_name' => "page_data[avail_from_timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['page_data']->value['avail_from_timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year'], 'extra' => Smarty::$_smarty_vars['capture']['calendar_disable']), 0);
        ?>

              </div>
          </div>

          <div class="control-group">
              <label class="control-label" for="elm_page_avail_till"><?php 
        echo $_smarty_tpl->__("avail_till");
        ?>
:</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_page_avail_till", 'date_name' => "page_data[avail_till_timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['page_data']->value['avail_till_timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year'], 'extra' => Smarty::$_smarty_vars['capture']['calendar_disable']), 0);
        ?>

              </div>
          </div>
    </fieldset>
  </div>
        
            <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('inline_script', array());
        $_block_repeat = true;
        echo smarty_block_inline_script(array(), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            echo '<script';
            ?>
 language="javascript">
                function fn_activate_calendar(el)
                {
                    Tygh.$('#elm_page_avail_from').prop('disabled', !el.checked);
                    Tygh.$('#elm_page_avail_till').prop('disabled', !el.checked);
                }
            <?php 
            echo '</script';
            ?>
><?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_inline_script(array(), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

        

    </div>

    <div id="content_addons">
        <?php 
        if ($_smarty_tpl->tpl_vars['page_type']->value != @constant('PAGE_TYPE_LINK')) {
            ?>
            <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "pages:detailed_content"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "pages: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' => "pages:detailed_content"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

        <?php 
        }
        ?>
    </div>

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


<?php 
        if (!$_smarty_tpl->tpl_vars['id']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_smarty_tpl->__($_smarty_tpl->tpl_vars['page_type_data']->value['new_name']), null, 0);
        } else {
            ?>
    <?php 
            ob_start();
            echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['page_type_data']->value['edit_name']);
            $_tmp3 = ob_get_clean();
            $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp3 . ": " . (string) $_smarty_tpl->tpl_vars['page_data']->value['page'], null, 0);
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["select_languages"] = new Smarty_variable(true, null, 0);
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['view_uri']->value) {
                ?>
        <?php 
                $_smarty_tpl->_capture_stack[0][] = array("preview", null, null);
                ob_start();
                ?>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("preview"), 'href' => $_smarty_tpl->tpl_vars['view_uri']->value));
                ?>
</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 
            }
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
        ob_start();
        ?>
    <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
        <?php 
            $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
            ob_start();
            ?>

            <?php 
            $_smarty_tpl->tpl_vars["_p"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["_p"]->_loop = false;
            $_smarty_tpl->tpl_vars["_k"] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['page_types']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["_p"]->key => $_smarty_tpl->tpl_vars["_p"]->value) {
                $_smarty_tpl->tpl_vars["_p"]->_loop = true;
                $_smarty_tpl->tpl_vars["_k"]->value = $_smarty_tpl->tpl_vars["_p"]->key;
                ?>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __($_smarty_tpl->tpl_vars['_p']->value['add_name']), 'href' => "pages.add?page_type=" . (string) $_smarty_tpl->tpl_vars['_k']->value . "&parent_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&come_from=" . (string) $_smarty_tpl->tpl_vars['come_from']->value));
                ?>
</li>
            <?php 
            }
            ?>

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

            <li class="divider"></li>
            <?php 
            echo Smarty::$_smarty_vars['capture']['preview'];
            ?>

            <?php 
            if ($_smarty_tpl->tpl_vars['id']->value) {
                ?>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'class' => "cm-post", 'text' => __("clone_this_page"), 'href' => "pages.clone?page_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&come_from=" . (string) $_smarty_tpl->tpl_vars['come_from']->value));
                ?>
</li>
            <?php 
            }
            ?>
            <?php 
            if ($_smarty_tpl->tpl_vars['allow_save']->value) {
                ?>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete_this_page"), 'class' => "cm-confirm cm-post", 'href' => "pages.delete?page_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&come_from=" . (string) $_smarty_tpl->tpl_vars['come_from']->value));
                ?>
</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 
        }
        ?>
    <?php 
        smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
        ?>


    <?php 
        if (!$_smarty_tpl->tpl_vars['show_save_btn']->value) {
            ?>
        <?php 
            $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable(true, null, 0);
            ?>
        <?php 
            $_smarty_tpl->tpl_vars["hide_second_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[pages.update]", 'hide_first_button' => $_smarty_tpl->tpl_vars['hide_first_button']->value, 'hide_second_button' => $_smarty_tpl->tpl_vars['hide_second_button']->value, 'but_target_form' => "page_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();
        }
        ?>

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

<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "pages:tabs_extra"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "pages: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' => "pages:tabs_extra"), $_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();
        }
        echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], '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->_capture_stack[0][] = array("sidebar", null, null);
        ob_start();
        if ($_smarty_tpl->tpl_vars['pages_tree']->value) {
            ?>
    <div class="sidebar-row">
        <h6><?php 
            echo $_smarty_tpl->__("pages");
            ?>
</h6>
        <div class="nested-tree">
            <?php 
            echo $_smarty_tpl->getSubTemplate("views/pages/components/pages_links_tree.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('show_all' => false, 'pages_tree' => $_smarty_tpl->tpl_vars['pages_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 
        echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['_title']->value, 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'sidebar_position' => "left", 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons']), 0);
        ?>

<?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 
    }
Example #3
0
     }
     Tygh::$app['view']->assign('has_inventory', $has_inventory);
 }
 Tygh::$app['view']->assign('product_options', $product_options);
 list($global_options) = fn_get_product_global_options();
 Tygh::$app['view']->assign('global_options', $global_options);
 // If the product is electronnicaly distributed, get the assigned files
 list($product_files) = fn_get_product_files(array('product_id' => $_REQUEST['product_id']));
 list($product_file_folders) = fn_get_product_file_folders(array('product_id' => $_REQUEST['product_id']));
 $files_tree = fn_build_files_tree($product_file_folders, $product_files);
 $sharing_company_id = Registry::get('runtime.company_id') ? Registry::get('runtime.company_id') : $product_data['company_id'];
 // Preview URL only exists for companies that have this product shared
 if (fn_allowed_for('ULTIMATE') && !in_array($sharing_company_id, $product_data['shared_between_companies'])) {
     $preview_url = null;
 } else {
     $preview_url = fn_get_preview_url("products.view?product_id={$_REQUEST['product_id']}", $product_data, $auth['user_id']);
 }
 Tygh::$app['view']->assign('view_uri', $preview_url);
 Tygh::$app['view']->assign('product_file_folders', $product_file_folders);
 Tygh::$app['view']->assign('product_files', $product_files);
 Tygh::$app['view']->assign('files_tree', $files_tree);
 Tygh::$app['view']->assign('expand_all', true);
 list($subscribers, $search) = fn_get_product_subscribers($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'));
 Tygh::$app['view']->assign('product_subscribers', $subscribers);
 Tygh::$app['view']->assign('product_subscribers_search', $search);
 // [Page sections]
 $tabs = array('detailed' => array('title' => __('general'), 'js' => true), 'images' => array('title' => __('images'), 'js' => true), 'seo' => array('title' => __('seo'), 'js' => true), 'options' => array('title' => __('options'), 'js' => true), 'shippings' => array('title' => __('shipping_properties'), 'js' => true), 'qty_discounts' => array('title' => __('qty_discounts'), 'js' => true));
 if (Registry::get('settings.General.enable_edp') == 'Y') {
     $tabs['files'] = array('title' => __('sell_files'), 'js' => true);
 }
 $tabs['subscribers'] = array('title' => __('subscribers'), 'js' => true);
    function content_55ccecdba30c89_12567377($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
        }
        if (!is_callable('smarty_modifier_in_array')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.in_array.php';
        }
        fn_preload_lang_vars(array('information', 'name', 'subtitle', 'top_title', 'text_ult_product_store_field_tooltip', 'categories', 'tt_views_products_update_categories', 'price', 'full_description', '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', 'display_quantity', 'availability', 'usergroups', 'ttc_usergroups', 'creation_date', 'available_since', 'command_period', 'period_days_text', 'ls_order_processing', 'period_days_text', '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'));
        ?>

    <script language="JavaScript" type="text/JavaScript">
        function update_option_variants_link_to_product(productId){
            var new_price = $('#elm_price_price').val();
            var updateLink = '<?php 
        echo htmlspecialchars(fn_url("products.update_all_linked_variants"), ENT_QUOTES, 'UTF-8');
        ?>
&product_id='+productId+'&new_price='+new_price;
            $('#ajax_loading_box').show();
            $.ceAjax('request', updateLink, {
                cache: false,
                method: 'GET',
                callback: function(data) {
                    $('#ajax_loading_box').hide();
                }
            });
        }
    </script>



<?php 
        $_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>
                      
                        <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_subtitle" class="control-label"><?php 
        echo $_smarty_tpl->__("subtitle");
        ?>
</label>
                        <div class="controls">
                            <input class="input-large" form="form" type="text" name="product_data[subtitle]" id="product_subtitle" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['subtitle'], 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' => 'subtitle', 'name' => "update_all_vendors[subtitle]"), 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 for="product_top_title" class="control-label"><?php 
        echo $_smarty_tpl->__("top_title");
        ?>
</label>
                        <div class="controls">
                            <input class="input-large" form="form" type="text" name="product_data[top_title]" id="product_top_title" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value['top_title'], 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' => 'top_title', 'name' => "update_all_vendors[top_title]"), 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);
        ?>

                            <?php 
        if ($_smarty_tpl->tpl_vars['showUpdateLinkedVariantsButton']->value) {
            ?>

                                <span id="update_variant_linked_price">
                                    <!--<a class="btn btn-primary cm-tooltip cm-tooltip cm-ajax delete" name="link_to_product" title=""  onclick="update_option_variants_link_to_product(<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
);return false;">update linked variants</a>&nbsp; -->
                                    <a class="btn btn-primary hand cm-dialog-opener cm-dialog-auto-size cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url("products.show_all_linked_variants&product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id="option_links_to_products_" name="links_product" data-ca-dialog-title="Legaturile cu acest produs" data-original-title="products" title="">update linked variants</a>&nbsp;
                                </span>
                            <?php 
        }
        ?>

                        </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>
                        </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'] == "O") {
            ?>

                                <?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="O" <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == "O" && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("track_with_options");
            ?>
</option>
                                <?php 
        }
        ?>

                                <option value="B" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == "B" && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("track_without_options");
        ?>
</option>
                                <option value="D" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['tracking'] == "D" || $_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 class="control-group">
                        <label class="control-label" for="elm_ls_display_quantity"><?php 
        echo $_smarty_tpl->__("display_quantity");
        ?>
:</label>
                        <div class="controls">
                            <label class="checkbox">
                                <input type="hidden" name="product_data[ls_display_quantity]" value="N"/>
                                <input type="checkbox" name="product_data[ls_display_quantity]" id="elm_ls_display_quantity" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['product_data']->value['ls_display_quantity'] === "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
/>
                            </label>
                        </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");
            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' => "product_data[usergroup_ids]", 'usergroups' => fn_get_usergroups("C", @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_comm_period"><?php 
        echo $_smarty_tpl->__("command_period");
        ?>
:</label>
                        <div class="controls">
                            <input type="text" name="product_data[comm_period]" id="elm_comm_period" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['comm_period']) === null || $tmp === '' ? "10" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" /> <?php 
        echo $_smarty_tpl->__("period_days_text");
        ?>

                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_ls_order_processing"><?php 
        echo $_smarty_tpl->__("ls_order_processing");
        ?>
:</label>
                        <span style="display: none"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_data']->value, ENT_QUOTES, 'UTF-8');
        ?>
</span>
                        <div class="controls">
                            <input type="text" name="product_data[ls_order_processing]" id="elm_ls_order_processing" size="10" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['ls_order_processing']) === null || $tmp === '' ? "3" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" class="input-small" /> <?php 
        echo $_smarty_tpl->__("period_days_text");
        ?>

                        </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>

                    <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 
        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(), 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->tpl_vars['view_uri'] = new Smarty_variable(fn_get_preview_url("products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, $_smarty_tpl->tpl_vars['product_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' => "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();
                ?>

                        <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", 'text' => __("clone"), '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", '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>
            

            
            <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>
            

            
            <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");
                $_tmp1 = ob_get_clean();
                echo htmlspecialchars(preg_replace('!<[^>]*?>!', ' ', $_tmp1 . ": " . (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();
                }
                ?>

<?php 
            } 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 
            }
            ?>


<?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);
    }