function content_55db8f57a02b71_27074353($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        fn_preload_lang_vars(array('position_short', 'image', 'name', 'sku', 'price', 'list_price', 'purchased_qty', 'subtotal_sum', 'quantity', 'status', 'sku', 'edit', 'edit', 'delete', 'no_data', 'text_select_fields2edit_note', 'modify_selected', 'global_update', 'bulk_product_addition', 'product_subscriptions', 'edit_selected', 'clone_selected', 'export_selected', 'add_product', 'select_fields_to_edit', 'products'));
        $_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="manage_products_form" id="manage_products_form">
<input type="hidden" name="category_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['cid'], ENT_QUOTES, 'UTF-8');
        ?>
" />

<?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('save_current_page' => true, 'save_current_url' => true, 'div_id' => $_REQUEST['content_id']), 0);
        ?>


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

<?php 
        $_smarty_tpl->tpl_vars["rev"] = new Smarty_variable(($tmp = @$_REQUEST['content_id']) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
        $_smarty_tpl->tpl_vars["c_icon"] = new Smarty_variable("<i class=\"exicon-" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] . "\"></i>", null, 0);
        $_smarty_tpl->tpl_vars["c_dummy"] = new Smarty_variable("<i class=\"exicon-dummy\"></i>", null, 0);
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['products']->value) {
            ?>
<table width="100%" class="table table-middle">
<thead>
<tr>
    <th class="left">
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/check_items.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('check_statuses' => fn_get_default_status_filters('', true)), 0);
            ?>

    </th>
    <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['cid'] && $_smarty_tpl->tpl_vars['search']->value['subcats'] != "Y") {
                ?>
    <th class="nowrap"><a class="cm-ajax" href="<?php 
                echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=position&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-target-id=<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
                ?>
><?php 
                echo $_smarty_tpl->__("position_short");
                if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "position") {
                    echo $_smarty_tpl->tpl_vars['c_icon']->value;
                } else {
                    echo $_smarty_tpl->tpl_vars['c_dummy']->value;
                }
                ?>
</a></th>
    <?php 
            }
            ?>
    <th width="5%"><span><?php 
            echo $_smarty_tpl->__("image");
            ?>
</span></th>
    <th width="45%"><a class="cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=product&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("name");
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "product") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a> /&nbsp;&nbsp;&nbsp; <a class="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
            ?>
" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=code&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("sku");
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "code") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a></th>
    <th width="15%"><a class="cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=price&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("price");
            ?>
 (<?php 
            echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
            ?>
)<?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "price") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a></th>
    <th width="15%"><a class="cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=list_price&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("list_price");
            ?>
 (<?php 
            echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
            ?>
)<?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "list_price") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a></th>
    <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['order_ids']) {
                ?>
    <th width="5%"><a class="cm-ajax" href="<?php 
                echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=p_qty&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-target-id=<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
                ?>
><?php 
                echo $_smarty_tpl->__("purchased_qty");
                if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "p_qty") {
                    echo $_smarty_tpl->tpl_vars['c_icon']->value;
                } else {
                    echo $_smarty_tpl->tpl_vars['c_dummy']->value;
                }
                ?>
</a></th>
    <th width="5%"><a class="cm-ajax" href="<?php 
                echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=p_subtotal&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-target-id=<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
                ?>
><?php 
                echo $_smarty_tpl->__("subtotal_sum");
                ?>
 (<?php 
                echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
                ?>
)<?php 
                if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "p_subtotal") {
                    echo $_smarty_tpl->tpl_vars['c_icon']->value;
                } else {
                    echo $_smarty_tpl->tpl_vars['c_dummy']->value;
                }
                ?>
</a></th>
    <?php 
            }
            ?>
    <th width="5%" class="nowrap"><a class="cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=amount&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("quantity");
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "amount") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a></th>
    <th><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:manage_head"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:manage_head"), 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:manage_head"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
</th>
    <th width="5%">&nbsp;</th>
    <th width="10%" class="right"><a class="cm-ajax" href="<?php 
            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&sort_by=status&sort_order=" . (string) $_smarty_tpl->tpl_vars['search']->value['sort_order_rev']), ENT_QUOTES, 'UTF-8');
            ?>
" data-ca-target-id=<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['rev']->value, ENT_QUOTES, 'UTF-8');
            ?>
><?php 
            echo $_smarty_tpl->__("status");
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "status") {
                echo $_smarty_tpl->tpl_vars['c_icon']->value;
            } else {
                echo $_smarty_tpl->tpl_vars['c_dummy']->value;
            }
            ?>
</a></th>
</tr>
</thead>
<?php 
            $_smarty_tpl->tpl_vars['product'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['product']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['products']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value) {
                $_smarty_tpl->tpl_vars['product']->_loop = true;
                ?>

<?php 
                if (fn_allowed_for("ULTIMATE")) {
                    ?>
    <?php 
                    if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product']->value['is_shared_product'] == "Y" && $_smarty_tpl->tpl_vars['product']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id']) {
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["hide_inputs_if_shared_product"] = new Smarty_variable("cm-hide-inputs", null, 0);
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["no_hide_input_if_shared_product"] = new Smarty_variable("cm-no-hide-input", null, 0);
                        ?>
    <?php 
                    } else {
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["hide_inputs_if_shared_product"] = new Smarty_variable('', null, 0);
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["no_hide_input_if_shared_product"] = new Smarty_variable('', null, 0);
                        ?>
    <?php 
                    }
                    ?>
    <?php 
                    if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['product']->value['is_shared_product'] == "Y") {
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["show_update_for_all"] = new Smarty_variable(true, null, 0);
                        ?>
    <?php 
                    } else {
                        ?>
        <?php 
                        $_smarty_tpl->tpl_vars["show_update_for_all"] = new Smarty_variable(false, null, 0);
                        ?>
    <?php 
                    }
                }
                ?>

<tr class="cm-row-status-<?php 
                echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['product']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['hide_inputs_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
    <td class="left">
    <input type="checkbox" name="product_ids[]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
" class="checkbox cm-item cm-item-status-<?php 
                echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['product']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8');
                ?>
" /></td>
    <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['cid'] && $_smarty_tpl->tpl_vars['search']->value['subcats'] != "Y") {
                    ?>
    <td class="<?php 
                    if ($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value) {
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
                    }
                    ?>
">
        <input type="text" name="products_data[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                    ?>
][position]" size="3" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['position'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="input-micro" /></td>
    <?php 
                }
                ?>
    <td>
        <?php 
                echo $_smarty_tpl->getSubTemplate("common/image.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image' => ($tmp = @$_smarty_tpl->tpl_vars['product']->value['main_pair']['icon']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['main_pair']['detailed'] : $tmp, 'image_id' => $_smarty_tpl->tpl_vars['product']->value['main_pair']['image_id'], 'image_width' => 50, 'href' => fn_url("products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'])), 0);
                ?>

    </td>
    <td>
        <input type="hidden" name="products_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
][product]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value) {
                    ?>
 class="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 />
        <a class="row-status" href="<?php 
                echo htmlspecialchars(fn_url("products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['product']->value['product'], 40);
                ?>
</a>
        <div class="product-code">
            <span class="product-code-label row-status"><?php 
                echo $_smarty_tpl->__("sku");
                ?>
 </span>
            <input type="text" name="products_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
][product_code]" size="15" maxlength="32" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_code'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-hidden span2" />
        </div>
        <?php 
                echo $_smarty_tpl->getSubTemplate("views/companies/components/company_name.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('object' => $_smarty_tpl->tpl_vars['product']->value), 0);
                ?>

    </td>
    <td class="<?php 
                if ($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['no_hide_input_if_shared_product']->value, 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' => "price_" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'name' => "update_all_vendors[price][" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'] . "]"), 0);
                ?>

        <input type="text" name="products_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
][price]" size="6" value="<?php 
                echo htmlspecialchars(fn_format_price($_smarty_tpl->tpl_vars['product']->value['price'], $_smarty_tpl->tpl_vars['primary_currency']->value, null, false), ENT_QUOTES, 'UTF-8');
                ?>
" class="input-mini input-hidden"/>
    </td>
    <td>
        <input type="text" name="products_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
][list_price]" size="6" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['list_price'], ENT_QUOTES, 'UTF-8');
                ?>
" class="input-mini input-hidden" /></td>
    <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['order_ids']) {
                    ?>
    <td><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['purchased_qty'], ENT_QUOTES, 'UTF-8');
                    ?>
</td>
    <td><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['purchased_subtotal'], ENT_QUOTES, 'UTF-8');
                    ?>
</td>
    <?php 
                }
                ?>
    <td>
        <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['tracking'] == smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
                    ?>
        <?php 
                    echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("edit"), 'but_href' => "product_options.inventory?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'but_role' => "edit"), 0);
                    ?>

        <?php 
                } else {
                    ?>
        <input type="text" name="products_data[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                    ?>
][amount]" size="6" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['amount'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="input-micro input-hidden" />
        <?php 
                }
                ?>
    </td>
    <td><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:manage_body"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:manage_body"), 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:manage_body"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
</td>
    <td class="nowrap">
        <div class="hidden-tools">
            <?php 
                $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
                ob_start();
                ?>
                <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:list_extra_links"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:list_extra_links"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

                    <li><?php 
                    smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("edit"), 'href' => "products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']));
                    ?>
</li>
                    <?php 
                    if (!$_smarty_tpl->tpl_vars['hide_inputs_if_shared_product']->value) {
                        ?>
                        <li><?php 
                        smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm cm-post", 'href' => "products.delete?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']));
                        ?>
</li>
                    <?php 
                    }
                    ?>
                <?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:list_extra_links"), $_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']));
                ?>

        </div>
    </td>
    <td class="right nowrap">
    <?php 
                echo $_smarty_tpl->getSubTemplate("common/select_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('popup_additional_class' => "dropleft", 'id' => $_smarty_tpl->tpl_vars['product']->value['product_id'], 'status' => $_smarty_tpl->tpl_vars['product']->value['status'], 'hidden' => true, 'object_id_name' => "product_id", 'table' => "products"), 0);
                ?>

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

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

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


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

</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

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

        <li><?php 
            smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("global_update"), 'href' => "products.global_update"));
            ?>
</li>
        <li><?php 
            smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("bulk_product_addition"), 'href' => "products.m_add"));
            ?>
</li>
        <li><?php 
            smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("product_subscriptions"), 'href' => "products.p_subscr"));
            ?>
</li>
		<?php 
            if ($_smarty_tpl->tpl_vars['products']->value) {
                ?>
            <li class="divider"></li>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "dialog", 'class' => "cm-process-items", 'text' => __("edit_selected"), 'target_id' => "content_select_fields_to_edit", 'form' => "manage_products_form"));
                ?>
</li>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("clone_selected"), 'dispatch' => "dispatch[products.m_clone]", 'form' => "manage_products_form"));
                ?>
</li>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("export_selected"), 'dispatch' => "dispatch[products.export_range]", 'form' => "manage_products_form"));
                ?>
</li>
            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "delete_selected", 'dispatch' => "dispatch[products.m_delete]", 'form' => "manage_products_form"));
                ?>
</li>
        <?php 
            }
            ?>
        <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:action_buttons"), $_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 
        if ($_smarty_tpl->tpl_vars['products']->value) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[products.m_update]", 'but_role' => "submit-button", 'but_target_form' => "manage_products_form"), 0);
            ?>

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

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

        <?php 
            echo $_smarty_tpl->getSubTemplate("common/tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tool_href' => "products.add", 'prefix' => "top", 'title' => __("add_product"), 'hide_tools' => true, 'icon' => "icon-plus"), 0);
            ?>

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

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

<?php 
        echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "select_fields_to_edit", 'text' => __("select_fields_to_edit"), 'content' => Smarty::$_smarty_vars['capture']['select_fields_to_edit']), 0);
        ?>


<div class="clearfix">
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('div_id' => $_REQUEST['content_id']), 0);
        ?>

</div>

</form>

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

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null);
        ob_start();
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/saved_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "products.manage", 'view_type' => "products"), 0);
        ?>

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

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

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

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

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

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

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

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

            

            <div class="product-manage" id="content_detailed"> 

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


                <div id="acc_information" class="collapse in">

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

                        </div>
                    </div>

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

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

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

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

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


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


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

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

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

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

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

                        </div>
                    </div>

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

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

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

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

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


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

                    <div class="control-group">
                        <label class="control-label"><?php 
            echo $_smarty_tpl->__("images");
            ?>
:</label>
                        <div class="controls">
                            <?php 
            echo $_smarty_tpl->getSubTemplate("common/attach_images.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_name' => "product_main", 'image_object_type' => "product", 'image_pair' => $_smarty_tpl->tpl_vars['product_data']->value['main_pair'], 'icon_text' => __("text_product_thumbnail"), 'detailed_text' => __("text_product_detailed_image"), 'no_thumbnail' => true), 0);
            ?>

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


                </div>

                <hr>

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

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

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

                <hr>

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

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

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

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

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

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

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

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

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

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

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

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

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

                <div id="acc_availability" class="collapse in">
                    <?php 
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
                        <div class="control-group">
                            <label class="control-label"><?php 
            echo $_smarty_tpl->__("usergroups");
            ?>
:</label>
                            <div class="controls">
                                <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "ug_id", 'name' => "product_data[usergroup_ids]", 'usergroups' => fn_get_usergroups(array("type" => "C", "status" => array("A", "H")), @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['product_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
            ?>

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

                    <div class="control-group">
                        <label class="control-label" for="elm_date_holder"><?php 
        echo $_smarty_tpl->__("creation_date");
        ?>
:</label>
                        <div class="controls">
                            <?php 
        echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "elm_date_holder", 'date_name' => "product_data[timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
        ?>

                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="elm_date_avail_holder"><?php 
        echo $_smarty_tpl->__("available_since");
        ?>
:</label>
                        <div class="controls">
                            <?php 
        echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "elm_date_avail_holder", 'date_name' => "product_data[avail_since]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['product_data']->value['avail_since']) === null || $tmp === '' ? '' : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
        ?>

                        </div>
                    </div>

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

                <hr>

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

                <div id="acc_extra" class="collapse in">
                    <div class="control-group">
                        <label class="control-label" for="elm_details_layout"><?php 
        echo $_smarty_tpl->__("product_details_view");
        ?>
:</label>
                        <div class="controls">
                            <select class="span5" id="elm_details_layout" name="product_data[details_layout]">
                                <?php 
        $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["item"]->_loop = false;
        $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable();
        $_from = fn_get_product_details_views($_smarty_tpl->tpl_vars['id']->value);
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) {
            $_smarty_tpl->tpl_vars["item"]->_loop = true;
            $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key;
            ?>
                                    <option <?php 
            if ($_smarty_tpl->tpl_vars['product_data']->value['details_layout'] == $_smarty_tpl->tpl_vars['layout']->value) {
                ?>
selected="selected"<?php 
            }
            ?>
 value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value, ENT_QUOTES, 'UTF-8');
            ?>
</option>
                                <?php 
        }
        ?>
                            </select>
                        </div>
                    </div>

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

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

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

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

                    <?php 
        echo $_smarty_tpl->getSubTemplate("views/localizations/components/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_from' => $_smarty_tpl->tpl_vars['product_data']->value['localization'], 'data_name' => "product_data[localization]"), 0);
        ?>


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

                        </div>
                    </div>

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

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

                        </div>
                    </div>

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

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

            

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

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

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

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

            </div> 
            

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

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

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

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

                        </div>
                    </div>

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

                        </div>
                    </div>

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

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

            </div>
            

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

            </div> 
            

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

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

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

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

            


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

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

            </div>


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

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


            
            <?php 
        $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
        ob_start();
        ?>
                <?php 
        echo $_smarty_tpl->getSubTemplate("common/view_tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('url' => "products.update?product_id="), 0);
        ?>


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

                            <?php 
                if ($_smarty_tpl->tpl_vars['view_uri']->value) {
                    ?>
                                <li><?php 
                    smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("preview"), 'href' => $_smarty_tpl->tpl_vars['view_uri']->value));
                    ?>
</li>
                                <li class="divider"></li>
                            <?php 
                }
                ?>
                            <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("clone"), 'class' => "cm-post", 'href' => "products.clone?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value));
                ?>
</li>
                            <?php 
                if ($_smarty_tpl->tpl_vars['allow_save']->value) {
                    ?>
                                <li><?php 
                    smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm cm-post", 'href' => "products.delete?product_id=" . (string) $_smarty_tpl->tpl_vars['id']->value));
                    ?>
</li>
                            <?php 
                }
                ?>
                        <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:update_tools_list"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

                    <?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>
                    <?php 
            smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
            ?>

                <?php 
        }
        ?>
                <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_role' => "submit-link", 'but_name' => "dispatch[products.update]", 'but_target_form' => "product_update_form", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0);
        ?>

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

        </form> 

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


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

            </div>
            

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

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

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

            </div>
            <?php 
            }
            ?>
            

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

            </div>
            
        <?php 
        }
        ?>

    <?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'group_name' => $_smarty_tpl->tpl_vars['runtime']->value['controller'], 'active_tab' => $_REQUEST['selected_section'], 'track' => true), 0);
        ?>


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

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


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

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

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

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


<?php 
        echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => Smarty::$_smarty_vars['capture']['mainbox_title'], 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'select_languages' => $_smarty_tpl->tpl_vars['id']->value, 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons']), 0);
    }
    function content_55e61f9b555597_02885983($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        fn_preload_lang_vars(array('none', 'enter_other', 'none', 'enter_other', 'enter_other', 'enter_other'));
        $_smarty_tpl->tpl_vars['feature'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['feature']->_loop = false;
        $_smarty_tpl->tpl_vars["feature_id"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['product_features']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['feature']->key => $_smarty_tpl->tpl_vars['feature']->value) {
            $_smarty_tpl->tpl_vars['feature']->_loop = true;
            $_smarty_tpl->tpl_vars["feature_id"]->value = $_smarty_tpl->tpl_vars['feature']->key;
            ?>
    <?php 
            $_smarty_tpl->tpl_vars['allow_enter_variant'] = new Smarty_variable(fn_allow_save_object($_smarty_tpl->tpl_vars['feature']->value, "product_features"), null, 0);
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] != smarty_modifier_enum("ProductFeatures::GROUP")) {
                ?>
        <div class="control-group">
            <label class="control-label" for="feature_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['description'], ENT_QUOTES, 'UTF-8');
                ?>
</label>
            <div class="controls">
            <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['prefix']) {
                    ?>
<span><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['prefix'], ENT_QUOTES, 'UTF-8');
                    ?>
</span><?php 
                }
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::TEXT_SELECTBOX") || $_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_SELECTBOX") || $_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::EXTENDED")) {
                    ?>
                <?php 
                    $_smarty_tpl->tpl_vars["value_selected"] = new Smarty_variable(false, null, 0);
                    ?>

                <?php 
                    if ($_smarty_tpl->tpl_vars['feature']->value['use_variant_picker']) {
                        ?>
                    <input type="hidden" name="product_data[product_features][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
]" id="feature_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" value="<?php 
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['selected']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['feature']->value['variant_id'] : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
" />
                    <?php 
                        if ($_smarty_tpl->tpl_vars['feature']->value['variants'][$_smarty_tpl->tpl_vars['feature']->value['variant_id']]['variant']) {
                            ?>
                        <?php 
                            $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable($_smarty_tpl->tpl_vars['feature']->value['variants'][$_smarty_tpl->tpl_vars['feature']->value['variant_id']]['variant'], null, 0);
                            ?>
                    <?php 
                        } elseif ($_smarty_tpl->tpl_vars['feature']->value['variant_id']) {
                            ?>
                        <?php 
                            $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable(fn_get_product_feature_variant($_smarty_tpl->tpl_vars['feature']->value['variant_id']), null, 0);
                            ?>
                        <?php 
                            $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable($_smarty_tpl->tpl_vars['selected_variant']->value['variant'], null, 0);
                            ?>
                    <?php 
                        } else {
                            ?>
                        <?php 
                            $_smarty_tpl->tpl_vars["selected_variant"] = new Smarty_variable($_smarty_tpl->__("none"), null, 0);
                            ?>
                    <?php 
                        }
                        ?>
                    <?php 
                        echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_url' => "product_features.get_feature_variants_list?feature_id=" . (string) $_smarty_tpl->tpl_vars['feature_id']->value, 'text' => $_smarty_tpl->tpl_vars['selected_variant']->value, 'result_elm' => "feature_" . (string) $_smarty_tpl->tpl_vars['feature_id']->value, 'id' => (string) $_smarty_tpl->tpl_vars['feature_id']->value . "_selector", 'js_action' => "Tygh." . "\$" . "('#input_" . (string) $_smarty_tpl->tpl_vars['feature_id']->value . "').toggleBy((Tygh." . "\$" . "('#feature_" . (string) $_smarty_tpl->tpl_vars['feature_id']->value . "').val() != 'disable_select'));"), 0);
                        ?>

                    <input type="text" class="hidden-input<?php 
                        if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_SELECTBOX")) {
                            ?>
 cm-value-decimal<?php 
                        }
                        ?>
" name="product_data[add_new_variant][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                        ?>
][variant]" id="input_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" placeholder="<?php 
                        echo $_smarty_tpl->__("enter_other");
                        ?>
" />
                <?php 
                    } else {
                        ?>
                    <select name="product_data[product_features][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
]" id="feature_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" onchange="Tygh.$('#input_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
').toggleBy((this.value != 'disable_select'));">
                        <option value="">-<?php 
                        echo $_smarty_tpl->__("none");
                        ?>
-</option>
                        <?php 
                        $_smarty_tpl->tpl_vars["var"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["var"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['feature']->value['variants'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["var"]->key => $_smarty_tpl->tpl_vars["var"]->value) {
                            $_smarty_tpl->tpl_vars["var"]->_loop = true;
                            ?>
                        <option value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant_id'], ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['var']->value['variant_id'] == $_smarty_tpl->tpl_vars['feature']->value['variant_id']) {
                                $_smarty_tpl->tpl_vars["value_selected"] = new Smarty_variable(true, null, 0);
                                ?>
selected="selected"<?php 
                            }
                            ?>
><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant'], ENT_QUOTES, 'UTF-8');
                            ?>
</option>
                        <?php 
                        }
                        ?>
                        <?php 
                        if ($_smarty_tpl->tpl_vars['allow_enter_variant']->value) {
                            ?>
                        <option value="disable_select">-<?php 
                            echo $_smarty_tpl->__("enter_other");
                            ?>
-</option>
                        <?php 
                        }
                        ?>
                    </select>
                    <input type="text" class="hidden-input<?php 
                        if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_SELECTBOX")) {
                            ?>
 cm-value-decimal<?php 
                        }
                        ?>
" name="product_data[add_new_variant][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                        ?>
][variant]" id="input_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" placeholder="<?php 
                        echo $_smarty_tpl->__("enter_other");
                        ?>
" />
                <?php 
                    }
                    ?>

            <?php 
                } elseif ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::MULTIPLE_CHECKBOX")) {
                    ?>
                <input type="hidden" name="product_data[product_features][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
]" value="" />
                <?php 
                    $_smarty_tpl->tpl_vars["var"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["var"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['feature']->value['variants'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars["var"]->key => $_smarty_tpl->tpl_vars["var"]->value) {
                        $_smarty_tpl->tpl_vars["var"]->_loop = true;
                        ?>
                    <label for="variant_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant_id'], ENT_QUOTES, 'UTF-8');
                        ?>
" class="checkbox"><input type="checkbox" id="variant_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant_id'], ENT_QUOTES, 'UTF-8');
                        ?>
" name="product_data[product_features][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant_id'], ENT_QUOTES, 'UTF-8');
                        ?>
]" <?php 
                        if ($_smarty_tpl->tpl_vars['var']->value['selected']) {
                            ?>
checked="checked"<?php 
                        }
                        ?>
 value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant_id'], ENT_QUOTES, 'UTF-8');
                        ?>
" /><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value['variant'], ENT_QUOTES, 'UTF-8');
                        ?>
</label>
                <?php 
                    }
                    ?>
                <?php 
                    if ($_smarty_tpl->tpl_vars['allow_enter_variant']->value) {
                        ?>
                <input type="text" name="product_data[add_new_variant][<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
                        ?>
][variant]" id="feature_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" placeholder="<?php 
                        echo $_smarty_tpl->__("enter_other");
                        ?>
" />
                <?php 
                    }
                    ?>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::SINGLE_CHECKBOX")) {
                    ?>
                <label class="checkbox">
                <input type="hidden" name="product_data[product_features][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
]" value="N" />
                <input type="checkbox" name="product_data[product_features][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
]" value="Y" id="feature_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['feature']->value['value'] == "Y") {
                        ?>
checked="checked"<?php 
                    }
                    ?>
 /></label>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::DATE")) {
                    ?>
                <?php 
                    echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "date_" . (string) $_smarty_tpl->tpl_vars['feature_id']->value, 'date_name' => "product_data[product_features][" . (string) $_smarty_tpl->tpl_vars['feature_id']->value . "]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['feature']->value['value_int']) === null || $tmp === '' ? '' : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
                    ?>

            <?php 
                } else {
                    ?>
                <input type="text" name="product_data[product_features][<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
]" value="<?php 
                    if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_FIELD")) {
                        if ($_smarty_tpl->tpl_vars['feature']->value['value_int'] != '') {
                            echo htmlspecialchars(floatval($_smarty_tpl->tpl_vars['feature']->value['value_int']), ENT_QUOTES, 'UTF-8');
                        }
                    } else {
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['value'], ENT_QUOTES, 'UTF-8');
                    }
                    ?>
" id="feature_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" class="<?php 
                    if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_FIELD")) {
                        ?>
 cm-value-decimal<?php 
                    }
                    ?>
" />
            <?php 
                }
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['feature']->value['suffix']) {
                    ?>
<span><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['feature']->value['suffix'], ENT_QUOTES, 'UTF-8');
                    ?>
</span><?php 
                }
                ?>
            </div>
        </div>
    <?php 
            }
        }
        ?>

<?php 
        $_smarty_tpl->tpl_vars['feature'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['feature']->_loop = false;
        $_smarty_tpl->tpl_vars["feature_id"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['product_features']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['feature']->key => $_smarty_tpl->tpl_vars['feature']->value) {
            $_smarty_tpl->tpl_vars['feature']->_loop = true;
            $_smarty_tpl->tpl_vars["feature_id"]->value = $_smarty_tpl->tpl_vars['feature']->key;
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['feature']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::GROUP") && $_smarty_tpl->tpl_vars['feature']->value['subfeatures']) {
                ?>
        <?php 
                echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['feature']->value['description']), 0);
                ?>

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

    <?php 
            }
        }
    }
    function content_55dc759f729bc0_59760313($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_function_live_edit')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.live_edit.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('text_combination_out_of_stock', 'text_out_of_stock', 'sku', 'select_options', 'notify_when_back_in_stock', 'email', 'enter_email', 'enter_email', 'go', 'old_price', 'list_price', 'enter_your_price', 'contact_us_for_price', 'sign_in_to_view_price', 'inc_tax', 'including_tax', 'you_save', 'you_save', 'save_discount', 'availability', 'items', 'in_stock', 'availability', 'in_stock', 'availability', 'quantity', 'text_cart_min_qty', 'text_edp_product', 'text_combination_out_of_stock', 'text_out_of_stock', 'sku', 'select_options', 'notify_when_back_in_stock', 'email', 'enter_email', 'enter_email', 'go', 'old_price', 'list_price', 'enter_your_price', 'contact_us_for_price', 'sign_in_to_view_price', 'inc_tax', 'including_tax', 'you_save', 'you_save', 'save_discount', 'availability', 'items', 'in_stock', 'availability', 'in_stock', 'availability', 'quantity', 'text_cart_min_qty', 'text_edp_product'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            if ($_smarty_tpl->tpl_vars['product']->value['tracking'] == smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["out_of_stock_text"] = new Smarty_variable($_smarty_tpl->__("text_combination_out_of_stock"), null, 0);
            } else {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["out_of_stock_text"] = new Smarty_variable($_smarty_tpl->__("text_out_of_stock"), null, 0);
            }
            ?>

<?php 
            if ((floatval($_smarty_tpl->tpl_vars['product']->value['price']) || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "P" || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A" || !floatval($_smarty_tpl->tpl_vars['product']->value['price']) && $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R") && !($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "hide_price_and_add_to_cart" && !$_smarty_tpl->tpl_vars['auth']->value['user_id'])) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["show_price_values"] = new Smarty_variable(true, null, 0);
            } else {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["show_price_values"] = new Smarty_variable(false, null, 0);
            }
            $_smarty_tpl->_capture_stack[0][] = array("show_price_values", null, null);
            ob_start();
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
            $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(false, null, 0);
            $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['show_qty']->value) === null || $tmp === '' ? true : $tmp, null, 0);
            $_smarty_tpl->tpl_vars["obj_id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['obj_id']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['product_id'] : $tmp, null, 0);
            $_smarty_tpl->tpl_vars["product_amount"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['product']->value['inventory_amount']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['amount'] : $tmp, null, 0);
            if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] && !$_smarty_tpl->tpl_vars['no_ajax']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["is_ajax"] = new Smarty_variable(true, null, 0);
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("form_open_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if (!$_smarty_tpl->tpl_vars['hide_form']->value) {
                ?>
<form action="<?php 
                echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
                ?>
" method="post" name="product_form_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" enctype="multipart/form-data" class="cm-disable-empty-files <?php 
                if ($_smarty_tpl->tpl_vars['is_ajax']->value) {
                    ?>
 cm-ajax cm-ajax-full-render cm-ajax-status-middle<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['form_meta']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
                }
                ?>
">
<input type="hidden" name="result_ids" value="cart_status*,wish_list*,checkout*,account_info*" />
<?php 
                if (!$_smarty_tpl->tpl_vars['stay_in_cart']->value) {
                    ?>
<input type="hidden" name="redirect_url" value="<?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['redirect_url']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['config']->value['current_url'] : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
" />
<?php 
                }
                ?>
<input type="hidden" name="product_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
][product_id]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
" />
<?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("form_open_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("name_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_name"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_name"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['show_name']->value) {
                    ?>
        <?php 
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
<strong><?php 
                    } else {
                        ?>
<a href="<?php 
                        echo htmlspecialchars(fn_url("products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), ENT_QUOTES, 'UTF-8');
                        ?>
" class="product-title" <?php 
                        echo smarty_function_live_edit(array('name' => "product:product:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['product']), $_smarty_tpl);
                        ?>
><?php 
                    }
                    echo $_smarty_tpl->tpl_vars['product']->value['product'];
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
</strong><?php 
                    } else {
                        ?>
</a><?php 
                    }
                    ?>
    <?php 
                } elseif ($_smarty_tpl->tpl_vars['show_trunc_name']->value) {
                    ?>
        <?php 
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
<strong><?php 
                    } else {
                        ?>
<a href="<?php 
                        echo htmlspecialchars(fn_url("products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), ENT_QUOTES, 'UTF-8');
                        ?>
" class="product-title" title="<?php 
                        echo htmlspecialchars(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['product']->value['product']), ENT_QUOTES, 'UTF-8');
                        ?>
" <?php 
                        echo smarty_function_live_edit(array('name' => "product:product:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['product']), $_smarty_tpl);
                        ?>
><?php 
                    }
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['product']->value['product'], 44, "...", true);
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
</strong><?php 
                    } else {
                        ?>
</a><?php 
                    }
                    ?>
    <?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_name"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("name_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("sku_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_sku']->value) {
                ?>
        <div class="ty-control-group ty-sku-item cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                if (!$_smarty_tpl->tpl_vars['product']->value['product_code']) {
                    ?>
 hidden<?php 
                }
                ?>
" id="sku_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_sku]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_sku']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <label class="ty-control-group__label" id="sku_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo $_smarty_tpl->__("sku");
                ?>
:</label>
            <span class="ty-control-group__item" id="product_code_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_code'], ENT_QUOTES, 'UTF-8');
                ?>
</span>
        <!--sku_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("sku_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("rating_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:data_block"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:data_block"), 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:data_block"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("rating_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("add_to_cart_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if ($_smarty_tpl->tpl_vars['show_add_to_cart']->value) {
                ?>
<div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['add_to_cart_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="add_to_cart_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
<input type="hidden" name="appearance[show_add_to_cart]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_add_to_cart']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[show_list_buttons]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_list_buttons']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[but_role]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['but_role']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[quick_view]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['quick_view']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />

<?php 
                $_smarty_tpl->_capture_stack[0][] = array("buttons_product", null, null);
                ob_start();
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:add_to_cart"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:add_to_cart"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    if ($_smarty_tpl->tpl_vars['product']->value['has_options'] && !$_smarty_tpl->tpl_vars['show_product_options']->value && !$_smarty_tpl->tpl_vars['details_page']->value) {
                        if ($_smarty_tpl->tpl_vars['but_role']->value == "text") {
                            $_smarty_tpl->tpl_vars['opt_but_role'] = new Smarty_variable("text", null, 0);
                        } else {
                            $_smarty_tpl->tpl_vars['opt_but_role'] = new Smarty_variable("action", null, 0);
                        }
                        echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_id' => "button_cart_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'but_text' => __("select_options"), 'but_href' => "products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'but_role' => $_smarty_tpl->tpl_vars['opt_but_role']->value, 'but_name' => '', 'but_meta' => "ty-btn__primary ty-btn__big"), 0);
                    } else {
                        if ($_smarty_tpl->tpl_vars['extra_button']->value) {
                            echo $_smarty_tpl->tpl_vars['extra_button']->value;
                            ?>
&nbsp;<?php 
                        }
                        echo $_smarty_tpl->getSubTemplate("buttons/add_to_cart.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_id' => "button_cart_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'but_name' => "dispatch[checkout.add.." . (string) $_smarty_tpl->tpl_vars['obj_id']->value . "]", 'but_role' => $_smarty_tpl->tpl_vars['but_role']->value, 'block_width' => $_smarty_tpl->tpl_vars['block_width']->value, 'obj_id' => $_smarty_tpl->tpl_vars['obj_id']->value, 'product' => $_smarty_tpl->tpl_vars['product']->value, 'but_meta' => $_smarty_tpl->tpl_vars['add_to_cart_meta']->value), 0);
                        $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(true, null, 0);
                    }
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:add_to_cart"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                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();
                }
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:buttons_block"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:buttons_block"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    if (!($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R" && $_smarty_tpl->tpl_vars['product']->value['price'] == 0) && !($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" && (($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y") || $_smarty_tpl->tpl_vars['product']->value['has_options'] && !$_smarty_tpl->tpl_vars['show_product_options']->value) {
                        if (trim(Smarty::$_smarty_vars['capture']['buttons_product']) != '&nbsp;') {
                            if ($_smarty_tpl->tpl_vars['product']->value['avail_since'] <= @constant('TIME') || $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME') && $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "B") {
                                echo Smarty::$_smarty_vars['capture']['buttons_product'];
                            }
                        }
                    } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" && (($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y") {
                        $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(false, null, 0);
                        if (!$_smarty_tpl->tpl_vars['details_page']->value) {
                            if (!$_smarty_tpl->tpl_vars['product']->value['hide_stock_info'] && !(($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME'))) {
                                ?>
<span class="ty-qty-out-of-stock ty-control-group__item" id="out_of_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</span><?php 
                            }
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "S" && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
                            ?>
<div class="ty-control-group"><label for="sw_product_notify_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="ty-strong"><input id="sw_product_notify_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" type="checkbox" class="checkbox cm-switch-availability cm-switch-visibility" name="product_notify" <?php 
                            if ($_smarty_tpl->tpl_vars['product_notification_enabled']->value == "Y") {
                                ?>
checked="checked"<?php 
                            }
                            ?>
 onclick="<?php 
                            if (!$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                                ?>
if (!this.checked) {Tygh.$.ceAjax('request', '<?php 
                                echo htmlspecialchars(fn_url("products.product_notifications?enable="), ENT_QUOTES, 'UTF-8');
                                ?>
' + 'N&amp;product_id=<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
&amp;email=' + $('#product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
').get(0).value, <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
cache: false<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
);}<?php 
                            } else {
                                ?>
Tygh.$.ceAjax('request', '<?php 
                                echo htmlspecialchars(fn_url("products.product_notifications?enable="), ENT_QUOTES, 'UTF-8');
                                ?>
' + (this.checked ? 'Y' : 'N') + '&amp;product_id=' + '<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
', <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
cache: false<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
);<?php 
                            }
                            ?>
"/><?php 
                            echo $_smarty_tpl->__("notify_when_back_in_stock");
                            ?>
</label></div><?php 
                            if (!$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                                ?>
<div class="ty-control-group ty-input-append ty-product-notify-email <?php 
                                if ($_smarty_tpl->tpl_vars['product_notification_enabled']->value != "Y") {
                                    ?>
hidden<?php 
                                }
                                ?>
" id="product_notify_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><input type="hidden" name="enable" value="Y" disabled /><input type="hidden" name="product_id" value="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
" disabled /><label id="product_notify_email_label" for="product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="cm-required cm-email hidden"><?php 
                                echo $_smarty_tpl->__("email");
                                ?>
</label><input type="text" name="email" id="product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" size="20" value="<?php 
                                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_notification_email']->value) === null || $tmp === '' ? $_smarty_tpl->__("enter_email") : $tmp, ENT_QUOTES, 'UTF-8');
                                ?>
" class="ty-product-notify-email__input cm-hint" title="<?php 
                                echo $_smarty_tpl->__("enter_email");
                                ?>
" disabled /><button class="ty-btn-go cm-ajax" type="submit" name="dispatch[products.product_notifications]" title="<?php 
                                echo $_smarty_tpl->__("go");
                                ?>
"><i class="ty-btn-go__icon ty-icon-right-dir"></i></button></div><?php 
                            }
                        }
                    }
                    if ($_smarty_tpl->tpl_vars['show_list_buttons']->value) {
                        $_smarty_tpl->_capture_stack[0][] = array("product_buy_now_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
                        ob_start();
                        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:buy_now"));
                        $_block_repeat = true;
                        echo smarty_block_hook(array('name' => "products:buy_now"), null, $_smarty_tpl, $_block_repeat);
                        while ($_block_repeat) {
                            ob_start();
                            if ($_smarty_tpl->tpl_vars['product']->value['feature_comparison'] == "Y") {
                                echo $_smarty_tpl->getSubTemplate("buttons/add_to_compare_list.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('product_id' => $_smarty_tpl->tpl_vars['product']->value['product_id']), 0);
                            }
                            $_block_content = ob_get_clean();
                            $_block_repeat = false;
                            echo smarty_block_hook(array('name' => "products:buy_now"), $_block_content, $_smarty_tpl, $_block_repeat);
                        }
                        array_pop($_smarty_tpl->smarty->_tag_stack);
                        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();
                        }
                        $_smarty_tpl->tpl_vars["capture_buy_now"] = new Smarty_variable("product_buy_now_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        if (trim(Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_buy_now']->value])) {
                            echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_buy_now']->value];
                        }
                    }
                    if ($_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME')) {
                        echo $_smarty_tpl->getSubTemplate("common/coming_soon_notice.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('avail_date' => $_smarty_tpl->tpl_vars['product']->value['avail_since'], 'add_to_cart' => $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions']), 0);
                    }
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:buttons_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

<!--add_to_cart_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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::$_smarty_vars['capture']['cart_button_exists']) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(true, null, 0);
            }
            ?>

<?php 
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("add_to_cart_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_features_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_features"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_features"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['show_features']->value) {
                    ?>
        <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" id="product_features_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
            <input type="hidden" name="appearance[show_features]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['show_features']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
            <?php 
                    echo $_smarty_tpl->getSubTemplate("views/products/components/product_features_short_list.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('features' => fn_get_product_features_list($_smarty_tpl->tpl_vars['product']->value), 'no_container' => true), 0);
                    ?>

        <!--product_features_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
    <?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_features"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_features_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("prod_descr_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_descr']->value) {
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['short_description']) {
                    ?>
            <div <?php 
                    echo smarty_function_live_edit(array('name' => "product:short_description:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), $_smarty_tpl);
                    ?>
><?php 
                    echo $_smarty_tpl->tpl_vars['product']->value['short_description'];
                    ?>
</div>
        <?php 
                } else {
                    ?>
            <div <?php 
                    echo smarty_function_live_edit(array('name' => "product:full_description:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['full_description']), $_smarty_tpl);
                    ?>
><?php 
                    echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['product']->value['full_description']), 160);
                    ?>
</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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("prod_descr_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("old_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_old_price']->value) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="old_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:old_price"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:old_price"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

            <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                        ?>
                <span class="ty-list-price ty-nowrap" id="line_old_price_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        if ($_smarty_tpl->tpl_vars['details_page']->value) {
                            echo $_smarty_tpl->__("old_price");
                            ?>
: <?php 
                        }
                        ?>
<span class="ty-strike"><?php 
                        echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => ($tmp = @$_smarty_tpl->tpl_vars['product']->value['original_price']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['base_price'] : $tmp, 'span_id' => "old_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                        ?>
</span></span>
            <?php 
                    } elseif ($_smarty_tpl->tpl_vars['product']->value['list_discount']) {
                        ?>
                <span class="ty-list-price ty-nowrap" id="line_list_price_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        if ($_smarty_tpl->tpl_vars['details_page']->value) {
                            ?>
<span class="list-price-label"><?php 
                            echo $_smarty_tpl->__("list_price");
                            ?>
:</span> <?php 
                        }
                        ?>
<span class="ty-strike"><?php 
                        echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['list_price'], 'span_id' => "list_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                        ?>
</span></span>
            <?php 
                    }
                    ?>
            <?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:old_price"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

        <!--old_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("old_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <span class="cm-reload-<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
 ty-price-update" id="price_update_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
        <input type="hidden" name="appearance[show_price_values]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
        <input type="hidden" name="appearance[show_price]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
        <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value) {
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['show_price']->value) {
                    ?>
            <?php 
                    $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:prices_block"));
                    $_block_repeat = true;
                    echo smarty_block_hook(array('name' => "products:prices_block"), null, $_smarty_tpl, $_block_repeat);
                    while ($_block_repeat) {
                        ob_start();
                        ?>

                <?php 
                        if (floatval($_smarty_tpl->tpl_vars['product']->value['price']) || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "P" || $_smarty_tpl->tpl_vars['hide_add_to_cart_button']->value == "Y" && $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A") {
                            ?>
                    <span class="ty-price<?php 
                            if (!floatval($_smarty_tpl->tpl_vars['product']->value['price']) && !$_smarty_tpl->tpl_vars['product']->value['zero_price_action']) {
                                ?>
 hidden<?php 
                            }
                            ?>
" id="line_discounted_price_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['price'], 'span_id' => "discounted_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-price-num", 'live_editor_name' => "product:price:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'live_editor_phrase' => $_smarty_tpl->tpl_vars['product']->value['base_price']), 0);
                            ?>
</span>
                <?php 
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A" && $_smarty_tpl->tpl_vars['show_add_to_cart']->value) {
                            ?>
                    <?php 
                            $_smarty_tpl->tpl_vars["base_currency"] = new Smarty_variable($_smarty_tpl->tpl_vars['currencies']->value[@constant('CART_PRIMARY_CURRENCY')], null, 0);
                            ?>
                    <span class="ty-price-curency"><span class="ty-price-curency__title"><?php 
                            echo $_smarty_tpl->__("enter_your_price");
                            ?>
:</span>
                    <div class="ty-price-curency-input">
                        <?php 
                            if ($_smarty_tpl->tpl_vars['base_currency']->value['after'] != "Y") {
                                echo $_smarty_tpl->tpl_vars['base_currency']->value['symbol'];
                            }
                            ?>
                        <input class="ty-price-curency__input" type="text" size="3" name="product_data[<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
][price]" value="" />
                        <?php 
                            if ($_smarty_tpl->tpl_vars['base_currency']->value['after'] == "Y") {
                                echo $_smarty_tpl->tpl_vars['base_currency']->value['symbol'];
                            }
                            ?>
                    </div>
                    </span>

                <?php 
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R") {
                            ?>
                    <span class="ty-no-price"><?php 
                            echo $_smarty_tpl->__("contact_us_for_price");
                            ?>
</span>
                    <?php 
                            $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(false, null, 0);
                            ?>
                <?php 
                        }
                        ?>
            <?php 
                        $_block_content = ob_get_clean();
                        $_block_repeat = false;
                        echo smarty_block_hook(array('name' => "products:prices_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                    }
                    array_pop($_smarty_tpl->smarty->_tag_stack);
                    ?>

            <?php 
                }
                ?>
        <?php 
            } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "hide_price_and_add_to_cart" && !$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                ?>
            <span class="ty-price"><?php 
                echo $_smarty_tpl->__("sign_in_to_view_price");
                ?>
</span>
        <?php 
            }
            ?>
    <!--price_update_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
--></span>
<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("clean_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_clean_price']->value && $_smarty_tpl->tpl_vars['settings']->value['Appearance']['show_prices_taxed_clean'] == "Y" && $_smarty_tpl->tpl_vars['product']->value['taxed_price']) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="clean_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_price_values]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <input type="hidden" name="appearance[show_clean_price]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_clean_price']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['clean_price'] != $_smarty_tpl->tpl_vars['product']->value['taxed_price'] && $_smarty_tpl->tpl_vars['product']->value['included_tax']) {
                    ?>
                <span class="ty-list-price ty-nowrap" id="line_product_price_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">(<?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['taxed_price'], 'span_id' => "product_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                    ?>
 <?php 
                    echo $_smarty_tpl->__("inc_tax");
                    ?>
)</span>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['product']->value['clean_price'] != $_smarty_tpl->tpl_vars['product']->value['taxed_price'] && !$_smarty_tpl->tpl_vars['product']->value['included_tax']) {
                    ?>
                <span class="ty-list-price ty-nowrap ty-tax-include">(<?php 
                    echo $_smarty_tpl->__("including_tax");
                    ?>
)</span>
            <?php 
                }
                ?>
        <!--clean_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("clean_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("list_discount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_list_discount']->value && $_smarty_tpl->tpl_vars['details_page']->value) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="line_discount_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_price_values]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <input type="hidden" name="appearance[show_list_discount]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_list_discount']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                    ?>
                <span class="ty-list-price ty-save-price ty-nowrap" id="line_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo $_smarty_tpl->__("you_save");
                    ?>
: <?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['discount'], 'span_id' => "discount_value_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                    ?>
&nbsp;(<span id="prc_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" class="ty-list-price ty-nowrap"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['discount_prc'], ENT_QUOTES, 'UTF-8');
                    ?>
</span>%)</span>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['product']->value['list_discount']) {
                    ?>
                <span class="ty-list-price ty-save-price ty-nowrap" id="line_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"> <?php 
                    echo $_smarty_tpl->__("you_save");
                    ?>
: <?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['list_discount'], 'span_id' => "discount_value_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value), 0);
                    ?>
&nbsp;(<span id="prc_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['list_discount_prc'], ENT_QUOTES, 'UTF-8');
                    ?>
</span>%)</span>
            <?php 
                }
                ?>
        <!--line_discount_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("list_discount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("discount_label_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_discount_label']->value && ($_smarty_tpl->tpl_vars['product']->value['discount_prc'] || $_smarty_tpl->tpl_vars['product']->value['list_discount_prc']) && $_smarty_tpl->tpl_vars['show_price_values']->value) {
                ?>
        <span class="ty-discount-label cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="discount_label_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <span class="ty-discount-label__item" id="line_prc_discount_value_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><span class="ty-discount-label__value" id="prc_discount_value_label_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo $_smarty_tpl->__("save_discount");
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['discount_prc'], ENT_QUOTES, 'UTF-8');
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['list_discount_prc'], ENT_QUOTES, 'UTF-8');
                }
                ?>
%</span></span>
        <!--discount_label_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("discount_label_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_amount"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_amount"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<?php 
                if ($_smarty_tpl->tpl_vars['show_product_amount']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                    ?>
    <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
 stock-wrap" id="product_amount_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
        <input type="hidden" name="appearance[show_product_amount]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['show_product_amount']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                    if (!$_smarty_tpl->tpl_vars['product']->value['hide_stock_info']) {
                        ?>
            <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['in_stock_field'] == "Y") {
                            ?>
                <?php 
                            if ($_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) {
                                ?>
                    <?php 
                                if ($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" || $_smarty_tpl->tpl_vars['details_page']->value) {
                                    ?>
                        <?php 
                                    if ($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                                        ?>
                            <div class="ty-control-group product-list-field">
                                <label class="ty-control-group__label"><?php 
                                        echo $_smarty_tpl->__("availability");
                                        ?>
:</label>
                                <span id="qty_in_stock_<?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
" class="ty-qty-in-stock ty-control-group__item">
                                    <?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_amount']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
&nbsp;<?php 
                                        echo $_smarty_tpl->__("items");
                                        ?>

                                </span>
                            </div>
                        <?php 
                                    } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y") {
                                        ?>
                            <div class="ty-control-group product-list-field">
                                <label class="ty-control-group__label"><?php 
                                        echo $_smarty_tpl->__("in_stock");
                                        ?>
:</label>
                                <span class="ty-qty-out-of-stock ty-control-group__item"><?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
</span>
                            </div>
                        <?php 
                                    }
                                    ?>
                    <?php 
                                }
                                ?>
                <?php 
                            }
                            ?>
            <?php 
                        } else {
                            ?>
                <?php 
                            if (($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] || $_smarty_tpl->tpl_vars['product']->value['tracking'] == smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" || $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] == "Y") {
                                ?>
                    <div class="ty-control-group product-list-field">
                        <label class="ty-control-group__label"><?php 
                                echo $_smarty_tpl->__("availability");
                                ?>
:</label>
                        <span class="ty-qty-in-stock ty-control-group__item" id="in_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo $_smarty_tpl->__("in_stock");
                                ?>
</span>
                    </div>
                <?php 
                            } elseif ($_smarty_tpl->tpl_vars['details_page']->value && ($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y") {
                                ?>
                    <div class="ty-control-group product-list-field">
                        <label class="ty-control-group__label"><?php 
                                echo $_smarty_tpl->__("availability");
                                ?>
:</label>
                        <span class="ty-qty-out-of-stock ty-control-group__item" id="out_of_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</span>
                    </div>
                <?php 
                            }
                            ?>
            <?php 
                        }
                        ?>
        <?php 
                    }
                    ?>
    <!--product_amount_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
<?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_amount"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_product_options']->value) {
                ?>
    <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="product_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <input type="hidden" name="appearance[show_product_options]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_product_options']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_option_content"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:product_option_content"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

            <?php 
                    if ($_smarty_tpl->tpl_vars['disable_ids']->value) {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["_disable_ids"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['disable_ids']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        ?>
            <?php 
                    } else {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["_disable_ids"] = new Smarty_variable('', null, 0);
                        ?>
            <?php 
                    }
                    ?>
            <?php 
                    echo $_smarty_tpl->getSubTemplate("views/products/components/product_options.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['obj_id']->value, 'product_options' => $_smarty_tpl->tpl_vars['product']->value['product_options'], 'name' => "product_data", 'capture_options_vs_qty' => $_smarty_tpl->tpl_vars['capture_options_vs_qty']->value, 'disable_ids' => $_smarty_tpl->tpl_vars['_disable_ids']->value), 0);
                    ?>

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

    <!--product_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("advanced_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_product_options']->value) {
                ?>
        <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="advanced_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <?php 
                echo $_smarty_tpl->getSubTemplate("views/companies/components/product_company_data.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('company_name' => $_smarty_tpl->tpl_vars['product']->value['company_name'], 'company_id' => $_smarty_tpl->tpl_vars['product']->value['company_id']), 0);
                ?>

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

        <!--advanced_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("advanced_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:qty"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:qty"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

        <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="qty_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <input type="hidden" name="appearance[show_qty]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_qty']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <input type="hidden" name="appearance[capture_options_vs_qty]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['capture_options_vs_qty']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                if (!empty($_smarty_tpl->tpl_vars['product']->value['selected_amount'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['selected_amount'], null, 0);
                    ?>
        <?php 
                } elseif (!empty($_smarty_tpl->tpl_vars['product']->value['min_qty'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['min_qty'], null, 0);
                    ?>
        <?php 
                } elseif (!empty($_smarty_tpl->tpl_vars['product']->value['qty_step'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['qty_step'], null, 0);
                    ?>
        <?php 
                } else {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable("1", null, 0);
                    ?>
        <?php 
                }
                ?>

        <?php 
                if ($_smarty_tpl->tpl_vars['show_qty']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] !== "Y" && $_smarty_tpl->tpl_vars['cart_button_exists']->value == true && ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "allow_shopping" || $_smarty_tpl->tpl_vars['auth']->value['user_id']) && $_smarty_tpl->tpl_vars['product']->value['avail_since'] <= @constant('TIME') || $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME') && $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "B") {
                    ?>
            <div class="ty-qty clearfix<?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                        ?>
 changer<?php 
                    }
                    ?>
" id="qty_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
                <?php 
                    if (!$_smarty_tpl->tpl_vars['hide_qty_label']->value) {
                        ?>
<label class="ty-control-group__label" for="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['quantity_text']->value) === null || $tmp === '' ? $_smarty_tpl->__("quantity") : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
:</label><?php 
                    }
                    ?>
                <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['qty_content'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                        ?>
                <select name="product_data[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][amount]" id="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
">
                <?php 
                        $_smarty_tpl->tpl_vars["a_name"] = new Smarty_variable("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["selected_amount"] = new Smarty_variable(false, null, 0);
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["var"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["var"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['product']->value['qty_content'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["var"]->key => $_smarty_tpl->tpl_vars["var"]->value) {
                            $_smarty_tpl->tpl_vars["var"]->_loop = true;
                            ?>
                    <option value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['product']->value['selected_amount'] && ($_smarty_tpl->tpl_vars['product']->value['selected_amount'] == $_smarty_tpl->tpl_vars['var']->value || $_smarty_tpl->getVariable('smarty')->value['foreach'][$_smarty_tpl->tpl_vars['a_name']->value]['last'] && !$_smarty_tpl->tpl_vars['selected_amount']->value)) {
                                $_smarty_tpl->tpl_vars["selected_amount"] = new Smarty_variable(true, null, 0);
                                ?>
selected="selected"<?php 
                            }
                            ?>
><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</option>
                <?php 
                        }
                        ?>
                </select>
                <?php 
                    } else {
                        ?>
                <div class="ty-center ty-value-changer cm-value-changer">
                    <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                            ?>
                        <a class="cm-increase ty-value-changer__increase">&#43;</a>
                    <?php 
                        }
                        ?>
                    <input type="text" size="5" class="ty-value-changer__input cm-amount" id="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" name="product_data[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][amount]" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['default_amount']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                        if ($_smarty_tpl->tpl_vars['product']->value['qty_step'] > 1) {
                            ?>
 data-ca-step="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['qty_step'], ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
 data-ca-min-qty="1" />
                    <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                            ?>
                        <a class="cm-decrease ty-value-changer__decrease">&minus;</a>
                    <?php 
                        }
                        ?>
                </div>
                <?php 
                    }
                    ?>
            </div>
            <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['prices']) {
                        ?>
                <?php 
                        echo $_smarty_tpl->getSubTemplate("views/products/components/products_qty_discounts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                        ?>

            <?php 
                    }
                    ?>
        <?php 
                } elseif (!$_smarty_tpl->tpl_vars['bulk_add']->value) {
                    ?>
            <input type="hidden" name="product_data[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][amount]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['default_amount']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>
        <!--qty_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></div>
    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:qty"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("min_qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['min_qty']->value && $_smarty_tpl->tpl_vars['product']->value['min_qty']) {
                ?>
        <p class="ty-min-qty-description"><?php 
                echo $_smarty_tpl->__("text_cart_min_qty", array("[product]" => $_smarty_tpl->tpl_vars['product']->value['product'], "[quantity]" => $_smarty_tpl->tpl_vars['product']->value['min_qty']));
                ?>
.</p>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("min_qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_edp_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_edp']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] == "Y") {
                ?>
        <p class="ty-edp-description"><?php 
                echo $_smarty_tpl->__("text_edp_product");
                ?>
.</p>
        <input type="hidden" name="product_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
][is_edp]" value="Y" />
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_edp_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("form_close_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if (!$_smarty_tpl->tpl_vars['hide_form']->value) {
                ?>
</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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("form_close_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->tpl_vars["image"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["image"]->_loop = false;
            $_smarty_tpl->tpl_vars["object_id"] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['images']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["image"]->key => $_smarty_tpl->tpl_vars["image"]->value) {
                $_smarty_tpl->tpl_vars["image"]->_loop = true;
                $_smarty_tpl->tpl_vars["object_id"]->value = $_smarty_tpl->tpl_vars["image"]->key;
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:list_images_block"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:list_images_block"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

    <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['obj_id'], ENT_QUOTES, 'UTF-8');
                    ?>
" id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
        <?php 
                    if ($_smarty_tpl->tpl_vars['image']->value['link']) {
                        ?>
            <a href="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['link'], ENT_QUOTES, 'UTF-8');
                        ?>
">
            <input type="hidden" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['link'], ENT_QUOTES, 'UTF-8');
                        ?>
" name="image[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][link]" />
        <?php 
                    }
                    ?>
        <input type="hidden" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['obj_id'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['width'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['height'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['type'], ENT_QUOTES, 'UTF-8');
                    ?>
" name="image[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][data]" />
        <?php 
                    echo $_smarty_tpl->getSubTemplate("common/image.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_width' => $_smarty_tpl->tpl_vars['image']->value['width'], 'image_height' => $_smarty_tpl->tpl_vars['image']->value['height'], 'obj_id' => $_smarty_tpl->tpl_vars['object_id']->value, 'images' => $_smarty_tpl->tpl_vars['product']->value['main_pair']), 0);
                    ?>

        <?php 
                    if ($_smarty_tpl->tpl_vars['image']->value['link']) {
                        ?>
            </a>
        <?php 
                    }
                    ?>
    <!--<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:list_images_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_data"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_data"), 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:product_data"), $_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();
            }
            if (trim(Smarty::$_smarty_vars['capture']['template_content'])) {
                if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") {
                    ?>
<span class="cm-template-box template-box" data-ca-te-template="common/product_data.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/product_data.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            if ($_smarty_tpl->tpl_vars['product']->value['tracking'] == smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["out_of_stock_text"] = new Smarty_variable($_smarty_tpl->__("text_combination_out_of_stock"), null, 0);
            } else {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["out_of_stock_text"] = new Smarty_variable($_smarty_tpl->__("text_out_of_stock"), null, 0);
            }
            ?>

<?php 
            if ((floatval($_smarty_tpl->tpl_vars['product']->value['price']) || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "P" || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A" || !floatval($_smarty_tpl->tpl_vars['product']->value['price']) && $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R") && !($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "hide_price_and_add_to_cart" && !$_smarty_tpl->tpl_vars['auth']->value['user_id'])) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["show_price_values"] = new Smarty_variable(true, null, 0);
            } else {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["show_price_values"] = new Smarty_variable(false, null, 0);
            }
            $_smarty_tpl->_capture_stack[0][] = array("show_price_values", null, null);
            ob_start();
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
            $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(false, null, 0);
            $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['show_qty']->value) === null || $tmp === '' ? true : $tmp, null, 0);
            $_smarty_tpl->tpl_vars["obj_id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['obj_id']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['product_id'] : $tmp, null, 0);
            $_smarty_tpl->tpl_vars["product_amount"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['product']->value['inventory_amount']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['amount'] : $tmp, null, 0);
            if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] && !$_smarty_tpl->tpl_vars['no_ajax']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["is_ajax"] = new Smarty_variable(true, null, 0);
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("form_open_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if (!$_smarty_tpl->tpl_vars['hide_form']->value) {
                ?>
<form action="<?php 
                echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
                ?>
" method="post" name="product_form_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" enctype="multipart/form-data" class="cm-disable-empty-files <?php 
                if ($_smarty_tpl->tpl_vars['is_ajax']->value) {
                    ?>
 cm-ajax cm-ajax-full-render cm-ajax-status-middle<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['form_meta']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
                }
                ?>
">
<input type="hidden" name="result_ids" value="cart_status*,wish_list*,checkout*,account_info*" />
<?php 
                if (!$_smarty_tpl->tpl_vars['stay_in_cart']->value) {
                    ?>
<input type="hidden" name="redirect_url" value="<?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['redirect_url']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['config']->value['current_url'] : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
" />
<?php 
                }
                ?>
<input type="hidden" name="product_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
][product_id]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                ?>
" />
<?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("form_open_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("name_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_name"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_name"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['show_name']->value) {
                    ?>
        <?php 
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
<strong><?php 
                    } else {
                        ?>
<a href="<?php 
                        echo htmlspecialchars(fn_url("products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), ENT_QUOTES, 'UTF-8');
                        ?>
" class="product-title" <?php 
                        echo smarty_function_live_edit(array('name' => "product:product:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['product']), $_smarty_tpl);
                        ?>
><?php 
                    }
                    echo $_smarty_tpl->tpl_vars['product']->value['product'];
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
</strong><?php 
                    } else {
                        ?>
</a><?php 
                    }
                    ?>
    <?php 
                } elseif ($_smarty_tpl->tpl_vars['show_trunc_name']->value) {
                    ?>
        <?php 
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
<strong><?php 
                    } else {
                        ?>
<a href="<?php 
                        echo htmlspecialchars(fn_url("products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), ENT_QUOTES, 'UTF-8');
                        ?>
" class="product-title" title="<?php 
                        echo htmlspecialchars(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['product']->value['product']), ENT_QUOTES, 'UTF-8');
                        ?>
" <?php 
                        echo smarty_function_live_edit(array('name' => "product:product:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['product']), $_smarty_tpl);
                        ?>
><?php 
                    }
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['product']->value['product'], 44, "...", true);
                    if ($_smarty_tpl->tpl_vars['hide_links']->value) {
                        ?>
</strong><?php 
                    } else {
                        ?>
</a><?php 
                    }
                    ?>
    <?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_name"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("name_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("sku_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_sku']->value) {
                ?>
        <div class="ty-control-group ty-sku-item cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                if (!$_smarty_tpl->tpl_vars['product']->value['product_code']) {
                    ?>
 hidden<?php 
                }
                ?>
" id="sku_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_sku]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_sku']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <label class="ty-control-group__label" id="sku_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo $_smarty_tpl->__("sku");
                ?>
:</label>
            <span class="ty-control-group__item" id="product_code_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_code'], ENT_QUOTES, 'UTF-8');
                ?>
</span>
        <!--sku_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("sku_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("rating_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:data_block"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:data_block"), 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:data_block"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("rating_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("add_to_cart_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if ($_smarty_tpl->tpl_vars['show_add_to_cart']->value) {
                ?>
<div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['add_to_cart_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="add_to_cart_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
<input type="hidden" name="appearance[show_add_to_cart]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_add_to_cart']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[show_list_buttons]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_list_buttons']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[but_role]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['but_role']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
<input type="hidden" name="appearance[quick_view]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['quick_view']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />

<?php 
                $_smarty_tpl->_capture_stack[0][] = array("buttons_product", null, null);
                ob_start();
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:add_to_cart"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:add_to_cart"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    if ($_smarty_tpl->tpl_vars['product']->value['has_options'] && !$_smarty_tpl->tpl_vars['show_product_options']->value && !$_smarty_tpl->tpl_vars['details_page']->value) {
                        if ($_smarty_tpl->tpl_vars['but_role']->value == "text") {
                            $_smarty_tpl->tpl_vars['opt_but_role'] = new Smarty_variable("text", null, 0);
                        } else {
                            $_smarty_tpl->tpl_vars['opt_but_role'] = new Smarty_variable("action", null, 0);
                        }
                        echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_id' => "button_cart_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'but_text' => __("select_options"), 'but_href' => "products.view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'but_role' => $_smarty_tpl->tpl_vars['opt_but_role']->value, 'but_name' => '', 'but_meta' => "ty-btn__primary ty-btn__big"), 0);
                    } else {
                        if ($_smarty_tpl->tpl_vars['extra_button']->value) {
                            echo $_smarty_tpl->tpl_vars['extra_button']->value;
                            ?>
&nbsp;<?php 
                        }
                        echo $_smarty_tpl->getSubTemplate("buttons/add_to_cart.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_id' => "button_cart_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'but_name' => "dispatch[checkout.add.." . (string) $_smarty_tpl->tpl_vars['obj_id']->value . "]", 'but_role' => $_smarty_tpl->tpl_vars['but_role']->value, 'block_width' => $_smarty_tpl->tpl_vars['block_width']->value, 'obj_id' => $_smarty_tpl->tpl_vars['obj_id']->value, 'product' => $_smarty_tpl->tpl_vars['product']->value, 'but_meta' => $_smarty_tpl->tpl_vars['add_to_cart_meta']->value), 0);
                        $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(true, null, 0);
                    }
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:add_to_cart"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                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();
                }
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:buttons_block"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:buttons_block"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    if (!($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R" && $_smarty_tpl->tpl_vars['product']->value['price'] == 0) && !($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" && (($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y") || $_smarty_tpl->tpl_vars['product']->value['has_options'] && !$_smarty_tpl->tpl_vars['show_product_options']->value) {
                        if (trim(Smarty::$_smarty_vars['capture']['buttons_product']) != '&nbsp;') {
                            if ($_smarty_tpl->tpl_vars['product']->value['avail_since'] <= @constant('TIME') || $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME') && $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "B") {
                                echo Smarty::$_smarty_vars['capture']['buttons_product'];
                            }
                        }
                    } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" && (($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y") {
                        $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(false, null, 0);
                        if (!$_smarty_tpl->tpl_vars['details_page']->value) {
                            if (!$_smarty_tpl->tpl_vars['product']->value['hide_stock_info'] && !(($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME'))) {
                                ?>
<span class="ty-qty-out-of-stock ty-control-group__item" id="out_of_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</span><?php 
                            }
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "S" && $_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS")) {
                            ?>
<div class="ty-control-group"><label for="sw_product_notify_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="ty-strong"><input id="sw_product_notify_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" type="checkbox" class="checkbox cm-switch-availability cm-switch-visibility" name="product_notify" <?php 
                            if ($_smarty_tpl->tpl_vars['product_notification_enabled']->value == "Y") {
                                ?>
checked="checked"<?php 
                            }
                            ?>
 onclick="<?php 
                            if (!$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                                ?>
if (!this.checked) {Tygh.$.ceAjax('request', '<?php 
                                echo htmlspecialchars(fn_url("products.product_notifications?enable="), ENT_QUOTES, 'UTF-8');
                                ?>
' + 'N&amp;product_id=<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
&amp;email=' + $('#product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
').get(0).value, <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
cache: false<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
);}<?php 
                            } else {
                                ?>
Tygh.$.ceAjax('request', '<?php 
                                echo htmlspecialchars(fn_url("products.product_notifications?enable="), ENT_QUOTES, 'UTF-8');
                                ?>
' + (this.checked ? 'Y' : 'N') + '&amp;product_id=' + '<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
', <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ldelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
cache: false<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['rdelim']->value, ENT_QUOTES, 'UTF-8');
                                ?>
);<?php 
                            }
                            ?>
"/><?php 
                            echo $_smarty_tpl->__("notify_when_back_in_stock");
                            ?>
</label></div><?php 
                            if (!$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                                ?>
<div class="ty-control-group ty-input-append ty-product-notify-email <?php 
                                if ($_smarty_tpl->tpl_vars['product_notification_enabled']->value != "Y") {
                                    ?>
hidden<?php 
                                }
                                ?>
" id="product_notify_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><input type="hidden" name="enable" value="Y" disabled /><input type="hidden" name="product_id" value="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['product_id'], ENT_QUOTES, 'UTF-8');
                                ?>
" disabled /><label id="product_notify_email_label" for="product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="cm-required cm-email hidden"><?php 
                                echo $_smarty_tpl->__("email");
                                ?>
</label><input type="text" name="email" id="product_notify_email_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" size="20" value="<?php 
                                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['product_notification_email']->value) === null || $tmp === '' ? $_smarty_tpl->__("enter_email") : $tmp, ENT_QUOTES, 'UTF-8');
                                ?>
" class="ty-product-notify-email__input cm-hint" title="<?php 
                                echo $_smarty_tpl->__("enter_email");
                                ?>
" disabled /><button class="ty-btn-go cm-ajax" type="submit" name="dispatch[products.product_notifications]" title="<?php 
                                echo $_smarty_tpl->__("go");
                                ?>
"><i class="ty-btn-go__icon ty-icon-right-dir"></i></button></div><?php 
                            }
                        }
                    }
                    if ($_smarty_tpl->tpl_vars['show_list_buttons']->value) {
                        $_smarty_tpl->_capture_stack[0][] = array("product_buy_now_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
                        ob_start();
                        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:buy_now"));
                        $_block_repeat = true;
                        echo smarty_block_hook(array('name' => "products:buy_now"), null, $_smarty_tpl, $_block_repeat);
                        while ($_block_repeat) {
                            ob_start();
                            if ($_smarty_tpl->tpl_vars['product']->value['feature_comparison'] == "Y") {
                                echo $_smarty_tpl->getSubTemplate("buttons/add_to_compare_list.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('product_id' => $_smarty_tpl->tpl_vars['product']->value['product_id']), 0);
                            }
                            $_block_content = ob_get_clean();
                            $_block_repeat = false;
                            echo smarty_block_hook(array('name' => "products:buy_now"), $_block_content, $_smarty_tpl, $_block_repeat);
                        }
                        array_pop($_smarty_tpl->smarty->_tag_stack);
                        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();
                        }
                        $_smarty_tpl->tpl_vars["capture_buy_now"] = new Smarty_variable("product_buy_now_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        if (trim(Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_buy_now']->value])) {
                            echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_buy_now']->value];
                        }
                    }
                    if ($_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME')) {
                        echo $_smarty_tpl->getSubTemplate("common/coming_soon_notice.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('avail_date' => $_smarty_tpl->tpl_vars['product']->value['avail_since'], 'add_to_cart' => $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions']), 0);
                    }
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:buttons_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

<!--add_to_cart_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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::$_smarty_vars['capture']['cart_button_exists']) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["cart_button_exists"] = new Smarty_variable(true, null, 0);
            }
            ?>

<?php 
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("add_to_cart_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_features_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_features"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_features"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['show_features']->value) {
                    ?>
        <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" id="product_features_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
            <input type="hidden" name="appearance[show_features]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['show_features']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
            <?php 
                    echo $_smarty_tpl->getSubTemplate("views/products/components/product_features_short_list.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('features' => fn_get_product_features_list($_smarty_tpl->tpl_vars['product']->value), 'no_container' => true), 0);
                    ?>

        <!--product_features_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
    <?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_features"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_features_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("prod_descr_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_descr']->value) {
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['short_description']) {
                    ?>
            <div <?php 
                    echo smarty_function_live_edit(array('name' => "product:short_description:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id']), $_smarty_tpl);
                    ?>
><?php 
                    echo $_smarty_tpl->tpl_vars['product']->value['short_description'];
                    ?>
</div>
        <?php 
                } else {
                    ?>
            <div <?php 
                    echo smarty_function_live_edit(array('name' => "product:full_description:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'phrase' => $_smarty_tpl->tpl_vars['product']->value['full_description']), $_smarty_tpl);
                    ?>
><?php 
                    echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['product']->value['full_description']), 160);
                    ?>
</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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("prod_descr_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("old_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_old_price']->value) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="old_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:old_price"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:old_price"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

            <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                        ?>
                <span class="ty-list-price ty-nowrap" id="line_old_price_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        if ($_smarty_tpl->tpl_vars['details_page']->value) {
                            echo $_smarty_tpl->__("old_price");
                            ?>
: <?php 
                        }
                        ?>
<span class="ty-strike"><?php 
                        echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => ($tmp = @$_smarty_tpl->tpl_vars['product']->value['original_price']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['product']->value['base_price'] : $tmp, 'span_id' => "old_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                        ?>
</span></span>
            <?php 
                    } elseif ($_smarty_tpl->tpl_vars['product']->value['list_discount']) {
                        ?>
                <span class="ty-list-price ty-nowrap" id="line_list_price_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        if ($_smarty_tpl->tpl_vars['details_page']->value) {
                            ?>
<span class="list-price-label"><?php 
                            echo $_smarty_tpl->__("list_price");
                            ?>
:</span> <?php 
                        }
                        ?>
<span class="ty-strike"><?php 
                        echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['list_price'], 'span_id' => "list_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                        ?>
</span></span>
            <?php 
                    }
                    ?>
            <?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:old_price"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

        <!--old_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("old_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <span class="cm-reload-<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
 ty-price-update" id="price_update_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
        <input type="hidden" name="appearance[show_price_values]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
        <input type="hidden" name="appearance[show_price]" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
        <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value) {
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['show_price']->value) {
                    ?>
            <?php 
                    $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:prices_block"));
                    $_block_repeat = true;
                    echo smarty_block_hook(array('name' => "products:prices_block"), null, $_smarty_tpl, $_block_repeat);
                    while ($_block_repeat) {
                        ob_start();
                        ?>

                <?php 
                        if (floatval($_smarty_tpl->tpl_vars['product']->value['price']) || $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "P" || $_smarty_tpl->tpl_vars['hide_add_to_cart_button']->value == "Y" && $_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A") {
                            ?>
                    <span class="ty-price<?php 
                            if (!floatval($_smarty_tpl->tpl_vars['product']->value['price']) && !$_smarty_tpl->tpl_vars['product']->value['zero_price_action']) {
                                ?>
 hidden<?php 
                            }
                            ?>
" id="line_discounted_price_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['price'], 'span_id' => "discounted_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-price-num", 'live_editor_name' => "product:price:" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'], 'live_editor_phrase' => $_smarty_tpl->tpl_vars['product']->value['base_price']), 0);
                            ?>
</span>
                <?php 
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "A" && $_smarty_tpl->tpl_vars['show_add_to_cart']->value) {
                            ?>
                    <?php 
                            $_smarty_tpl->tpl_vars["base_currency"] = new Smarty_variable($_smarty_tpl->tpl_vars['currencies']->value[@constant('CART_PRIMARY_CURRENCY')], null, 0);
                            ?>
                    <span class="ty-price-curency"><span class="ty-price-curency__title"><?php 
                            echo $_smarty_tpl->__("enter_your_price");
                            ?>
:</span>
                    <div class="ty-price-curency-input">
                        <?php 
                            if ($_smarty_tpl->tpl_vars['base_currency']->value['after'] != "Y") {
                                echo $_smarty_tpl->tpl_vars['base_currency']->value['symbol'];
                            }
                            ?>
                        <input class="ty-price-curency__input" type="text" size="3" name="product_data[<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
][price]" value="" />
                        <?php 
                            if ($_smarty_tpl->tpl_vars['base_currency']->value['after'] == "Y") {
                                echo $_smarty_tpl->tpl_vars['base_currency']->value['symbol'];
                            }
                            ?>
                    </div>
                    </span>

                <?php 
                        } elseif ($_smarty_tpl->tpl_vars['product']->value['zero_price_action'] == "R") {
                            ?>
                    <span class="ty-no-price"><?php 
                            echo $_smarty_tpl->__("contact_us_for_price");
                            ?>
</span>
                    <?php 
                            $_smarty_tpl->tpl_vars["show_qty"] = new Smarty_variable(false, null, 0);
                            ?>
                <?php 
                        }
                        ?>
            <?php 
                        $_block_content = ob_get_clean();
                        $_block_repeat = false;
                        echo smarty_block_hook(array('name' => "products:prices_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                    }
                    array_pop($_smarty_tpl->smarty->_tag_stack);
                    ?>

            <?php 
                }
                ?>
        <?php 
            } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "hide_price_and_add_to_cart" && !$_smarty_tpl->tpl_vars['auth']->value['user_id']) {
                ?>
            <span class="ty-price"><?php 
                echo $_smarty_tpl->__("sign_in_to_view_price");
                ?>
</span>
        <?php 
            }
            ?>
    <!--price_update_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
            echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
            ?>
--></span>
<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("clean_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_clean_price']->value && $_smarty_tpl->tpl_vars['settings']->value['Appearance']['show_prices_taxed_clean'] == "Y" && $_smarty_tpl->tpl_vars['product']->value['taxed_price']) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="clean_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_price_values]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <input type="hidden" name="appearance[show_clean_price]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_clean_price']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['clean_price'] != $_smarty_tpl->tpl_vars['product']->value['taxed_price'] && $_smarty_tpl->tpl_vars['product']->value['included_tax']) {
                    ?>
                <span class="ty-list-price ty-nowrap" id="line_product_price_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">(<?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['taxed_price'], 'span_id' => "product_price_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                    ?>
 <?php 
                    echo $_smarty_tpl->__("inc_tax");
                    ?>
)</span>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['product']->value['clean_price'] != $_smarty_tpl->tpl_vars['product']->value['taxed_price'] && !$_smarty_tpl->tpl_vars['product']->value['included_tax']) {
                    ?>
                <span class="ty-list-price ty-nowrap ty-tax-include">(<?php 
                    echo $_smarty_tpl->__("including_tax");
                    ?>
)</span>
            <?php 
                }
                ?>
        <!--clean_price_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("clean_price_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("list_discount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_price_values']->value && $_smarty_tpl->tpl_vars['show_list_discount']->value && $_smarty_tpl->tpl_vars['details_page']->value) {
                ?>
        <span class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="line_discount_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <input type="hidden" name="appearance[show_price_values]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_price_values']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <input type="hidden" name="appearance[show_list_discount]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_list_discount']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
            <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                    ?>
                <span class="ty-list-price ty-save-price ty-nowrap" id="line_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo $_smarty_tpl->__("you_save");
                    ?>
: <?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['discount'], 'span_id' => "discount_value_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, 'class' => "ty-list-price ty-nowrap"), 0);
                    ?>
&nbsp;(<span id="prc_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" class="ty-list-price ty-nowrap"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['discount_prc'], ENT_QUOTES, 'UTF-8');
                    ?>
</span>%)</span>
            <?php 
                } elseif ($_smarty_tpl->tpl_vars['product']->value['list_discount']) {
                    ?>
                <span class="ty-list-price ty-save-price ty-nowrap" id="line_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"> <?php 
                    echo $_smarty_tpl->__("you_save");
                    ?>
: <?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['product']->value['list_discount'], 'span_id' => "discount_value_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value), 0);
                    ?>
&nbsp;(<span id="prc_discount_value_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['list_discount_prc'], ENT_QUOTES, 'UTF-8');
                    ?>
</span>%)</span>
            <?php 
                }
                ?>
        <!--line_discount_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("list_discount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>


<?php 
            $_smarty_tpl->_capture_stack[0][] = array("discount_label_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_discount_label']->value && ($_smarty_tpl->tpl_vars['product']->value['discount_prc'] || $_smarty_tpl->tpl_vars['product']->value['list_discount_prc']) && $_smarty_tpl->tpl_vars['show_price_values']->value) {
                ?>
        <span class="ty-discount-label cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="discount_label_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <span class="ty-discount-label__item" id="line_prc_discount_value_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><span class="ty-discount-label__value" id="prc_discount_value_label_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo $_smarty_tpl->__("save_discount");
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['product']->value['discount']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['discount_prc'], ENT_QUOTES, 'UTF-8');
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['list_discount_prc'], ENT_QUOTES, 'UTF-8');
                }
                ?>
%</span></span>
        <!--discount_label_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></span>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("discount_label_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_amount"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:product_amount"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<?php 
                if ($_smarty_tpl->tpl_vars['show_product_amount']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] != "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                    ?>
    <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
 stock-wrap" id="product_amount_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
        <input type="hidden" name="appearance[show_product_amount]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['show_product_amount']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                    if (!$_smarty_tpl->tpl_vars['product']->value['hide_stock_info']) {
                        ?>
            <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['in_stock_field'] == "Y") {
                            ?>
                <?php 
                            if ($_smarty_tpl->tpl_vars['product']->value['tracking'] != smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) {
                                ?>
                    <?php 
                                if ($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" || $_smarty_tpl->tpl_vars['details_page']->value) {
                                    ?>
                        <?php 
                                    if ($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                                        ?>
                            <div class="ty-control-group product-list-field">
                                <label class="ty-control-group__label"><?php 
                                        echo $_smarty_tpl->__("availability");
                                        ?>
:</label>
                                <span id="qty_in_stock_<?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
" class="ty-qty-in-stock ty-control-group__item">
                                    <?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_amount']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
&nbsp;<?php 
                                        echo $_smarty_tpl->__("items");
                                        ?>

                                </span>
                            </div>
                        <?php 
                                    } elseif ($_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y") {
                                        ?>
                            <div class="ty-control-group product-list-field">
                                <label class="ty-control-group__label"><?php 
                                        echo $_smarty_tpl->__("in_stock");
                                        ?>
:</label>
                                <span class="ty-qty-out-of-stock ty-control-group__item"><?php 
                                        echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                        ?>
</span>
                            </div>
                        <?php 
                                    }
                                    ?>
                    <?php 
                                }
                                ?>
                <?php 
                            }
                            ?>
            <?php 
                        } else {
                            ?>
                <?php 
                            if (($_smarty_tpl->tpl_vars['product_amount']->value > 0 && $_smarty_tpl->tpl_vars['product_amount']->value >= $_smarty_tpl->tpl_vars['product']->value['min_qty'] || $_smarty_tpl->tpl_vars['product']->value['tracking'] == smarty_modifier_enum("ProductTracking::DO_NOT_TRACK")) && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y" || $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] == "Y") {
                                ?>
                    <div class="ty-control-group product-list-field">
                        <label class="ty-control-group__label"><?php 
                                echo $_smarty_tpl->__("availability");
                                ?>
:</label>
                        <span class="ty-qty-in-stock ty-control-group__item" id="in_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo $_smarty_tpl->__("in_stock");
                                ?>
</span>
                    </div>
                <?php 
                            } elseif ($_smarty_tpl->tpl_vars['details_page']->value && ($_smarty_tpl->tpl_vars['product_amount']->value <= 0 || $_smarty_tpl->tpl_vars['product_amount']->value < $_smarty_tpl->tpl_vars['product']->value['min_qty']) && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y" && $_smarty_tpl->tpl_vars['settings']->value['General']['allow_negative_amount'] != "Y") {
                                ?>
                    <div class="ty-control-group product-list-field">
                        <label class="ty-control-group__label"><?php 
                                echo $_smarty_tpl->__("availability");
                                ?>
:</label>
                        <span class="ty-qty-out-of-stock ty-control-group__item" id="out_of_stock_info_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['out_of_stock_text']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</span>
                    </div>
                <?php 
                            }
                            ?>
            <?php 
                        }
                        ?>
        <?php 
                    }
                    ?>
    <!--product_amount_update_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
<?php 
                }
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:product_amount"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_product_options']->value) {
                ?>
    <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="product_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <input type="hidden" name="appearance[show_product_options]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_product_options']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:product_option_content"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:product_option_content"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

            <?php 
                    if ($_smarty_tpl->tpl_vars['disable_ids']->value) {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["_disable_ids"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['disable_ids']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        ?>
            <?php 
                    } else {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["_disable_ids"] = new Smarty_variable('', null, 0);
                        ?>
            <?php 
                    }
                    ?>
            <?php 
                    echo $_smarty_tpl->getSubTemplate("views/products/components/product_options.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['obj_id']->value, 'product_options' => $_smarty_tpl->tpl_vars['product']->value['product_options'], 'name' => "product_data", 'capture_options_vs_qty' => $_smarty_tpl->tpl_vars['capture_options_vs_qty']->value, 'disable_ids' => $_smarty_tpl->tpl_vars['_disable_ids']->value), 0);
                    ?>

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

    <!--product_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("advanced_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_product_options']->value) {
                ?>
        <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="advanced_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
            <?php 
                echo $_smarty_tpl->getSubTemplate("views/companies/components/product_company_data.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('company_name' => $_smarty_tpl->tpl_vars['product']->value['company_name'], 'company_id' => $_smarty_tpl->tpl_vars['product']->value['company_id']), 0);
                ?>

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

        <!--advanced_options_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("advanced_options_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:qty"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:qty"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

        <div class="cm-reload-<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" id="qty_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <input type="hidden" name="appearance[show_qty]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['show_qty']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <input type="hidden" name="appearance[capture_options_vs_qty]" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['capture_options_vs_qty']->value, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                if (!empty($_smarty_tpl->tpl_vars['product']->value['selected_amount'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['selected_amount'], null, 0);
                    ?>
        <?php 
                } elseif (!empty($_smarty_tpl->tpl_vars['product']->value['min_qty'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['min_qty'], null, 0);
                    ?>
        <?php 
                } elseif (!empty($_smarty_tpl->tpl_vars['product']->value['qty_step'])) {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['qty_step'], null, 0);
                    ?>
        <?php 
                } else {
                    ?>
            <?php 
                    $_smarty_tpl->tpl_vars["default_amount"] = new Smarty_variable("1", null, 0);
                    ?>
        <?php 
                }
                ?>

        <?php 
                if ($_smarty_tpl->tpl_vars['show_qty']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] !== "Y" && $_smarty_tpl->tpl_vars['cart_button_exists']->value == true && ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_anonymous_shopping'] == "allow_shopping" || $_smarty_tpl->tpl_vars['auth']->value['user_id']) && $_smarty_tpl->tpl_vars['product']->value['avail_since'] <= @constant('TIME') || $_smarty_tpl->tpl_vars['product']->value['avail_since'] > @constant('TIME') && $_smarty_tpl->tpl_vars['product']->value['out_of_stock_actions'] == "B") {
                    ?>
            <div class="ty-qty clearfix<?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                        ?>
 changer<?php 
                    }
                    ?>
" id="qty_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
                <?php 
                    if (!$_smarty_tpl->tpl_vars['hide_qty_label']->value) {
                        ?>
<label class="ty-control-group__label" for="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['quantity_text']->value) === null || $tmp === '' ? $_smarty_tpl->__("quantity") : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
:</label><?php 
                    }
                    ?>
                <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['qty_content'] && $_smarty_tpl->tpl_vars['settings']->value['General']['inventory_tracking'] == "Y") {
                        ?>
                <select name="product_data[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][amount]" id="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
">
                <?php 
                        $_smarty_tpl->tpl_vars["a_name"] = new Smarty_variable("product_amount_" . (string) $_smarty_tpl->tpl_vars['obj_prefix']->value . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["selected_amount"] = new Smarty_variable(false, null, 0);
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["var"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["var"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['product']->value['qty_content'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["var"]->key => $_smarty_tpl->tpl_vars["var"]->value) {
                            $_smarty_tpl->tpl_vars["var"]->_loop = true;
                            ?>
                    <option value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['product']->value['selected_amount'] && ($_smarty_tpl->tpl_vars['product']->value['selected_amount'] == $_smarty_tpl->tpl_vars['var']->value || $_smarty_tpl->getVariable('smarty')->value['foreach'][$_smarty_tpl->tpl_vars['a_name']->value]['last'] && !$_smarty_tpl->tpl_vars['selected_amount']->value)) {
                                $_smarty_tpl->tpl_vars["selected_amount"] = new Smarty_variable(true, null, 0);
                                ?>
selected="selected"<?php 
                            }
                            ?>
><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['var']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</option>
                <?php 
                        }
                        ?>
                </select>
                <?php 
                    } else {
                        ?>
                <div class="ty-center ty-value-changer cm-value-changer">
                    <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                            ?>
                        <a class="cm-increase ty-value-changer__increase">&#43;</a>
                    <?php 
                        }
                        ?>
                    <input type="text" size="5" class="ty-value-changer__input cm-amount" id="qty_count_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" name="product_data[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][amount]" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['default_amount']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                        if ($_smarty_tpl->tpl_vars['product']->value['qty_step'] > 1) {
                            ?>
 data-ca-step="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['qty_step'], ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
 data-ca-min-qty="1" />
                    <?php 
                        if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['quantity_changer'] == "Y") {
                            ?>
                        <a class="cm-decrease ty-value-changer__decrease">&minus;</a>
                    <?php 
                        }
                        ?>
                </div>
                <?php 
                    }
                    ?>
            </div>
            <?php 
                    if ($_smarty_tpl->tpl_vars['product']->value['prices']) {
                        ?>
                <?php 
                        echo $_smarty_tpl->getSubTemplate("views/products/components/products_qty_discounts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                        ?>

            <?php 
                    }
                    ?>
        <?php 
                } elseif (!$_smarty_tpl->tpl_vars['bulk_add']->value) {
                    ?>
            <input type="hidden" name="product_data[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][amount]" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['default_amount']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>
        <!--qty_update_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_prefix']->value, ENT_QUOTES, 'UTF-8');
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></div>
    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:qty"), $_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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("min_qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['min_qty']->value && $_smarty_tpl->tpl_vars['product']->value['min_qty']) {
                ?>
        <p class="ty-min-qty-description"><?php 
                echo $_smarty_tpl->__("text_cart_min_qty", array("[product]" => $_smarty_tpl->tpl_vars['product']->value['product'], "[quantity]" => $_smarty_tpl->tpl_vars['product']->value['min_qty']));
                ?>
.</p>
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("min_qty_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("product_edp_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['show_edp']->value && $_smarty_tpl->tpl_vars['product']->value['is_edp'] == "Y") {
                ?>
        <p class="ty-edp-description"><?php 
                echo $_smarty_tpl->__("text_edp_product");
                ?>
.</p>
        <input type="hidden" name="product_data[<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
][is_edp]" value="Y" />
    <?php 
            }
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("product_edp_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->_capture_stack[0][] = array("form_close_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, null);
            ob_start();
            if (!$_smarty_tpl->tpl_vars['hide_form']->value) {
                ?>
</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();
            }
            if ($_smarty_tpl->tpl_vars['no_capture']->value) {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["capture_name"] = new Smarty_variable("form_close_" . (string) $_smarty_tpl->tpl_vars['obj_id']->value, null, 0);
                ?>
    <?php 
                echo Smarty::$_smarty_vars['capture'][$_smarty_tpl->tpl_vars['capture_name']->value];
                ?>

<?php 
            }
            ?>

<?php 
            $_smarty_tpl->tpl_vars["image"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["image"]->_loop = false;
            $_smarty_tpl->tpl_vars["object_id"] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['images']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["image"]->key => $_smarty_tpl->tpl_vars["image"]->value) {
                $_smarty_tpl->tpl_vars["image"]->_loop = true;
                $_smarty_tpl->tpl_vars["object_id"]->value = $_smarty_tpl->tpl_vars["image"]->key;
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:list_images_block"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:list_images_block"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

    <div class="cm-reload-<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['obj_id'], ENT_QUOTES, 'UTF-8');
                    ?>
" id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
        <?php 
                    if ($_smarty_tpl->tpl_vars['image']->value['link']) {
                        ?>
            <a href="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['link'], ENT_QUOTES, 'UTF-8');
                        ?>
">
            <input type="hidden" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['link'], ENT_QUOTES, 'UTF-8');
                        ?>
" name="image[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][link]" />
        <?php 
                    }
                    ?>
        <input type="hidden" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['obj_id'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['width'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['height'], ENT_QUOTES, 'UTF-8');
                    ?>
,<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['type'], ENT_QUOTES, 'UTF-8');
                    ?>
" name="image[<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
][data]" />
        <?php 
                    echo $_smarty_tpl->getSubTemplate("common/image.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_width' => $_smarty_tpl->tpl_vars['image']->value['width'], 'image_height' => $_smarty_tpl->tpl_vars['image']->value['height'], 'obj_id' => $_smarty_tpl->tpl_vars['object_id']->value, 'images' => $_smarty_tpl->tpl_vars['product']->value['main_pair']), 0);
                    ?>

        <?php 
                    if ($_smarty_tpl->tpl_vars['image']->value['link']) {
                        ?>
            </a>
        <?php 
                    }
                    ?>
    <!--<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['object_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
--></div>
<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:list_images_block"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

<?php 
            }
            ?>

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

<?php 
        }
    }
    function content_55db8bdae73b19_83320565($_smarty_tpl)
    {
        if (!is_callable('smarty_block_inline_script')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.inline_script.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        if (!is_callable('smarty_modifier_unpuny')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.unpuny.php';
        }
        fn_preload_lang_vars(array('previous_period', 'current_period', 'orders', 'sales', 'taxes', 'users_carts', 'order', 'by', 'no_data', 'recent_orders', 'statistics', 'active_products', 'out_of_stock_products', 'registered_customers', 'categories', 'vendors', 'web_pages', 'order_by_status', 'status', 'qty', 'shipping', 'recent_activity', 'order', 'dashboard', 'installer_complete_title', 'welcome_screen.administrator_info', 'admin_panel', 'welcome_screen.go_admin_panel', 'welcome_screen.go_settings_wizard', 'settings_wizard', 'welcome_screen.run_settings_wizard', 'storefront', 'welcome_screen.go_storefront', 'welcome_screen.learn_more_configuration', 'welcome_screen.knowledge_base', 'welcome_screen.thanks'));
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        $_smarty_tpl->tpl_vars["show_latest_orders"] = new Smarty_variable(fn_check_permissions("orders", 'manage', 'admin'), null, 0);
        $_smarty_tpl->tpl_vars["show_orders"] = new Smarty_variable(fn_check_permissions("sales_reports", 'reports', 'admin'), null, 0);
        $_smarty_tpl->tpl_vars["show_inventory"] = new Smarty_variable(fn_check_permissions("products", 'manage', 'admin'), null, 0);
        $_smarty_tpl->tpl_vars["show_users"] = new Smarty_variable(fn_check_permissions("profiles", 'manage', 'admin'), null, 0);
        ?>

<?php 
        $_smarty_tpl->tpl_vars["user_can_view_orders"] = new Smarty_variable(fn_check_view_permissions("orders.manage", 'GET'), null, 0);
        ?>

<?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';
            ?>
 type="text/javascript">
(function(_, $) {

    _.drawChart = function(is_day) {
        if (typeof google == "undefined") {
            return false;
        }

        function get_data(div) {
            var id = $(div).attr('id');
            var dataTable = new google.visualization.DataTable();
            if (is_day) {
                dataTable.addColumn('timeofday', 'Date');
            } else {
                dataTable.addColumn('date', 'Date');
            }
            dataTable.addColumn('number', '<?php 
            echo $_smarty_tpl->__("previous_period");
            ?>
');
            dataTable.addColumn('number', '<?php 
            echo $_smarty_tpl->__("current_period");
            ?>
');
            dataTable.addRows(_.chart_data[id]);

            var dataView = new google.visualization.DataView(dataTable);
            dataView.setColumns([0, 1, 2]);

            return dataView;
        }

        var options = {
            chartArea: {
                left: 7,
                top: 10,
                width: 556,
                height: 208
            },
            colors: ['#f491a5','#8fd1ff'],
            tooltip: {
                showColorCode: true
            },
            lineWidth: 4,
            hAxis: {
                baselineColor: '#e1e1e1',
                textStyle: {
                    color: '#a1a1a1',
                    fontSize: 11
                },
                gridlines: {
                    count: 6
                }
            },
            legend: {
                position: 'none'
            },
            pointSize: 10,
            vAxis: {
                minValue: 0,
                baselineColor: '#e1e1e1',
                textPosition: 'in',
                textStyle: {
                    color: '#a1a1a1',
                    fontSize: 11
                },
                gridlines: {
                    count: 10
                }
            }
        };
        if (!is_day) {
            options.hAxis.format = 'MMM d';
        }

        $('.dashboard-statistics-chart:visible').each(function(i, div) {
            var dataView = get_data(div);
            var chart = new google.visualization.AreaChart(div);
            chart.draw(dataView, options);
        });

        $('#statistics_tabs .tabs li').on('click', function() {
            $('.dashboard-statistics-chart:visible').each(function(i, div) {
                var dataView = get_data(div);
                var chart = new google.visualization.AreaChart(div);
                chart.draw(dataView, options);
            });
        });
    };

    $(document).ready(function() {
        $.getScript('//www.google.com/jsapi', function() {
            setTimeout(function() { // do not remove it - otherwise it will be slow in ff
                google.load('visualization', '1.0', {
                    packages: ['corechart'],
                    callback: function() {
                        _.drawChart(<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['is_day']->value, ENT_QUOTES, 'UTF-8');
            ?>
);
                    }
                });
            }, 0);
        });

    });
}(Tygh, Tygh.$));
<?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);
        ?>


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

<div class="dashboard" id="dashboard">

    <table class="dashboard-card-table">
        <tbody>
            <tr>
                <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:finance_statistic"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "index:finance_statistic"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

                <?php 
                if (!empty($_smarty_tpl->tpl_vars['orders_stat']->value['orders'])) {
                    ?>
                    <td>
                        <div class="dashboard-card">
                            <div class="dashboard-card-title"><?php 
                    echo $_smarty_tpl->__("orders");
                    ?>
</div>
                            <div class="dashboard-card-content">
                                <h3>
                                    <?php 
                    if ($_smarty_tpl->tpl_vars['user_can_view_orders']->value) {
                        ?>
                                        <a href="<?php 
                        echo htmlspecialchars(fn_url("orders.manage?is_search=Y&period=C&time_from=" . (string) $_smarty_tpl->tpl_vars['time_from']->value . "&time_to=" . (string) $_smarty_tpl->tpl_vars['time_to']->value), ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars(count($_smarty_tpl->tpl_vars['orders_stat']->value['orders']), ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                                    <?php 
                    } else {
                        ?>
                                        <?php 
                        echo htmlspecialchars(count($_smarty_tpl->tpl_vars['orders_stat']->value['orders']), ENT_QUOTES, 'UTF-8');
                        ?>

                                    <?php 
                    }
                    ?>
                                </h3>
                                <?php 
                    echo htmlspecialchars(count($_smarty_tpl->tpl_vars['orders_stat']->value['prev_orders']), ENT_QUOTES, 'UTF-8');
                    ?>
, <?php 
                    if ($_smarty_tpl->tpl_vars['orders_stat']->value['diff']['orders_count'] > 0) {
                        ?>
+<?php 
                    }
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['orders_stat']->value['diff']['orders_count'], ENT_QUOTES, 'UTF-8');
                    ?>

                            </div>
                        </div>
                    </td>
                <?php 
                }
                ?>
                <?php 
                if (!empty($_smarty_tpl->tpl_vars['orders_stat']->value['orders_total'])) {
                    ?>
                    <td>
                        <div class="dashboard-card">
                            <div class="dashboard-card-title"><?php 
                    echo $_smarty_tpl->__("sales");
                    ?>
</div>
                            <div class="dashboard-card-content">
                                <h3><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['orders_stat']->value['orders_total']['totally_paid']), 0);
                    ?>
</h3><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['orders_stat']->value['prev_orders_total']['totally_paid']), 0);
                    ?>
, <?php 
                    if ($_smarty_tpl->tpl_vars['orders_stat']->value['orders_total']['totally_paid'] > $_smarty_tpl->tpl_vars['orders_stat']->value['prev_orders_total']['totally_paid']) {
                        ?>
+<?php 
                    }
                    echo $_smarty_tpl->tpl_vars['orders_stat']->value['diff']['sales'];
                    ?>
%
                            </div>
                        </div>
                    </td>
                <?php 
                }
                ?>
                <?php 
                if (!empty($_smarty_tpl->tpl_vars['orders_stat']->value['taxes'])) {
                    ?>
                    <td>
                        <div class="dashboard-card">
                            <div class="dashboard-card-title"><?php 
                    echo $_smarty_tpl->__("taxes");
                    ?>
</div>
                            <div class="dashboard-card-content">
                                <h3><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['orders_stat']->value['taxes']['subtotal']), 0);
                    ?>
</h3><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['orders_stat']->value['taxes']['prev_subtotal']), 0);
                    ?>
, <?php 
                    if ($_smarty_tpl->tpl_vars['orders_stat']->value['taxes']['subtotal'] > $_smarty_tpl->tpl_vars['orders_stat']->value['taxes']['prev_subtotal']) {
                        ?>
+<?php 
                    }
                    echo $_smarty_tpl->tpl_vars['orders_stat']->value['taxes']['diff'];
                    ?>
%
                            </div>
                        </div>
                    </td>
                <?php 
                }
                ?>
                <?php 
                if (!empty($_smarty_tpl->tpl_vars['orders_stat']->value['abandoned_cart_total'])) {
                    ?>
                    <td>
                        <div class="dashboard-card">
                            <div class="dashboard-card-title"><?php 
                    echo $_smarty_tpl->__("users_carts");
                    ?>
</div>
                            <div class="dashboard-card-content">
                                <h3><?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['orders_stat']->value['abandoned_cart_total']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
</h3><?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['orders_stat']->value['prev_abandoned_cart_total']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
, <?php 
                    if ($_smarty_tpl->tpl_vars['orders_stat']->value['abandoned_cart_total'] > $_smarty_tpl->tpl_vars['orders_stat']->value['prev_abandoned_cart_total']) {
                        ?>
+<?php 
                    }
                    echo $_smarty_tpl->tpl_vars['orders_stat']->value['diff']['abandoned_carts'];
                    ?>
%
                            </div>
                        </div>
                    </td>
                <?php 
                }
                ?>
                <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "index:finance_statistic"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

            </tr>
        </tbody>
    </table>

    <?php 
            if (!is_callable('smarty_modifier_date_format')) {
                include '/var/www/html/market/app/functions/smarty_plugins/modifier.date_format.php';
            }
            if (!function_exists('smarty_template_function_get_orders')) {
                function smarty_template_function_get_orders($_smarty_tpl, $params)
                {
                    $saved_tpl_vars = $_smarty_tpl->tpl_vars;
                    foreach ($_smarty_tpl->smarty->template_functions['get_orders']['parameter'] as $key => $value) {
                        $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                    }
                    foreach ($params as $key => $value) {
                        $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                    }
                    ?>
        <?php 
                    $_smarty_tpl->tpl_vars['params'] = new Smarty_variable(array('status' => $_smarty_tpl->tpl_vars['status']->value, 'time_from' => $_smarty_tpl->tpl_vars['time_from']->value, 'time_to' => $_smarty_tpl->tpl_vars['time_to']->value, 'period' => 'C'), null, 0);
                    ?>
        <?php 
                    $_smarty_tpl->tpl_vars['orders'] = new Smarty_variable(fn_get_orders($_smarty_tpl->tpl_vars['params']->value, $_smarty_tpl->tpl_vars['limit']->value), null, 0);
                    ?>

        <table class="table table-middle table-last-td-align-right">
            <tbody>
            <?php 
                    $_smarty_tpl->tpl_vars["order"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["order"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['orders']->value[0];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars["order"]->key => $_smarty_tpl->tpl_vars["order"]->value) {
                        $_smarty_tpl->tpl_vars["order"]->_loop = true;
                        ?>
                <tr>
                    <td>
                        <span class="label btn-info o-status-<?php 
                        echo htmlspecialchars(mb_strtolower($_smarty_tpl->tpl_vars['order']->value['status'], 'UTF-8'), ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['order_statuses']->value[$_smarty_tpl->tpl_vars['order']->value['status']]['description'], ENT_QUOTES, 'UTF-8');
                        ?>
</span>
                    </td>
                    <td><a href="<?php 
                        echo htmlspecialchars(fn_url("orders.details?order_id=" . (string) $_smarty_tpl->tpl_vars['order']->value['order_id']), ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo $_smarty_tpl->__("order");
                        ?>
 #<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['order_id'], ENT_QUOTES, 'UTF-8');
                        ?>
</a> <?php 
                        echo $_smarty_tpl->__("by");
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['order']->value['user_id']) {
                            ?>
<a href="<?php 
                            echo htmlspecialchars(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['order']->value['user_id']), ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                        }
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['lastname'], ENT_QUOTES, 'UTF-8');
                        ?>
 <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['order']->value['firstname'], ENT_QUOTES, 'UTF-8');
                        if ($_smarty_tpl->tpl_vars['order']->value['user_id']) {
                            ?>
</a><?php 
                        }
                        ?>
</td>
                    <td><span class="date"><?php 
                        echo htmlspecialchars(smarty_modifier_date_format($_smarty_tpl->tpl_vars['order']->value['timestamp'], (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['date_format'] . ", " . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['time_format']), ENT_QUOTES, 'UTF-8');
                        ?>
</span></td>
                    <td><h4><?php 
                        echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['order']->value['total']), 0);
                        ?>
</h4></td>
                </tr>
            <?php 
                    }
                    if (!$_smarty_tpl->tpl_vars["order"]->_loop) {
                        ?>
                <tr><td><?php 
                        echo $_smarty_tpl->__("no_data");
                        ?>
</td></tr>
            <?php 
                    }
                    ?>
            </tbody>
        </table>
    <?php 
                    $_smarty_tpl->tpl_vars = $saved_tpl_vars;
                    foreach (Smarty::$global_tpl_vars as $key => $value) {
                        if (!isset($_smarty_tpl->tpl_vars[$key])) {
                            $_smarty_tpl->tpl_vars[$key] = $value;
                        }
                    }
                }
            }
            ?>


    <div class="dashboard-row">
        <?php 
            if (!empty($_smarty_tpl->tpl_vars['order_statuses']->value)) {
                ?>
            <div class="dashboard-recent-orders cm-j-tabs tabs">
                <h4><?php 
                echo $_smarty_tpl->__("recent_orders");
                ?>
</h4>
                <ul class="nav nav-pills">
                    <li id="tab_recent_all" class="active cm-js"><a href="#status_all" data-toggle="tab">All</a></li>
                    <?php 
                $_smarty_tpl->tpl_vars["status"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["status"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['order_statuses']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["status"]->key => $_smarty_tpl->tpl_vars["status"]->value) {
                    $_smarty_tpl->tpl_vars["status"]->_loop = true;
                    ?>
                        <li id="tab_recent_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['status']->value['status'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="cm-js"><a href="#status_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['status']->value['status'], ENT_QUOTES, 'UTF-8');
                    ?>
" data-toggle="tab"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['status']->value['description'], ENT_QUOTES, 'UTF-8');
                    ?>
</a></li>
                    <?php 
                }
                ?>
                </ul>

                <div class="tab-content cm-tabs-content">
                    <div class="tab-pane" id="content_tab_recent_all">
                        <?php 
                smarty_template_function_get_orders($_smarty_tpl, array('status' => ''));
                ?>

                    </div>
                    <?php 
                $_smarty_tpl->tpl_vars["status"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["status"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['order_statuses']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["status"]->key => $_smarty_tpl->tpl_vars["status"]->value) {
                    $_smarty_tpl->tpl_vars["status"]->_loop = true;
                    ?>
                        <div class="tab-pane" id="content_tab_recent_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['status']->value['status'], ENT_QUOTES, 'UTF-8');
                    ?>
">
                            <?php 
                    smarty_template_function_get_orders($_smarty_tpl, array('status' => $_smarty_tpl->tpl_vars['status']->value['status']));
                    ?>

                        </div>
                    <?php 
                }
                ?>
                </div>
            </div>
        <?php 
            }
            ?>
        <?php 
            if (!empty($_smarty_tpl->tpl_vars['graphs']->value)) {
                ?>
            <div class="dashboard-statistics">
                <h4>
                    <?php 
                echo $_smarty_tpl->__("statistics");
                ?>

                </h4>
                 <?php 
                $_smarty_tpl->_capture_stack[0][] = array("chart_tabs", null, null);
                ob_start();
                ?>
                <div id="content_sales_chart">
                    <div id="dashboard_statistics_sales_chart" class="dashboard-statistics-chart spinner">
                    </div>
                </div>
                <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:chart_statistic"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "index:chart_statistic"), 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' => "index:chart_statistic"), $_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();
                }
                ?>

                <div id="statistics_tabs">
                    <?php 
                echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['chart_tabs']), 0);
                ?>

                    <?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';
                    ?>
>
                        Tygh.chart_data = {
                            <?php 
                    $_smarty_tpl->tpl_vars["graph"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["graph"]->_loop = false;
                    $_smarty_tpl->tpl_vars["chart"] = new Smarty_Variable();
                    $_from = $_smarty_tpl->tpl_vars['graphs']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    $_smarty_tpl->tpl_vars["graph"]->total = $_smarty_tpl->_count($_from);
                    $_smarty_tpl->tpl_vars["graph"]->iteration = 0;
                    foreach ($_from as $_smarty_tpl->tpl_vars["graph"]->key => $_smarty_tpl->tpl_vars["graph"]->value) {
                        $_smarty_tpl->tpl_vars["graph"]->_loop = true;
                        $_smarty_tpl->tpl_vars["chart"]->value = $_smarty_tpl->tpl_vars["graph"]->key;
                        $_smarty_tpl->tpl_vars["graph"]->iteration++;
                        $_smarty_tpl->tpl_vars["graph"]->last = $_smarty_tpl->tpl_vars["graph"]->iteration === $_smarty_tpl->tpl_vars["graph"]->total;
                        $_smarty_tpl->tpl_vars['smarty']->value['foreach']["graphs"]['last'] = $_smarty_tpl->tpl_vars["graph"]->last;
                        ?>
                                '<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['chart']->value, ENT_QUOTES, 'UTF-8');
                        ?>
': [
                                    <?php 
                        $_smarty_tpl->tpl_vars["data"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["data"]->_loop = false;
                        $_smarty_tpl->tpl_vars["date"] = new Smarty_Variable();
                        $_from = $_smarty_tpl->tpl_vars['graph']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        $_smarty_tpl->tpl_vars["data"]->total = $_smarty_tpl->_count($_from);
                        $_smarty_tpl->tpl_vars["data"]->iteration = 0;
                        foreach ($_from as $_smarty_tpl->tpl_vars["data"]->key => $_smarty_tpl->tpl_vars["data"]->value) {
                            $_smarty_tpl->tpl_vars["data"]->_loop = true;
                            $_smarty_tpl->tpl_vars["date"]->value = $_smarty_tpl->tpl_vars["data"]->key;
                            $_smarty_tpl->tpl_vars["data"]->iteration++;
                            $_smarty_tpl->tpl_vars["data"]->last = $_smarty_tpl->tpl_vars["data"]->iteration === $_smarty_tpl->tpl_vars["data"]->total;
                            $_smarty_tpl->tpl_vars['smarty']->value['foreach']["graph"]['last'] = $_smarty_tpl->tpl_vars["data"]->last;
                            ?>
                                        [<?php 
                            if ($_smarty_tpl->tpl_vars['is_day']->value) {
                                ?>
[<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['date']->value, ENT_QUOTES, 'UTF-8');
                                ?>
, 0, 0, 0]<?php 
                            } else {
                                ?>
new Date(<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['date']->value, ENT_QUOTES, 'UTF-8');
                                ?>
)<?php 
                            }
                            ?>
, <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['data']->value['prev'], ENT_QUOTES, 'UTF-8');
                            ?>
, <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['data']->value['cur'], ENT_QUOTES, 'UTF-8');
                            ?>
]<?php 
                            if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['graph']['last']) {
                                ?>
,<?php 
                            }
                            ?>
                                    <?php 
                        }
                        ?>
                                ]<?php 
                        if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['graphs']['last']) {
                            ?>
,<?php 
                        }
                        ?>
                            <?php 
                    }
                    ?>
                        };
                        Tygh.drawChart(<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['is_day']->value, ENT_QUOTES, 'UTF-8');
                    ?>
);
                    <?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);
                ?>

                <!--statistics_tabs--></div>
            </div>
        <?php 
            }
            ?>
    </div>

    <div class="dashboard-row-bottom">
        <div class="dashboard-tables">
            <table class="dashboard-card-table dashboard-card-table-center nowrap">
                <tbody>
                    <tr>
                        <?php 
            if (!empty($_smarty_tpl->tpl_vars['general_stats']->value['products'])) {
                ?>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("active_products");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                echo htmlspecialchars(fn_url("products.manage?status=A"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['products']['total_products']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("out_of_stock_products");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                ob_start();
                echo htmlspecialchars(smarty_modifier_enum("ProductTracking::TRACK_WITHOUT_OPTIONS"), ENT_QUOTES, 'UTF-8');
                $_tmp1 = ob_get_clean();
                ob_start();
                echo htmlspecialchars(smarty_modifier_enum("ProductTracking::TRACK_WITH_OPTIONS"), ENT_QUOTES, 'UTF-8');
                $_tmp2 = ob_get_clean();
                echo htmlspecialchars(fn_url("products.manage?amount_from=&amount_to=0&tracking[0]=" . $_tmp1 . "&tracking[1]=" . $_tmp2), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['products']['out_of_stock_products']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                        <?php 
            }
            ?>
                        <?php 
            if (!empty($_smarty_tpl->tpl_vars['general_stats']->value['customers'])) {
                ?>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("registered_customers");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                echo htmlspecialchars(fn_url("profiles.manage?user_type=C"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['customers']['registered_customers']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                        <?php 
            }
            ?>
                        <?php 
            if (!empty($_smarty_tpl->tpl_vars['general_stats']->value['categories'])) {
                ?>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("categories");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                echo htmlspecialchars(fn_url("categories.manage"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['categories']['total_categories']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                        <?php 
            }
            ?>
                        <?php 
            if (!empty($_smarty_tpl->tpl_vars['general_stats']->value['companies'])) {
                ?>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("vendors");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                echo htmlspecialchars(fn_url("companies.manage"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['companies']['total_companies']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                        <?php 
            }
            ?>
                        <?php 
            if (!empty($_smarty_tpl->tpl_vars['general_stats']->value['pages'])) {
                ?>
                            <td>
                                <div class="dashboard-card">
                                    <div class="dashboard-card-title"><?php 
                echo $_smarty_tpl->__("web_pages");
                ?>
</div>
                                    <div class="dashboard-card-content">
                                        <h3><a href="<?php 
                echo htmlspecialchars(fn_url("pages.manage"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars(number_format($_smarty_tpl->tpl_vars['general_stats']->value['pages']['total_pages']), ENT_QUOTES, 'UTF-8');
                ?>
</a></h3>
                                    </div>
                                </div>
                            </td>
                        <?php 
            }
            ?>
                    </tr>
                </tbody>
            </table>

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

            <?php 
            if ($_smarty_tpl->tpl_vars['user_can_view_orders']->value) {
                ?>
                <div class="dashboard-table dashboard-table-order-by-statuses">
                    <h4><?php 
                echo $_smarty_tpl->__("order_by_status");
                ?>
</h4>
                     <div class="table-wrap" id="dashboard_order_by_status">
                        <table class="table">
                            <thead>
                            <tr>
                                <th width="25%"><?php 
                echo $_smarty_tpl->__("status");
                ?>
</th>
                                <th width="25%"><?php 
                echo $_smarty_tpl->__("qty");
                ?>
</th>
                                <th width="25%"><?php 
                echo $_smarty_tpl->__('total');
                ?>
</th>
                                <th width="25%"><?php 
                echo $_smarty_tpl->__("shipping");
                ?>
</th>
                            </tr>
                            </thead>
                        </table>
                        <div class="scrollable-table">
                        <table class="table table-striped">
                            <tbody>
                                <?php 
                $_smarty_tpl->tpl_vars["order_status"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["order_status"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['order_by_statuses']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["order_status"]->key => $_smarty_tpl->tpl_vars["order_status"]->value) {
                    $_smarty_tpl->tpl_vars["order_status"]->_loop = true;
                    ?>
                                    <?php 
                    $_smarty_tpl->tpl_vars['url'] = new Smarty_variable(fn_url("orders.manage?is_search=Y&period=C&time_from=" . (string) $_smarty_tpl->tpl_vars['time_from']->value . "&time_to=" . (string) $_smarty_tpl->tpl_vars['time_to']->value . "&status[]=" . (string) $_smarty_tpl->tpl_vars['order_status']->value['status']), null, 0);
                    ?>
                                    <tr>
                                        <td width="25%"><a href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['url']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['order_status']->value['status_name'], ENT_QUOTES, 'UTF-8');
                    ?>
</a></td>
                                        <td width="25%"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['order_status']->value['count'], ENT_QUOTES, 'UTF-8');
                    ?>
</td>
                                        <td width="25%"><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['order_status']->value['total']), 0);
                    ?>
</td>
                                        <td width="25%"><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['order_status']->value['shipping']), 0);
                    ?>
</td>
                                    </tr>
                                <?php 
                }
                ?>
                            </tbody>
                        </table>
                        </div>
                    <!--dashboard_order_by_status--></div>
                </div>
            <?php 
            }
            ?>
        </div>

        <?php 
            if (fn_check_view_permissions("logs.manage", "GET")) {
                ?>
            <div class="dashboard-activity">
                <div class="pull-right"><a href="<?php 
                echo htmlspecialchars(fn_url("logs.manage"), ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo $_smarty_tpl->__('show_all');
                ?>
</a></div>
                <h4><?php 
                echo $_smarty_tpl->__("recent_activity");
                ?>
</h4>
                <?php 
                if (!is_callable('smarty_block_hook')) {
                    include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
                }
                if (!is_callable('smarty_modifier_date_format')) {
                    include '/var/www/html/market/app/functions/smarty_plugins/modifier.date_format.php';
                }
                if (!function_exists('smarty_template_function_show_log_row')) {
                    function smarty_template_function_show_log_row($_smarty_tpl, $params)
                    {
                        $saved_tpl_vars = $_smarty_tpl->tpl_vars;
                        foreach ($_smarty_tpl->smarty->template_functions['show_log_row']['parameter'] as $key => $value) {
                            $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                        }
                        foreach ($params as $key => $value) {
                            $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                        }
                        ?>
                    <?php 
                        if ($_smarty_tpl->tpl_vars['item']->value) {
                            ?>
                        <div class="item">
                            <?php 
                            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:recent_activity"));
                            $_block_repeat = true;
                            echo smarty_block_hook(array('name' => "index:recent_activity"), null, $_smarty_tpl, $_block_repeat);
                            while ($_block_repeat) {
                                ob_start();
                                ?>

                                <?php 
                                $_smarty_tpl->tpl_vars['_type'] = new Smarty_variable("log_type_" . (string) $_smarty_tpl->tpl_vars['item']->value['type'], null, 0);
                                ?>
                                <?php 
                                $_smarty_tpl->tpl_vars['_action'] = new Smarty_variable("log_action_" . (string) $_smarty_tpl->tpl_vars['item']->value['action'], null, 0);
                                ?>

                                <?php 
                                echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['_type']->value);
                                if ($_smarty_tpl->tpl_vars['item']->value['action']) {
                                    ?>
&nbsp;(<?php 
                                    echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['_action']->value);
                                    ?>
)<?php 
                                }
                                ?>
:

                                <?php 
                                if ($_smarty_tpl->tpl_vars['item']->value['type'] == "users" && fn_check_view_permissions(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), "GET")) {
                                    ?>
                                    <?php 
                                    if ($_smarty_tpl->tpl_vars['item']->value['content']['id']) {
                                        ?>
<a href="<?php 
                                        echo htmlspecialchars(fn_url("profiles.update?user_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), ENT_QUOTES, 'UTF-8');
                                        ?>
"><?php 
                                    }
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['content']['user'], ENT_QUOTES, 'UTF-8');
                                    if ($_smarty_tpl->tpl_vars['item']->value['content']['id']) {
                                        ?>
</a><?php 
                                    }
                                    ?>
<br>
                                    
                                <?php 
                                } elseif ($_smarty_tpl->tpl_vars['item']->value['type'] == "orders" && fn_check_view_permissions(fn_url("orders.details?order_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), "GET")) {
                                    ?>
                                    <?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['content']['status'], ENT_QUOTES, 'UTF-8');
                                    ?>
<br>
                                    <a href="<?php 
                                    echo htmlspecialchars(fn_url("orders.details?order_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), ENT_QUOTES, 'UTF-8');
                                    ?>
"><?php 
                                    echo $_smarty_tpl->__("order");
                                    ?>
&nbsp;<?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['content']['order'], ENT_QUOTES, 'UTF-8');
                                    ?>
</a><br>
                                <?php 
                                } elseif ($_smarty_tpl->tpl_vars['item']->value['type'] == "products" && fn_check_view_permissions(fn_url("products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), "GET")) {
                                    ?>
                                    <a href="<?php 
                                    echo htmlspecialchars(fn_url("products.update?product_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), ENT_QUOTES, 'UTF-8');
                                    ?>
"><?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['content']['product'], ENT_QUOTES, 'UTF-8');
                                    ?>
</a><br>

                                <?php 
                                } elseif ($_smarty_tpl->tpl_vars['item']->value['type'] == "categories" && fn_check_view_permissions(fn_url("categories.update?category_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), "GET")) {
                                    ?>
                                    <a href="<?php 
                                    echo htmlspecialchars(fn_url("categories.update?category_id=" . (string) $_smarty_tpl->tpl_vars['item']->value['content']['id']), ENT_QUOTES, 'UTF-8');
                                    ?>
"><?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['content']['category'], ENT_QUOTES, 'UTF-8');
                                    ?>
</a><br>                        
                                <?php 
                                }
                                ?>

                                <?php 
                                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "index:recent_activity_item"));
                                $_block_repeat = true;
                                echo smarty_block_hook(array('name' => "index:recent_activity_item"), null, $_smarty_tpl, $_block_repeat);
                                while ($_block_repeat) {
                                    ob_start();
                                    $_block_content = ob_get_clean();
                                    $_block_repeat = false;
                                    echo smarty_block_hook(array('name' => "index:recent_activity_item"), $_block_content, $_smarty_tpl, $_block_repeat);
                                }
                                array_pop($_smarty_tpl->smarty->_tag_stack);
                                ?>


                                <span class="date"><?php 
                                echo htmlspecialchars(smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['timestamp'], (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['date_format'] . ", " . (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['time_format']), ENT_QUOTES, 'UTF-8');
                                ?>
</span>
                            <?php 
                                $_block_content = ob_get_clean();
                                $_block_repeat = false;
                                echo smarty_block_hook(array('name' => "index:recent_activity"), $_block_content, $_smarty_tpl, $_block_repeat);
                            }
                            array_pop($_smarty_tpl->smarty->_tag_stack);
                            ?>

                        </div>
                    <?php 
                        }
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars = $saved_tpl_vars;
                        foreach (Smarty::$global_tpl_vars as $key => $value) {
                            if (!isset($_smarty_tpl->tpl_vars[$key])) {
                                $_smarty_tpl->tpl_vars[$key] = $value;
                            }
                        }
                    }
                }
                ?>


                <div class="dashboard-activity-list">
                    <?php 
                $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["item"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['logs']->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;
                    ?>
                        <?php 
                    smarty_template_function_show_log_row($_smarty_tpl, array('item' => $_smarty_tpl->tpl_vars['item']->value));
                    ?>

                    <?php 
                }
                ?>
                </div>
            </div>
        <?php 
            }
            ?>
    </div>
<!--dashboard--></div>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "index:index"), $_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/daterange_picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "dashboard_date_picker", 'extra_class' => "pull-right offset1", 'data_url' => fn_url("index.index"), 'result_ids' => "dashboard", 'start_date' => $_smarty_tpl->tpl_vars['time_from']->value, 'end_date' => $_smarty_tpl->tpl_vars['time_to']->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();
        }
        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('buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'no_sidebar' => true, 'title' => __("dashboard"), 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'tools' => Smarty::$_smarty_vars['capture']['tools']), 0);
        ?>


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

<?php 
            if ($_smarty_tpl->tpl_vars['show_welcome']->value) {
                ?>
    <div class="hidden cm-dialog-auto-open cm-dialog-auto-size" title="<?php 
                echo $_smarty_tpl->__("installer_complete_title");
                ?>
" id="after_install_dialog" data-ca-dialog-class="welcome-screen-dialog">
        <?php 
                $_smarty_tpl->tpl_vars["company"] = new Smarty_variable(fn_get_company_data("1"), null, 0);
                ?>
        <?php 
                if (fn_allowed_for("ULTIMATE")) {
                    ?>
            <?php 
                    ob_start();
                    echo htmlspecialchars(smarty_modifier_unpuny($_smarty_tpl->tpl_vars['company']->value['storefront']), ENT_QUOTES, 'UTF-8');
                    $_tmp3 = ob_get_clean();
                    $_smarty_tpl->tpl_vars['link_storefront'] = new Smarty_variable("http://" . $_tmp3, null, 0);
                    ?>
        <?php 
                } else {
                    ?>
            <?php 
                    ob_start();
                    echo htmlspecialchars(fn_url($_smarty_tpl->tpl_vars['config']->value['http_location']), ENT_QUOTES, 'UTF-8');
                    $_tmp4 = ob_get_clean();
                    $_smarty_tpl->tpl_vars['link_storefront'] = new Smarty_variable($_tmp4, null, 0);
                    ?>
        <?php 
                }
                ?>
        <div class="welcome-screen">
            <p>
                <?php 
                $_smarty_tpl->tpl_vars['user_data'] = new Smarty_variable(fn_get_user_info($_smarty_tpl->tpl_vars['auth']->value['user_id']), null, 0);
                ?>
                <?php 
                echo $_smarty_tpl->__("welcome_screen.administrator_info", array('[email]' => $_smarty_tpl->tpl_vars['user_data']->value['email']));
                ?>

            </p>
            <div class="welcome-location-wrapper clearfix">
                <div class="welcome-location-block pull-left center">
                    <h4 class="install-title"><?php 
                echo $_smarty_tpl->__("admin_panel");
                ?>
</h4>
                    <div class="welcome-screen-location welcome-screen-admin">
                        <div class="welcome-screen-overlay">
                            <a class="btn cm-dialog-closer welcome-screen-overlink"><?php 
                echo $_smarty_tpl->__("welcome_screen.go_admin_panel");
                ?>
</a>
                        </div>
                    </div>
                    <div class="welcome-screen-arrow"></div>
                    <p>
                        <?php 
                echo $_smarty_tpl->__("welcome_screen.go_settings_wizard");
                ?>

                    </p>
                    <?php 
                $_smarty_tpl->tpl_vars['c_url'] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0);
                ?>
                    <a class="cm-dialog-opener cm-ajax btn btn-primary strong" data-ca-target-id="content_settings_wizard" title="<?php 
                echo $_smarty_tpl->__("settings_wizard");
                ?>
" href="<?php 
                echo htmlspecialchars(fn_url("settings_wizard.view?return_url=" . (string) $_smarty_tpl->tpl_vars['c_url']->value), ENT_QUOTES, 'UTF-8');
                ?>
" target="_blank"><?php 
                echo $_smarty_tpl->__("welcome_screen.run_settings_wizard");
                ?>
</a>
                </div>
                <div class="welcome-location-block pull-right center">
                    <h4 class="install-title"><?php 
                echo $_smarty_tpl->__("storefront");
                ?>
</h4>
                    <div class="welcome-screen-location welcome-screen-store">
                        <div class="welcome-screen-overlay">
                            <a class="btn welcome-screen-overlink" href="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['link_storefront']->value, ENT_QUOTES, 'UTF-8');
                ?>
" target="_blank"><?php 
                echo $_smarty_tpl->__("welcome_screen.go_storefront");
                ?>
</a>
                        </div>
                    </div>
                    <div class="welcome-screen-arrow"></div>
                    <p>
                        <?php 
                echo $_smarty_tpl->__("welcome_screen.learn_more_configuration");
                ?>

                    </p>
                    <a class="kbase-link" href="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['resources']['knowledge_base'], ENT_QUOTES, 'UTF-8');
                ?>
" target="_blank"><?php 
                echo $_smarty_tpl->__("welcome_screen.knowledge_base");
                ?>
</a>
                </div>
            </div>
            <div class="welcome-screen-social center">
                <p>
                    <?php 
                echo $_smarty_tpl->__("welcome_screen.thanks", array("[product]" => @constant('PRODUCT_NAME')));
                ?>

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

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

<?php 
    }
    function content_55db8f5833f7a1_27021682($_smarty_tpl)
    {
        if (!is_callable('smarty_function_split')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.split.php';
        }
        if (!is_callable('smarty_modifier_enum')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.enum.php';
        }
        if (!is_callable('smarty_modifier_in_array')) {
            include '/var/www/html/market/app/functions/smarty_plugins/modifier.in_array.php';
        }
        fn_preload_lang_vars(array('none', 'your_range', 'none', 'yes', 'no'));
        echo smarty_function_split(array('data' => $_smarty_tpl->tpl_vars['filter_features']->value, 'size' => "3", 'assign' => "splitted_filter", 'preverse_keys' => true), $_smarty_tpl);
        ?>


<table cellpadding="8">
<?php 
        $_smarty_tpl->tpl_vars["filters_row"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["filters_row"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['splitted_filter']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars["filters_row"]->index = -1;
        foreach ($_from as $_smarty_tpl->tpl_vars["filters_row"]->key => $_smarty_tpl->tpl_vars["filters_row"]->value) {
            $_smarty_tpl->tpl_vars["filters_row"]->_loop = true;
            $_smarty_tpl->tpl_vars["filters_row"]->index++;
            $_smarty_tpl->tpl_vars["filters_row"]->first = $_smarty_tpl->tpl_vars["filters_row"]->index === 0;
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']["filters_row"]['first'] = $_smarty_tpl->tpl_vars["filters_row"]->first;
            ?>
<thead>
    <tr>
    <?php 
            $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["filter"]->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['filters_row']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
                $_smarty_tpl->tpl_vars["filter"]->_loop = true;
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['filter']->value && $_smarty_tpl->tpl_vars['filter']->value['field_type'] != "P") {
                    ?>
        <td><strong><?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['filter']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['description'] : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
</strong></td>
        <?php 
                }
                ?>
    <?php 
            }
            ?>
    </tr>
</thead>
<tr valign="top"<?php 
            if (sizeof($_smarty_tpl->tpl_vars['splitted_filter']->value) > 1 && $_smarty_tpl->getVariable('smarty')->value['foreach']['filters_row']['first']) {
                ?>
 class="delim"<?php 
            }
            ?>
>
<?php 
            $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["filter"]->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['filters_row']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
                $_smarty_tpl->tpl_vars["filter"]->_loop = true;
                ?>

    <?php 
                if ($_smarty_tpl->tpl_vars['filter']->value && $_smarty_tpl->tpl_vars['filter']->value['field_type'] != "P") {
                    ?>
        <?php 
                    $_smarty_tpl->tpl_vars['id'] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['filter']->value['filter_id']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['filter']->value['feature_id'] : $tmp, null, 0);
                    ?>
        <td width="33%">
            <?php 
                    if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::TEXT_SELECTBOX") || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::EXTENDED") || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::MULTIPLE_CHECKBOX") || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_SELECTBOX") && !$_smarty_tpl->tpl_vars['id']->value) {
                        ?>
                <div class="scroll-y">
                    <?php 
                        $_smarty_tpl->tpl_vars["variant"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["variant"]->_loop = false;
                        $_smarty_tpl->tpl_vars["variant_id"] = new Smarty_Variable();
                        $_from = $_smarty_tpl->tpl_vars['filter']->value['variants'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["variant"]->key => $_smarty_tpl->tpl_vars["variant"]->value) {
                            $_smarty_tpl->tpl_vars["variant"]->_loop = true;
                            $_smarty_tpl->tpl_vars["variant_id"]->value = $_smarty_tpl->tpl_vars["variant"]->key;
                            ?>
                        <label for="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                            ?>
variants_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['variant_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="checkbox">
                        <input type="checkbox" name="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                            ?>
[<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
][]" id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                            ?>
variants_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['variant_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['variant_id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if (smarty_modifier_in_array($_smarty_tpl->tpl_vars['variant_id']->value, $_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value])) {
                                ?>
checked="checked"<?php 
                            }
                            ?>
 /><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['variant']->value['variant'], ENT_QUOTES, 'UTF-8');
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8');
                            ?>
</label>
                    <?php 
                        }
                        ?>
                </div>
            <?php 
                    } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_FIELD") || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::NUMBER_SELECTBOX") && $_smarty_tpl->tpl_vars['id']->value || $_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::DATE") || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "D") {
                        ?>

                <div>
                    <label class="radio"><input class="cm-switch-availability cm-switch-inverse" type="radio" name="range_selected[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
]" id="sw_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
select_custom_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_suffix_N" value="" checked="checked" /><?php 
                        echo $_smarty_tpl->__("none");
                        ?>

                    </label>
                </div>

                <?php 
                        $_smarty_tpl->tpl_vars['disable'] = new Smarty_variable(true, null, 0);
                        ?>
                <label class="radio"><input class="cm-switch-availability" type="radio" name="range_selected[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
]" id="sw_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
select_custom_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_suffix_Y" value="1" <?php 
                        if ($_smarty_tpl->tpl_vars['search']->value['range_selected'][$_smarty_tpl->tpl_vars['id']->value]) {
                            $_smarty_tpl->tpl_vars['disable'] = new Smarty_variable(false, null, 0);
                            ?>
checked="checked"<?php 
                        }
                        ?>
  /><?php 
                        echo $_smarty_tpl->__("your_range");
                        ?>
</label>

                <div id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
select_custom_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
">
                    <?php 
                        if ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::DATE")) {
                            ?>
                        <?php 
                            if ($_smarty_tpl->tpl_vars['disable']->value) {
                                ?>
                            <?php 
                                $_smarty_tpl->tpl_vars['date_extra'] = new Smarty_variable("disabled=\"disabled\"", null, 0);
                                ?>
                        <?php 
                            } else {
                                ?>
                            <?php 
                                $_smarty_tpl->tpl_vars['date_extra'] = new Smarty_variable('', null, 0);
                                ?>
                        <?php 
                            }
                            ?>

                        <?php 
                            echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => (string) $_smarty_tpl->tpl_vars['prefix']->value . "range_" . (string) $_smarty_tpl->tpl_vars['id']->value . "_from", 'date_name' => (string) $_smarty_tpl->tpl_vars['data_name']->value . "[" . (string) $_smarty_tpl->tpl_vars['id']->value . "][0]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
                            ?>


                        <?php 
                            echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => (string) $_smarty_tpl->tpl_vars['prefix']->value . "range_" . (string) $_smarty_tpl->tpl_vars['id']->value . "_to", 'date_name' => (string) $_smarty_tpl->tpl_vars['data_name']->value . "[" . (string) $_smarty_tpl->tpl_vars['id']->value . "][1]", 'date_val' => $_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][1], 'extra' => $_smarty_tpl->tpl_vars['date_extra']->value, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
                            ?>


                    <?php 
                        } else {
                            ?>

                        <?php 
                            $_smarty_tpl->tpl_vars['from_value'] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0], null, 0);
                            ?>
                        <?php 
                            $_smarty_tpl->tpl_vars['to_value'] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][1], null, 0);
                            ?>

                        <input type="text" name="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                            ?>
[<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
][0]" id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                            ?>
range_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
_from" size="3" class="input-mini" value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['from_value']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['disable']->value) {
                                ?>
disabled="disabled"<?php 
                            }
                            ?>
 />-<input type="text" name="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                            ?>
[<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
][1]" id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                            ?>
range_<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
_to" size="3" class="input-mini" value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['to_value']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['disable']->value) {
                                ?>
disabled="disabled"<?php 
                            }
                            ?>
 />
                    <?php 
                        }
                        ?>
                </div>

            <?php 
                    } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::SINGLE_CHECKBOX") || $_smarty_tpl->tpl_vars['filter']->value['condition_type'] == "C") {
                        ?>
                    <label for="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_none" class="radio">
                    <input type="radio" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                        ?>
[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][]" id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_none" value="" <?php 
                        if (!$_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0]) {
                            ?>
checked="checked"<?php 
                        }
                        ?>
 />
                    <?php 
                        echo $_smarty_tpl->__("none");
                        ?>
</label>

                    <label for="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_yes" class="radio">
                    <input type="radio" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                        ?>
[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][]" id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_yes" value="Y" <?php 
                        if ($_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0] == "Y") {
                            ?>
checked="checked"<?php 
                        }
                        ?>
 />
                    <?php 
                        echo $_smarty_tpl->__("yes");
                        ?>
</label>

                    <label for="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_no" class="radio">
                    <input type="radio" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                        ?>
[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][]" id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
                        ?>
ranges_<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
_no" value="N" <?php 
                        if ($_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0] == "N") {
                            ?>
checked="checked"<?php 
                        }
                        ?>
 />
                    <?php 
                        echo $_smarty_tpl->__("no");
                        ?>
</label>

            <?php 
                    } elseif ($_smarty_tpl->tpl_vars['filter']->value['feature_type'] == smarty_modifier_enum("ProductFeatures::TEXT_FIELD")) {
                        ?>
                <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['prefix'], ENT_QUOTES, 'UTF-8');
                        ?>
<input type="text" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['data_name']->value, ENT_QUOTES, 'UTF-8');
                        ?>
[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
][]" class="input-mini" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value[$_smarty_tpl->tpl_vars['data_name']->value][$_smarty_tpl->tpl_vars['id']->value][0], ENT_QUOTES, 'UTF-8');
                        ?>
" /><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['suffix'], ENT_QUOTES, 'UTF-8');
                        ?>

            <?php 
                    }
                    ?>
        </td>
    <?php 
                }
            }
            ?>
</tr>
<?php 
        }
        ?>
</table><?php 
    }