1999 Posts in 531 Topics by 434 members
|Go to End|
16 April 2011 at 1:53am
Hi, I've been trying to add a 'View All' to the pagination on a ProductGroup page in the eCommerce module eg.
< Prev | 1 | 2 | 3 | View All | Next >
So that clicking 'View All' would 'break' pagination and display all the products on one long page instead of limiting them.
Can anyone advise as to the best way to achieve this?
22 April 2011 at 1:18am
Anyone? Jedateach? Any help would be really appreciated, thanks.
25 April 2011 at 1:30pm Last edited: 25 April 2011 1:31pm
I'm not sure if we've got appropriate decorator hooks in there yet, which should be the ideal way to do it.
You'd probably need to get into the ProductGroup.php code, and customise the 'ProductsShowable' functiont so that you can disable the result limit. This should return all products, as long as you also start from 0.
3 May 2011 at 1:08am
You could hardcode a parameter through the View All link such as ?end=1 and, as Jedateach said, then modify the ProductsShowable function to remove the pagination limit IF it detects the param you pass in...
$limit = "";
// existing code to handle pagination limits
$limit = (isset($_GET['start']) && (int)$_GET['start'] > 0) ? (int)$_GET['start'].",".self::$page_length : "0,".self::$page_length;
Hope that helps.
3 May 2011 at 2:10am
|Go to Top|