Claudia Posted October 19, 2023 Posted October 19, 2023 What happened to the "view all" in the category page pagination? If it was removed by design can I get it back? I can't upload my image to show you what I mean ... so ... < Previous 1 2 Next> No View All option Thanks for any and all help Quote
Al Brookbanks Posted October 19, 2023 Posted October 19, 2023 By design as the query could get too heavy and crash MySQL in many cases. It's not something you generally see in ecommerce stores for this exact reason. Quote
bsmither Posted October 20, 2023 Posted October 20, 2023 As best I can determine, there are about three areas in the code that affect the page=all situation on the storefront. None actually stop CubeCart from delivering all pertinent records. But these changes do implement a new pagination sequence on the storefront and a per page selector - the selections of which can be customized. Let's look at the skin's config.xml file: <products>, <perpage> array. Note that the last array element is (probably) set to an amount equal to 96. More <perpage> elements can be added - an amount equal to 192, for example. (Have CubeCart clear its internal cache if this file gets changed.) The first area in the code is the element.paginate.php skin template. In the various skin's that were published with and for CC5, there is code to show a 'All' link when the Smarty variable {$view_all} is true. For Foundation (the only skin published with CC6), that 'All' code was commented out, showing instead a drop-down selector listing the various <perpage> amounts. In CC652, that commented out 'All' code was removed. Should the visitor want to see more products per page, using the drop-down selector is how it is done. Should the store owner want to have a 'All' pseudo-capability, add a <perpage> element with an amount equal to some large number - 192, for example. As was mentioned, be sure the environment that hosts your site is capable. (And, if the page is to show a couple dozen rows of product panels, look into implementing a "lazy-load" of product images.) The second area is in the database class, pagination function. In CC6410 and CC652, when calculating the pagination data for the skin's element.paginate.php template, if there should be page=all in the link, then the data given to the template will be changed to page=1 and per_page=X where X is the last <perpage> amount - 192, for example. So, if there are less than this amount to show, there will be no pagination, thus, a 'All' pseudo-capability. Note that this pagination function still provides a true (default) or false value to the Smarty variable {$view_all}, for CC5 skins, or any skin that really wants to have this in the pagination string. The third area is in the catalogue class, searchCatalogue function. This function returns search hits, products on sale, and products belonging to a given category. If page=all is found here, CubeCart sets a hard limit of 100 records to be returned from the database for sale items and search hits. For products belonging to a given category, the getCategoryProducts function will not use page and per_page when page=all, thus all pertinent records are returned. Lists in admin have also, recently, adopted this paradigm. Quote
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.