This code is simplistic but can work ...
Usually, when you hit the Product listing ... the URL reads:
/index.php?main_page=index&cPath=53
This then processes that Category to work with the Maximum display setting ...
However ... if you want to override this, you can do so by creating an override of the file:
/includes/modules/products_listing.php
If you added a link ... for All to generate the URL:
/index.php?main_page=index&cPath=53&override=more
All you need do is edit the products_listing.php to include this IF to control what happens when your link adds that extra paramater ...
Change the line:
PHP Code:
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
To the new IF statement ...
PHP Code:
if ($_GET['override'] == 'more') {
$max_display_products_listing_override = $db->Execute($listing_sql);
$max_display_products_listing_override = $max_display_products_listing_override->RecordCount();
$listing_split = new splitPageResults($listing_sql, $max_display_products_listing_override, 'p.products_id', 'page');
} else {
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
}
Bookmarks