Guest Posted April 30, 2007 Share Posted April 30, 2007 Anyone have any luck adding a "view all" link to the category page paganation? for example: 4 pages [1] 2 3 > » view all I've been getting tons of requests from customers asking for that. Seems like a useful addition. Any help would be most apreciated. Quote Link to comment Share on other sites More sharing options...
Guest jrobertblack Posted May 2, 2007 Share Posted May 2, 2007 I am interested in this as well Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 2, 2007 Share Posted May 2, 2007 If you're a coder, the place to do this will be in classes/db.inc.php where the pagination function is defined and the navigation is coded. I haven't tried this, but I went in recently and added some text links for the pagination at this site: http://www.justwhat-iwant.co.uk/ BTW, the installation forum is not the place for these type discussions, try the skins forum si9nce this is a front-end function tweak :( Quote Link to comment Share on other sites More sharing options...
convict Posted May 3, 2007 Share Posted May 3, 2007 Anyone have any luck adding a "view all" link to the category page paganation? for example: 4 pages [1] 2 3 > » view all I've been getting tons of requests from customers asking for that. Seems like a useful addition. Any help would be most apreciated. As Mark mentioned the right place to do it howver this is simple hack out of function: viewCat.inc.php SEARCH FOR $productResults = $db->select($productListQuery, $config['productPages'], $page); ADD BEFORE IT // View All by convict --> if ($page === "all") { $config['productPages'] = $db->numrows($productListQuery); $page = 0; } elseif ($config['productPages'] < $db->numrows($productListQuery)) { $view_cat->assign("CAT_ID",$_GET['catId']); $view_cat->parse("view_cat.view_all"); } // <-- View All by convict viewCat.tpl SEARCH FOR <div class="pagination">{PAGINATION}</div> REPLACE WITH <div class="pagination">{PAGINATION} <!-- BEGIN: view_all --><a href="index.php?page=all&act=viewCat&catId={CAT_ID}" class="txtLink">view all</a><!-- END: view_all --></div> Have fun! Quote Link to comment Share on other sites More sharing options...
Guest Posted May 3, 2007 Share Posted May 3, 2007 Nice one, convict! Only thing I notices is that if I replace the pagination part at both top and bottom of the column (replacing both instances of the original tag), for some reason the "view all" link appears twice as "view allview all"? Would be nice to include it in both places so if a customer looks at the first page and then decides to view all, he can do so from the bottom without scrolling back up. (and moved to skins & templates) Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 3, 2007 Share Posted May 3, 2007 Good stuff, convict Can't wait to use this myself. Quote Link to comment Share on other sites More sharing options...
convict Posted May 4, 2007 Share Posted May 4, 2007 Nice one, convict! Only thing I notices is that if I replace the pagination part at both top and bottom of the column (replacing both instances of the original tag), for some reason the "view all" link appears twice as "view allview all"? Would be nice to include it in both places so if a customer looks at the first page and then decides to view all, he can do so from the bottom without scrolling back up. (and moved to skins & templates) Well the reason of such behaviour is twin template sections. You have to use different name for bottom section name in paginate area like <!-- BEGIN view_all2 --> and <!-- END view_all2 --> and add $view_cat->parse("view_cat.view_all2"); just after $view_cat->parse("view_cat.view_all"); @Mark :) Quote Link to comment Share on other sites More sharing options...
Guest Posted May 4, 2007 Share Posted May 4, 2007 Ah well see, I figured it was something simple Syntax and me don't mix lol. Thanks will give it a try :( Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2007 Share Posted May 31, 2007 Thanks for the advice. How would I go about adding styles and images for the next and previous button, and possibly each page number. Quote Link to comment Share on other sites More sharing options...
Guest jrobertblack Posted July 23, 2007 Share Posted July 23, 2007 I am using this for the main category section, so it brings in all the subcategories on the main category page, but when a product is in two sub categories then the view all brings two of the same products on the same page, it there any way to fix this. Thanks Quote Link to comment Share on other sites More sharing options...
Guest jrobertblack Posted August 23, 2007 Share Posted August 23, 2007 Also when you do a search, then click view all it brings up the whole store not just the items you searched for, is there any fix for this Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.