full list page range is not included in V2?

Here's the fix to make “View All” work with 2.2.3.



In /controllers/customer/categories.php, add this:

if($params['page']=='9999'){
$view->assign('all_page', 'Y');
}


Around line 81 after this:

$view->assign('category_data', $category_data);







In /controllers/customer/products.php, add this:

if ($_REQUEST['page'] == '9999') {
$view->assign('no_pagination', true);
}


Around line 40 after this:

$selected_layout = fn_get_products_layout($params);







In /core/fn.catalog.php, change this line:

if (!empty($items_per_page)) {

To this around line 1856:

if (!empty($items_per_page) && $params['page']!='9999') {

And, this:

$total = 0;
if (!empty($items_per_page)) {
$params['calc_found_rows'] = true;
if (!empty($params['limit']) && $total > $params['limit']) {
$total = $params['limit'];
}

$limit = fn_paginate($params['page'], 0, $items_per_page, true);
}


To this around line 3703:

$total = 0;
if (!empty($items_per_page)) {
$params['calc_found_rows'] = true;
if (!empty($params['limit']) && $total > $params['limit']) {
$total = $params['limit'];
}
if ($params['page'] != '9999'){
$limit = fn_paginate($params['page'], 0, $items_per_page, true);
}
}








In skins/{YOURSKIN}/customer/common_templates/pagination.tpl, change this:

{if $pagination.prev_range}
...
{/if}

{foreach from=$pagination.navi_pages item="pg"}
{if $pg != $pagination.current_page}
{$pg}
{else}
{$pg}
{/if}
{/foreach}


To this around line 27:

{assign var="all" value="9999"}
{if $pagination.prev_range}
...
{/if}

{foreach from=$pagination.navi_pages item="pg"}
{if $pg != $pagination.current_page || $all_page}
{$pg}
{elseif !$all_page}
{$pg}
{/if}
{/foreach}

  |  {if !$all_page}
{$lang.view_all}
{else}
{$lang.view_all}
{/if}


I created a “view_all” language variable that's being called into this template.





I can confirm this is working. If anyone has suggestions for turning this into an add-on or something, I'm open to the idea.

Just wanted to say that I voted “Absolutely not” and the reason being (which most do not realize…yet) is that if you actually have 9999 products that are going to be listed, you can be sure that it will take time for the products to load (if they ever do) and/or the server will crash facing possible suspension of your account.



This is the main reason why pagination is implemented. But to each his/her own. :D