Example #1
0
function fn_twg_set_response_pagination(&$response, $params, $set_empty = false)
{
    $params = array('total_items' => !empty($params['total_items']) ? $params['total_items'] : count($response->getData()), 'items_per_page' => $params['items_per_page'], 'page' => $params['page']);
    $pagination = fn_generate_pagination($params);
    if (!empty($pagination)) {
        $response->setMeta($pagination['total_pages'], 'total_pages');
        $response->setMeta($pagination['total_items'], 'total_items');
        $response->setMeta($pagination['items_per_page'], 'items_per_page');
        $response->setMeta($pagination['current_page'], 'current_page');
    } elseif ($set_empty) {
        $response->setMeta(0, 'total_pages');
        $response->setMeta(0, 'total_items');
        $response->setMeta(0, 'items_per_page');
        $response->setMeta(1, 'current_page');
    }
    return true;
}
    function content_55db8f57aa4f74_91096835($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/var/www/html/market/app/lib/vendor/smarty/smarty/libs/plugins/function.math.php';
        }
        fn_preload_lang_vars(array('previous', 'next', 'total_items'));
        $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['div_id']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
        $_smarty_tpl->tpl_vars["c_url"] = new Smarty_variable(fn_query_remove(($tmp = @$_smarty_tpl->tpl_vars['current_url']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['config']->value['current_url'] : $tmp, "page"), null, 0);
        $_smarty_tpl->tpl_vars["pagination"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
        ?>

<?php 
        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["pagination_meta"] = new Smarty_variable(" paginate-top", null, 0);
        }
        ?>

<?php 
        if (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
            ?>
<div class="cm-pagination-container<?php 
            if ($_smarty_tpl->tpl_vars['pagination_class']->value) {
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination_class']->value, ENT_QUOTES, 'UTF-8');
            }
            ?>
" id="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['pagination']->value) {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['save_current_page']->value) {
                ?>
        <input type="hidden" name="page" value="<?php 
                echo htmlspecialchars(($tmp = @(($tmp = @$_smarty_tpl->tpl_vars['search']->value['page']) === null || $tmp === '' ? $_REQUEST['page'] : $tmp)) === null || $tmp === '' ? 1 : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
" />
    <?php 
            }
            ?>

    <?php 
            if ($_smarty_tpl->tpl_vars['save_current_url']->value) {
                ?>
        <input type="hidden" name="redirect_url" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['current_url'], ENT_QUOTES, 'UTF-8');
                ?>
" />
    <?php 
            }
            ?>

    <?php 
            if (!$_smarty_tpl->tpl_vars['disable_history']->value) {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["history_class"] = new Smarty_variable(" cm-history", null, 0);
                ?>
    <?php 
            } else {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["history_class"] = new Smarty_variable(" cm-ajax-cache", null, 0);
                ?>
    <?php 
            }
            ?>
    <div class="pagination-wrap clearfix">
    <?php 
            if ($_smarty_tpl->tpl_vars['pagination']->value['total_pages'] > 1) {
                ?>
    <div class="pagination pull-left">
        <ul>
        <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['current_page'] != "full_list" && $_smarty_tpl->tpl_vars['pagination']->value['total_pages'] > 1) {
                    ?>
            <li class="<?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
disabled<?php 
                    }
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><a data-ca-scroll=".cm-pagination-container" class="cm-ajax<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
>&laquo;&nbsp;<?php 
                    echo $_smarty_tpl->__("previous");
                    ?>
</a></li>

            <?php 
                    $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    $_smarty_tpl->tpl_vars["pg"]->total = $_smarty_tpl->_count($_from);
                    $_smarty_tpl->tpl_vars["pg"]->iteration = 0;
                    $_smarty_tpl->tpl_vars["pg"]->index = -1;
                    foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                        $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                        $_smarty_tpl->tpl_vars["pg"]->iteration++;
                        $_smarty_tpl->tpl_vars["pg"]->index++;
                        $_smarty_tpl->tpl_vars["pg"]->first = $_smarty_tpl->tpl_vars["pg"]->index === 0;
                        $_smarty_tpl->tpl_vars["pg"]->last = $_smarty_tpl->tpl_vars["pg"]->iteration === $_smarty_tpl->tpl_vars["pg"]->total;
                        $_smarty_tpl->tpl_vars['smarty']->value['foreach']["f_pg"]['first'] = $_smarty_tpl->tpl_vars["pg"]->first;
                        $_smarty_tpl->tpl_vars['smarty']->value['foreach']["f_pg"]['last'] = $_smarty_tpl->tpl_vars["pg"]->last;
                        ?>
            <li <?php 
                        if ($_smarty_tpl->tpl_vars['pg']->value == $_smarty_tpl->tpl_vars['pagination']->value['current_page']) {
                            ?>
class="active" <?php 
                        }
                        ?>
>
                <?php 
                        if ($_smarty_tpl->getVariable('smarty')->value['foreach']['f_pg']['first'] && $_smarty_tpl->tpl_vars['pg']->value > 1) {
                            ?>
                <a data-ca-scroll=".cm-pagination-container" class="cm-ajax<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=1`"), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="1" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
">1</a>
                <?php 
                            if ($_smarty_tpl->tpl_vars['pg']->value != 2) {
                                ?>
<a data-ca-scroll=".cm-pagination-container" class="<?php 
                                if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                                    ?>
cm-ajax<?php 
                                }
                                ?>
 prev-range<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" <?php 
                                if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                                    ?>
href="<?php 
                                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range']), ENT_QUOTES, 'UTF-8');
                                    ?>
" data-ca-page="<?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                                    ?>
" data-ca-target-id="<?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                    ?>
"<?php 
                                }
                                ?>
>&nbsp;...&nbsp;</a><?php 
                            }
                            ?>
                <?php 
                        }
                        ?>
                <?php 
                        if ($_smarty_tpl->tpl_vars['pg']->value != $_smarty_tpl->tpl_vars['pagination']->value['current_page']) {
                            ?>
<a data-ca-scroll=".cm-pagination-container" class="cm-ajax<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a><?php 
                        } else {
                            ?>
<a href="#"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a><?php 
                        }
                        ?>
                <?php 
                        if ($_smarty_tpl->getVariable('smarty')->value['foreach']['f_pg']['last'] && $_smarty_tpl->tpl_vars['pg']->value < $_smarty_tpl->tpl_vars['pagination']->value['total_pages']) {
                            ?>
                <?php 
                            if ($_smarty_tpl->tpl_vars['pg']->value != $_smarty_tpl->tpl_vars['pagination']->value['total_pages'] - 1) {
                                ?>
<a data-ca-scroll=".cm-pagination-container" class="<?php 
                                if ($_smarty_tpl->tpl_vars['pagination']->value['next_range']) {
                                    ?>
cm-ajax<?php 
                                }
                                ?>
 next-range<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" <?php 
                                if ($_smarty_tpl->tpl_vars['pagination']->value['next_range']) {
                                    ?>
href="<?php 
                                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range']), ENT_QUOTES, 'UTF-8');
                                    ?>
" data-ca-page="<?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                                    ?>
" data-ca-target-id="<?php 
                                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                    ?>
"<?php 
                                }
                                ?>
>&nbsp;...&nbsp;</a><?php 
                            }
                            ?>
<a data-ca-scroll=".cm-pagination-container" class="cm-ajax<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['total_pages']), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['total_pages'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['total_pages'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                <?php 
                        }
                        ?>
            </li>
            <?php 
                    }
                    ?>
            <li class="<?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
disabled<?php 
                    }
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><a data-ca-scroll=".cm-pagination-container" class="<?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
cm-ajax<?php 
                    }
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page']), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
><?php 
                    echo $_smarty_tpl->__("next");
                    ?>
&nbsp;&raquo;</a></li>
        <?php 
                }
                ?>
        </ul>
    </div>
        <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['total_items']) {
                    ?>
            <div class="pagination-desc pull-left">
            <div class="btn-toolbar">
            <span class="pagination-total-items">&nbsp;<?php 
                    echo $_smarty_tpl->__("total_items");
                    ?>
:&nbsp;<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['total_items'], ENT_QUOTES, 'UTF-8');
                    ?>
&nbsp;/&nbsp;</span>
            <?php 
                    $_smarty_tpl->_capture_stack[0][] = array("pagination_list", null, null);
                    ob_start();
                    ?>
                    <?php 
                    $_smarty_tpl->tpl_vars["range_url"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['c_url']->value, "items_per_page"), null, 0);
                    ?>
                    <?php 
                    $_smarty_tpl->tpl_vars["step"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["step"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['pagination']->value['per_page_range'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars["step"]->key => $_smarty_tpl->tpl_vars["step"]->value) {
                        $_smarty_tpl->tpl_vars["step"]->_loop = true;
                        ?>
                        <li><a data-ca-scroll=".cm-pagination-container" class="cm-ajax<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['history_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&items_per_page=" . (string) $_smarty_tpl->tpl_vars['step']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['step']->value, ENT_QUOTES, 'UTF-8');
                        ?>
</a></li>
                    <?php 
                    }
                    ?>
            <?php 
                    list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
                    if (!empty($_capture_buffer)) {
                        if (isset($_capture_assign)) {
                            $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                        }
                        if (isset($_capture_append)) {
                            $_smarty_tpl->append($_capture_append, ob_get_contents());
                        }
                        Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
                    } else {
                        $_smarty_tpl->capture_error();
                    }
                    ?>
            <?php 
                    echo smarty_function_math(array('equation' => "rand()", 'assign' => "rnd"), $_smarty_tpl);
                    ?>

            <?php 
                    echo $_smarty_tpl->getSubTemplate("common/tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('prefix' => "pagination_" . (string) $_smarty_tpl->tpl_vars['rnd']->value, 'hide_actions' => true, 'tools_list' => Smarty::$_smarty_vars['capture']['pagination_list'], 'link_text' => $_smarty_tpl->tpl_vars['pagination']->value['items_per_page'], 'override_meta' => "btn-text", 'skip_check_permissions' => "true", 'tool_meta' => (string) $_smarty_tpl->tpl_vars['pagination_meta']->value . " ", 'caret' => true), 0);
                    ?>

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


<?php 
        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
            ?>
    <!--<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
--></div>
    <?php 
            $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
            ob_start();
            ?>
N<?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();
            }
        } elseif (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
            ?>
    <?php 
            $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
            ob_start();
            ?>
Y<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
        }
    }
    function content_55ccf2eb006f03_28916276($_smarty_tpl)
    {
        if (!is_callable('smarty_function_set_id')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('page', 'ls_next_page', 'page', 'ls_next_page'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            $_smarty_tpl->tpl_vars["id1"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id1']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination4"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination3"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search2']->value), null, 0);
            ?>

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

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

    <div class="ls_next_page_container">
         <span><?php 
                echo $_smarty_tpl->__("page");
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination4']->value['current_page'], ENT_QUOTES, 'UTF-8');
                ?>
</span>
         <?php 
                if ($_smarty_tpl->tpl_vars['pagination4']->value['next_page']) {
                    ?>
 
          <a data-ca-scroll=".cm-pagination-container" href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination4']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination4']->value['next_range'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="ls_next_page_container_link cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id1']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><span class='ls_next_page_icon'></span><?php 
                    echo $_smarty_tpl->__("ls_next_page");
                    ?>
</a>
         <?php 
                }
                ?>

    </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 (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/ls_next_page.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/ls_next_page.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            $_smarty_tpl->tpl_vars["id1"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id1']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination4"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination3"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search2']->value), null, 0);
            ?>

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

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

    <div class="ls_next_page_container">
         <span><?php 
                echo $_smarty_tpl->__("page");
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination4']->value['current_page'], ENT_QUOTES, 'UTF-8');
                ?>
</span>
         <?php 
                if ($_smarty_tpl->tpl_vars['pagination4']->value['next_page']) {
                    ?>
 
          <a data-ca-scroll=".cm-pagination-container" href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination4']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination4']->value['next_range'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="ls_next_page_container_link cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id1']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><span class='ls_next_page_icon'></span><?php 
                    echo $_smarty_tpl->__("ls_next_page");
                    ?>
</a>
         <?php 
                }
                ?>

    </div>
<?php 
            }
            ?>
    
<?php 
        }
    }
    function content_55ccec9fe8e759_21977465($_smarty_tpl)
    {
        fn_preload_lang_vars(array('prev_page', 'next'));
        $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
        $_smarty_tpl->tpl_vars["pagination"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
        ?>

<?php 
        if (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
            ?>
    <div class="ty-pagination-container cm-pagination-container" id="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
">

    <?php 
            if ($_smarty_tpl->tpl_vars['save_current_page']->value) {
                ?>
        <input type="hidden" name="page" value="<?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['page']) === null || $tmp === '' ? $_REQUEST['page'] : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
" />
    <?php 
            }
            ?>

    <?php 
            if ($_smarty_tpl->tpl_vars['save_current_url']->value) {
                ?>
        <input type="hidden" name="redirect_url" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['current_url'], ENT_QUOTES, 'UTF-8');
                ?>
" />
    <?php 
            }
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['pagination']->value['total_pages'] > 1) {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["c_url"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['config']->value['current_url'], "page"), null, 0);
                ?>

    <?php 
                if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                    ?>
        <?php 
                    $_smarty_tpl->tpl_vars["ajax_class"] = new Smarty_variable("cm-ajax", null, 0);
                    ?>
    <?php 
                }
                ?>

    <?php 
                if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                    ?>
    <div class="ty-pagination__bottom">
    <?php 
                }
                ?>
    <div class="ty-pagination">
        <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                    ?>
            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                    ?>
 - <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                    ?>
</a>
        <?php 
                }
                ?>
        <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                    ?>
ty-pagination__prev cm-history <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                }
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                    ?>
href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                echo $_smarty_tpl->__("prev_page");
                ?>
</span></a>

        <div class="ty-pagination__items">
            <?php 
                $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                    $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                    ?>
                <?php 
                    if ($_smarty_tpl->tpl_vars['pg']->value != $_smarty_tpl->tpl_vars['pagination']->value['current_page']) {
                        ?>
                    <a data-ca-scroll=".cm-pagination-container" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" class="cm-history ty-pagination__item <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                <?php 
                    } else {
                        ?>
                    <span class="ty-pagination__selected"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
</span>
                <?php 
                    }
                    ?>
            <?php 
                }
                ?>
        </div>

        <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                    ?>
ty-pagination__next cm-history <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                }
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                    ?>
href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
><span class="ty-pagination__text"><?php 
                echo $_smarty_tpl->__("next");
                ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

        <?php 
                if ($_smarty_tpl->tpl_vars['pagination']->value['next_range']) {
                    ?>
            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                    echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                    ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                    ?>
 - <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                    ?>
</a>
        <?php 
                }
                ?>
    </div>
    <?php 
                if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                    ?>
        </div>
    <?php 
                }
                ?>
    <?php 
            } else {
                ?>
        <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-target-id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" class="hidden"></a></div>
    <?php 
            }
        }
        ?>

<?php 
        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
            ?>
    <!--<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
            ?>
--></div>
    <?php 
            $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
            ob_start();
            ?>
N<?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();
            }
        } elseif (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
            ?>
    <?php 
            $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
            ob_start();
            ?>
Y<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
        }
    }
Example #5
0
 /**
  * Processes search results
  *
  * @param string $func Func Name
  * @param array $items Search result items
  * @param array $params Search params
  * @return array Array of the parsed data
  */
 public function processResults($func, $items, $params)
 {
     fn_set_hook('view_process_results_pre', $func, $items, $params);
     if (!empty($params['save_view_results']) && !empty($params['page'])) {
         $id = $params['save_view_results'];
         $pagination = fn_generate_pagination($params);
         if (empty($pagination)) {
             return false;
         }
         $current_page = $pagination['current_page'];
         $view_results = array('items_ids' => array(), 'total_pages' => $pagination['total_pages'], 'items_per_page' => $pagination['items_per_page'], 'total_items' => $pagination['total_items'], 'params' => $params);
         $items_ids = array();
         foreach ($items as $item) {
             $view_results['items_ids'][$current_page][] = $item[$id];
         }
         Registry::set('view_results.fn_get_' . $func, $view_results);
     }
 }
/***************************************************************************
*                                                                          *
*   (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev    *
*                                                                          *
* This  is  commercial  software,  only  users  who have purchased a valid *
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if ($mode == 'view' && !empty($_REQUEST['category_id'])) {
    $seo_canonical = array();
    $search = Registry::get('view')->getTemplateVars('search');
    if ($search['total_items'] > $search['items_per_page']) {
        $pagination = fn_generate_pagination($search);
        if ($pagination['prev_page']) {
            $seo_canonical['prev'] = fn_url('categories.view?category_id=' . $_REQUEST['category_id'] . '&page=' . $pagination['prev_page']);
        }
        if ($pagination['next_page']) {
            $seo_canonical['next'] = fn_url('categories.view?category_id=' . $_REQUEST['category_id'] . '&page=' . $pagination['next_page']);
        }
    }
    $seo_canonical['current'] = fn_url('categories.view?category_id=' . $_REQUEST['category_id'] . ($search['page'] > 1 ? '&page=' . $search['page'] : ''));
    Registry::get('view')->assign('seo_canonical', $seo_canonical);
}
    function content_55ccf2ea448c55_01077073($_smarty_tpl)
    {
        fn_preload_lang_vars(array('per_page'));
        ?>
<div class="ty-sort-container">
<?php 
        if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml']) {
            ?>

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

<?php 
        }
        ?>


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

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

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

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

<?php 
        $_smarty_tpl->tpl_vars["pagination_id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
        ?>

<?php 
        $_smarty_tpl->tpl_vars["avail_sorting"] = new Smarty_variable($_smarty_tpl->tpl_vars['settings']->value['Appearance']['available_product_list_sortings'], null, 0);
        ?>


<?php 
        if ($_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] == "asc") {
            ?>

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

        <a><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['sorting']->value[$_smarty_tpl->tpl_vars['search']->value['sort_by']]['description'], ENT_QUOTES, 'UTF-8');
            ?>
<i class="ty-icon-up-dir"></i></a>
    <?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
        } else {
            ?>

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

        <a><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['sorting']->value[$_smarty_tpl->tpl_vars['search']->value['sort_by']]['description'], ENT_QUOTES, 'UTF-8');
            ?>
<i class="ty-icon-down-dir"></i></a>
    <?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
        }
        ?>




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

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

<?php 
        }
        ?>


<?php 
        $_smarty_tpl->tpl_vars["pagination"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
        ?>


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

<?php 
            $_smarty_tpl->tpl_vars["range_url"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['curl']->value, "items_per_page", "page"), null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["product_steps"] = new Smarty_variable(fn_get_product_pagination_steps($_smarty_tpl->tpl_vars['settings']->value['Appearance']['columns_in_products_list'], $_smarty_tpl->tpl_vars['settings']->value['Appearance']['products_per_page']), null, 0);
            ?>

<!--div class="ty-sort-dropdown">
<a id="sw_elm_pagination_steps" class="ty-sort-dropdown__wrapper cm-combination"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['items_per_page'], ENT_QUOTES, 'UTF-8');
            ?>
 <?php 
            echo $_smarty_tpl->__("per_page");
            ?>
<i class="ty-sort-dropdown__icon ty-icon-down-micro"></i></a>
    <ul id="elm_pagination_steps" class="ty-sort-dropdown__content cm-popup-box hidden">
        
    </ul>
</div-->
<?php 
        }
        ?>




    
    

</div><?php 
    }
Example #8
0
/**
 * Generates SEO Canonical, Prev, Next links
 *
 * @param string $base_url URL used a template
 * @param array $search Search parameters from [fn_get_]
 * @return array SEO links (
 *     'current' Canonical URL of the page
 *     'prev'    Link to previous page
 *     'next'    Link to next page
 * )
 */
function fn_seo_get_canonical_links($base_url, $search)
{
    $seo_canonical = array();
    if (is_array($search)) {
        $default_search = array('total_items' => 0, 'items_per_page' => 0, 'page' => 1);
        $search = array_merge($default_search, $search);
        if ($search['total_items'] > $search['items_per_page']) {
            $pagination = fn_generate_pagination($search);
            if (!empty($pagination['prev_page'])) {
                $seo_canonical['prev'] = fn_url($base_url . fn_seo_canonical_url_page($pagination['prev_page']));
            }
            if (!empty($pagination['next_page'])) {
                $seo_canonical['next'] = fn_url($base_url . fn_seo_canonical_url_page($pagination['next_page']));
            }
        }
        $seo_canonical['current'] = fn_url($base_url . fn_seo_canonical_url_page($search['page']));
    }
    return $seo_canonical;
}
    function content_55ccf2eadd3293_13565500($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_regex_replace')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/modifier.regex_replace.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('prev_page', 'next', 'view_all', 'view_all', 'view_all', 'view_all', 'block_products', 'ls_top', 'prev_page', 'next', 'view_all', 'block_products', 'ls_top', 'prev_page', 'next', 'block_products', 'ls_top', 'prev_page', 'next', 'view_all', 'view_all', 'view_all', 'view_all', 'block_products', 'ls_top', 'prev_page', 'next', 'view_all', 'block_products', 'ls_top', 'prev_page', 'next', 'block_products', 'ls_top'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination2"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search2']->value), null, 0);
            ?>

        <span style="display: none"><?php 
            echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['pagination']->value), ENT_QUOTES, 'UTF-8');
            ?>
</span>
<?php 
            if (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
                ?>

    <div class="ty-pagination-container cm-pagination-container" id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <?php 
                if ($_smarty_tpl->tpl_vars['save_current_page']->value) {
                    ?>

            <input type="hidden" name="page" value="<?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['page']) === null || $tmp === '' ? $_REQUEST['page'] : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>


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

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

    <?php 
            }
            ?>


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

        <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                    ?>

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


            <?php 
                    if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                        ?>

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

            <?php 
                    }
                    ?>


            <?php 
                    if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

                <div class="ty-pagination__bottom">
                <?php 
                    }
                    ?>

                <div class="ty-pagination">
                    <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                        ?>

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                        ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                        ?>
 - <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                    <?php 
                    }
                    ?>

                    <a data-ca-scroll=".cm-pagination-container" class="testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
ls_inactive_pagination<?php 
                    }
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
 cm-history <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    }
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                    echo $_smarty_tpl->__("prev_page");
                    ?>
</span></a>

                    <div class="ty-pagination__items test_total_pages_1">
                        <?php 
                    $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                        $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                        ?>

                            <?php 
                        if ($_smarty_tpl->tpl_vars['pg']->value != $_smarty_tpl->tpl_vars['pagination']->value['current_page']) {
                            ?>

                                <a href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                            <?php 
                        } else {
                            ?>

                                <span class="ty-pagination__selected"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</span>
                            <?php 
                        }
                        ?>

                        <?php 
                    }
                    ?>

                    </div>

                    <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
ls_inactive_pagination<?php 
                    }
                    ?>
 <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
 cm-history <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    }
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
><span class="ty-pagination__text"><?php 
                    echo $_smarty_tpl->__("next");
                    ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                        ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                        ?>
 - <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                    <?php 
                    }
                    ?>

                </div>
                <div class="ls_view_all">
                    <!--form method="POST" action="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/\\?.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
&dispatch=categories.view"-->
                    <!--form method="POST" action="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/&page=.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
">
                        <input type="hidden" name="ls_view_all">
                         <input type="hidden" name="test" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_tree']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
                        <input type="submit" value='<?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
'>
                    </form-->
                    <a href="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/&page=.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
?&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a>
                    <!--a href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['current_url'], ENT_QUOTES, 'UTF-8');
                    ?>
?dispatch=categories.view&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a-->
                    <!--a href="<?php 
                    echo htmlspecialchars(fn_url($_smarty_tpl->tpl_vars['config']->value['current_url']), ENT_QUOTES, 'UTF-8');
                    ?>
?&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a-->
                </div>
                <div class="ls_pagination_total_products">
                    <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                    ?>
 <?php 
                    echo $_smarty_tpl->__("block_products");
                    ?>

                </div>
                <div class="ls_pagination_return">
                    <div class="ls_pagination_return_click">
                        click me
                    </div>
                    <div><?php 
                    echo $_smarty_tpl->__("ls_top");
                    ?>
</span>
                    </div>
                </div>
                <?php 
                    if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

                </div>
            <?php 
                    }
                    ?>

        <?php 
                } else {
                    ?>

            <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" class="hidden"></a></div>
            <?php 
                }
                ?>

        <?php 
            } else {
                ?>

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

                <?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

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


                <?php 
                        if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                            ?>

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

                <?php 
                        }
                        ?>


                <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                    <div class="ty-pagination__bottom">
                    <?php 
                        }
                        ?>

                    <div class="ty-pagination ls_pagination_dropdown">
                        <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_range']) {
                            ?>

                            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                        <?php 
                        }
                        ?>

                        <a data-ca-scroll=".cm-pagination-container" class=" ls_pagination_dropdown testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("prev_page");
                        ?>
</span></a>

                        <div class="ty-pagination__items test_ls_view_all ls_pagination_dropdown">
                            <?php 
                        $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['pagination2']->value['navi_pages'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        $_smarty_tpl->tpl_vars["pg"]->index = -1;
                        foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                            $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                            $_smarty_tpl->tpl_vars["pg"]->index++;
                            $_smarty_tpl->tpl_vars["pg"]->first = $_smarty_tpl->tpl_vars["pg"]->index === 0;
                            $_smarty_tpl->tpl_vars['smarty']->value['foreach']["pagination_view_all"]['first'] = $_smarty_tpl->tpl_vars["pg"]->first;
                            ?>

                                <?php 
                            if ($_smarty_tpl->getVariable('smarty')->value['foreach']['pagination_view_all']['first']) {
                                ?>
 
                                    <a href="<?php 
                                echo htmlspecialchars(smarty_modifier_regex_replace(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), "/ls_view_all=true/", ''), ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-page="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="cm-history ty-pagination__item <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-target-id="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</a> 
                                <?php 
                            } else {
                                ?>

                                     <a href="<?php 
                                echo htmlspecialchars(smarty_modifier_regex_replace(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), "/ls_view_all=true/", ''), ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-page="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="ls_pagination_dropdown_selection cm-history ty-pagination__item <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-target-id="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" style="display: none"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</a>
                                <?php 
                            }
                            ?>

                            <?php 
                        }
                        ?>

                        </div>

                        <a data-ca-scroll=".cm-pagination-container" class="ls_pagination_dropdown ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("next");
                        ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                        <?php 
                        }
                        ?>

                    </div>
                    <!--div class="ls_view_all">
                    <a href="<?php 
                        echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/page-.*/", ''), ENT_QUOTES, 'UTF-8');
                        ?>
?&ls_view_all=true"><?php 
                        echo $_smarty_tpl->__("view_all");
                        ?>
</a>
                    </div-->
                    <div class="ls_pagination_total_products">
                        <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                        ?>
 <?php 
                        echo $_smarty_tpl->__("block_products");
                        ?>

                    </div>
                    <div class="ls_pagination_return">
                        <div class="ls_pagination_return_click">
                            click me
                        </div>
                        <div><?php 
                        echo $_smarty_tpl->__("ls_top");
                        ?>
</span>
                        </div>
                    </div>
                    <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                    </div>
                <?php 
                        }
                        ?>

            <?php 
                    } else {
                        ?>

                <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" class="hidden"></a></div>
                <?php 
                    }
                    ?>

            <?php 
                } else {
                    ?>
 
            <?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

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


            <?php 
                        if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                            ?>

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

            <?php 
                        }
                        ?>


            <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                <div class="ty-pagination__bottom">
                <?php 
                        }
                        ?>

                <div class="ty-pagination">
                    <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                            ?>

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                    <?php 
                        }
                        ?>

                    <a data-ca-scroll=".cm-pagination-container" class="testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("prev_page");
                        ?>
</span></a>

                    <div class="ty-pagination__items test_total_pages_1">
                        <?php 
                        $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                            $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                            ?>

                            
                                <a href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" style="color: black"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                            
                        <?php 
                        }
                        ?>

                    </div>

                    <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("next");
                        ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                    <?php 
                        }
                        ?>

                </div>
                <div class="ls_pagination_total_products">
                    <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                        ?>
 <?php 
                        echo $_smarty_tpl->__("block_products");
                        ?>

                </div>
                <div class="ls_pagination_return">
                    <div class="ls_pagination_return_click">
                        click me
                    </div>
                    <div><?php 
                        echo $_smarty_tpl->__("ls_top");
                        ?>
</span>
                    </div>
                </div>
                <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                </div>
            <?php 
                        }
                        ?>

        <?php 
                    } else {
                        ?>

            <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" class="hidden"></a></div>
            <?php 
                    }
                    ?>

            <?php 
                }
                ?>

        <?php 
            }
            ?>


    <?php 
            if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                ?>

        <!--<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></div>
    <?php 
                $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
                ob_start();
                ?>
N<?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 
            } elseif (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
                ?>

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

<?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 (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/pagination2.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/pagination2.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id']->value) === null || $tmp === '' ? "pagination_contents" : $tmp, null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search']->value), null, 0);
            ?>

<?php 
            $_smarty_tpl->tpl_vars["pagination2"] = new Smarty_variable(fn_generate_pagination($_smarty_tpl->tpl_vars['search2']->value), null, 0);
            ?>

        <span style="display: none"><?php 
            echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['pagination']->value), ENT_QUOTES, 'UTF-8');
            ?>
</span>
<?php 
            if (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
                ?>

    <div class="ty-pagination-container cm-pagination-container" id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
">
        <?php 
                if ($_smarty_tpl->tpl_vars['save_current_page']->value) {
                    ?>

            <input type="hidden" name="page" value="<?php 
                    echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['page']) === null || $tmp === '' ? $_REQUEST['page'] : $tmp, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>


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

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

    <?php 
            }
            ?>


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

        <?php 
                if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                    ?>

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


            <?php 
                    if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                        ?>

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

            <?php 
                    }
                    ?>


            <?php 
                    if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

                <div class="ty-pagination__bottom">
                <?php 
                    }
                    ?>

                <div class="ty-pagination">
                    <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                        ?>

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                        ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                        ?>
 - <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                    <?php 
                    }
                    ?>

                    <a data-ca-scroll=".cm-pagination-container" class="testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
ls_inactive_pagination<?php 
                    }
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
 cm-history <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    }
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                    echo $_smarty_tpl->__("prev_page");
                    ?>
</span></a>

                    <div class="ty-pagination__items test_total_pages_1">
                        <?php 
                    $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                        $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                        ?>

                            <?php 
                        if ($_smarty_tpl->tpl_vars['pg']->value != $_smarty_tpl->tpl_vars['pagination']->value['current_page']) {
                            ?>

                                <a href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                            <?php 
                        } else {
                            ?>

                                <span class="ty-pagination__selected"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</span>
                            <?php 
                        }
                        ?>

                        <?php 
                    }
                    ?>

                    </div>

                    <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                    if (!$_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
ls_inactive_pagination<?php 
                    }
                    ?>
 <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
 cm-history <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                    }
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                        ?>
href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"<?php 
                    }
                    ?>
><span class="ty-pagination__text"><?php 
                    echo $_smarty_tpl->__("next");
                    ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                        echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                        ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                        ?>
 - <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                        ?>
</a>
                    <?php 
                    }
                    ?>

                </div>
                <div class="ls_view_all">
                    <!--form method="POST" action="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/\\?.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
&dispatch=categories.view"-->
                    <!--form method="POST" action="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/&page=.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
">
                        <input type="hidden" name="ls_view_all">
                         <input type="hidden" name="test" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['categories_tree']->value, ENT_QUOTES, 'UTF-8');
                    ?>
">
                        <input type="submit" value='<?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
'>
                    </form-->
                    <a href="<?php 
                    echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/&page=.*/", ''), ENT_QUOTES, 'UTF-8');
                    ?>
?&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a>
                    <!--a href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['current_url'], ENT_QUOTES, 'UTF-8');
                    ?>
?dispatch=categories.view&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a-->
                    <!--a href="<?php 
                    echo htmlspecialchars(fn_url($_smarty_tpl->tpl_vars['config']->value['current_url']), ENT_QUOTES, 'UTF-8');
                    ?>
?&ls_view_all=true"><?php 
                    echo $_smarty_tpl->__("view_all");
                    ?>
</a-->
                </div>
                <div class="ls_pagination_total_products">
                    <?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                    ?>
 <?php 
                    echo $_smarty_tpl->__("block_products");
                    ?>

                </div>
                <div class="ls_pagination_return">
                    <div class="ls_pagination_return_click">
                        click me
                    </div>
                    <div><?php 
                    echo $_smarty_tpl->__("ls_top");
                    ?>
</span>
                    </div>
                </div>
                <?php 
                    if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

                </div>
            <?php 
                    }
                    ?>

        <?php 
                } else {
                    ?>

            <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" data-ca-target-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" class="hidden"></a></div>
            <?php 
                }
                ?>

        <?php 
            } else {
                ?>

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

                <?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

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


                <?php 
                        if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                            ?>

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

                <?php 
                        }
                        ?>


                <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                    <div class="ty-pagination__bottom">
                    <?php 
                        }
                        ?>

                    <div class="ty-pagination ls_pagination_dropdown">
                        <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_range']) {
                            ?>

                            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                        <?php 
                        }
                        ?>

                        <a data-ca-scroll=".cm-pagination-container" class=" ls_pagination_dropdown testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['prev_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("prev_page");
                        ?>
</span></a>

                        <div class="ty-pagination__items test_ls_view_all ls_pagination_dropdown">
                            <?php 
                        $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['pagination2']->value['navi_pages'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        $_smarty_tpl->tpl_vars["pg"]->index = -1;
                        foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                            $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                            $_smarty_tpl->tpl_vars["pg"]->index++;
                            $_smarty_tpl->tpl_vars["pg"]->first = $_smarty_tpl->tpl_vars["pg"]->index === 0;
                            $_smarty_tpl->tpl_vars['smarty']->value['foreach']["pagination_view_all"]['first'] = $_smarty_tpl->tpl_vars["pg"]->first;
                            ?>

                                <?php 
                            if ($_smarty_tpl->getVariable('smarty')->value['foreach']['pagination_view_all']['first']) {
                                ?>
 
                                    <a href="<?php 
                                echo htmlspecialchars(smarty_modifier_regex_replace(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), "/ls_view_all=true/", ''), ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-page="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="cm-history ty-pagination__item <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-target-id="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</a> 
                                <?php 
                            } else {
                                ?>

                                     <a href="<?php 
                                echo htmlspecialchars(smarty_modifier_regex_replace(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), "/ls_view_all=true/", ''), ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-page="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" class="ls_pagination_dropdown_selection cm-history ty-pagination__item <?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" data-ca-target-id="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                                ?>
" style="display: none"><?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                                ?>
</a>
                                <?php 
                            }
                            ?>

                            <?php 
                        }
                        ?>

                        </div>

                        <a data-ca-scroll=".cm-pagination-container" class="ls_pagination_dropdown ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination2']->value['next_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("next");
                        ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                            <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination2']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination2']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                        <?php 
                        }
                        ?>

                    </div>
                    <!--div class="ls_view_all">
                    <a href="<?php 
                        echo htmlspecialchars(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['config']->value['current_url'], "/page-.*/", ''), ENT_QUOTES, 'UTF-8');
                        ?>
?&ls_view_all=true"><?php 
                        echo $_smarty_tpl->__("view_all");
                        ?>
</a>
                    </div-->
                    <div class="ls_pagination_total_products">
                        <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                        ?>
 <?php 
                        echo $_smarty_tpl->__("block_products");
                        ?>

                    </div>
                    <div class="ls_pagination_return">
                        <div class="ls_pagination_return_click">
                            click me
                        </div>
                        <div><?php 
                        echo $_smarty_tpl->__("ls_top");
                        ?>
</span>
                        </div>
                    </div>
                    <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                    </div>
                <?php 
                        }
                        ?>

            <?php 
                    } else {
                        ?>

                <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" class="hidden"></a></div>
                <?php 
                    }
                    ?>

            <?php 
                } else {
                    ?>
 
            <?php 
                    if ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['top_pagination'] == "Y" && Smarty::$_smarty_vars['capture']['pagination_open'] != "Y" || Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                        ?>

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


            <?php 
                        if (!$_smarty_tpl->tpl_vars['config']->value['tweaks']['disable_dhtml'] || $_smarty_tpl->tpl_vars['force_ajax']->value) {
                            ?>

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

            <?php 
                        }
                        ?>


            <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                <div class="ty-pagination__bottom">
                <?php 
                        }
                        ?>

                <div class="ty-pagination">
                    <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_range']) {
                            ?>

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history hidden-phone ty-pagination__item ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                    <?php 
                        }
                        ?>

                    <a data-ca-scroll=".cm-pagination-container" class="testpagination2 ty-pagination__item ty-pagination__btn ty-pagination__prev <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['prev_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['prev_page']), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['prev_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><i class="ty-pagination__text-arrow">&larr;</i>&nbsp;<span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("prev_page");
                        ?>
</span></a>

                    <div class="ty-pagination__items test_total_pages_1">
                        <?php 
                        $_smarty_tpl->tpl_vars["pg"] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars["pg"]->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['pagination']->value['navi_pages'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars["pg"]->key => $_smarty_tpl->tpl_vars["pg"]->value) {
                            $_smarty_tpl->tpl_vars["pg"]->_loop = true;
                            ?>

                            
                                <a href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pg']->value . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" style="color: black"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                            
                        <?php 
                        }
                        ?>

                    </div>

                    <a data-ca-scroll=".cm-pagination-container" class="ty-pagination__item ty-pagination__btn ty-pagination__next <?php 
                        if (!$_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
ls_inactive_pagination<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
 cm-history <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                        }
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['pagination']->value['next_page']) {
                            ?>
href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_page'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_page'], ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"<?php 
                        }
                        ?>
><span class="ty-pagination__text"><?php 
                        echo $_smarty_tpl->__("next");
                        ?>
</span>&nbsp;<i class="ty-pagination__text-arrow">&rarr;</i></a>

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

                        <a data-ca-scroll=".cm-pagination-container" href="<?php 
                            echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['c_url']->value . "&page=" . (string) $_smarty_tpl->tpl_vars['pagination']->value['next_range'] . (string) $_smarty_tpl->tpl_vars['extra_url']->value), ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-page="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range'], ENT_QUOTES, 'UTF-8');
                            ?>
" class="cm-history ty-pagination__item hidden-phone ty-pagination__range <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_class']->value, ENT_QUOTES, 'UTF-8');
                            ?>
" data-ca-target-id="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                            ?>
"><?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_from'], ENT_QUOTES, 'UTF-8');
                            ?>
 - <?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['pagination']->value['next_range_to'], ENT_QUOTES, 'UTF-8');
                            ?>
</a>
                    <?php 
                        }
                        ?>

                </div>
                <div class="ls_pagination_total_products">
                    <?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['ls_total_products_category']->value, ENT_QUOTES, 'UTF-8');
                        ?>
 <?php 
                        echo $_smarty_tpl->__("block_products");
                        ?>

                </div>
                <div class="ls_pagination_return">
                    <div class="ls_pagination_return_click">
                        click me
                    </div>
                    <div><?php 
                        echo $_smarty_tpl->__("ls_top");
                        ?>
</span>
                    </div>
                </div>
                <?php 
                        if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                            ?>

                </div>
            <?php 
                        }
                        ?>

        <?php 
                    } else {
                        ?>

            <div><a data-ca-scroll=".cm-pagination-container" href="" data-ca-page="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['pg']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" data-ca-target-id="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" class="hidden"></a></div>
            <?php 
                    }
                    ?>

            <?php 
                }
                ?>

        <?php 
            }
            ?>


    <?php 
            if (Smarty::$_smarty_vars['capture']['pagination_open'] == "Y") {
                ?>

        <!--<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
                ?>
--></div>
    <?php 
                $_smarty_tpl->_capture_stack[0][] = array("pagination_open", null, null);
                ob_start();
                ?>
N<?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 
            } elseif (Smarty::$_smarty_vars['capture']['pagination_open'] != "Y") {
                ?>

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

<?php 
            }
            ?>

<?php 
        }
    }