Post by williham » Wed Mar 23, 2011 5:55 am

Hi,

I want to add a dropdown on category listing, brand listing, search results etc where the user can select the amout of products to show per page.

Just wondered if anyone could point me in the right direction of how this could be done, please?

Many Thanks

Newbie

Posts

Joined
Tue Feb 08, 2011 8:13 pm

Post by williham » Fri Mar 25, 2011 1:41 am

Anyone?

Newbie

Posts

Joined
Tue Feb 08, 2011 8:13 pm

Post by yiyinlah » Fri Apr 22, 2011 4:57 pm

I would like to know too! Can someone help??

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by burniesb » Sun Jul 03, 2011 7:15 pm

You can use this workaround until somebody comes up with a bit more of a 'robust' solution:

1. Download a copy of the following template files category.tpl, manufacturer_info.tpl, search.tpl and special.tpl (good idea make a backup of each before committing the modified versions). You can find these under catalog/view/theme/YOURTHEME/template/product

2. Find the following line in each of these files:

Code: Select all

<?php foreach ($limits as $limits) { ?>
3. Insert the following code immediately before the above line (change the digits on the third line to reflect the limits you want - you can have any number of these without restriction)

Code: Select all

<?php
	// Put desired limits between the brackets below
	$my_limits = array( 4, 8, 16, 32 );

	$limits = '';
	$a_limit = '';

	if (isset($_GET['route'])) {
		$url = $_GET['route'];
	}
	else {
		$url = $_GET['_route_'];
	}

	foreach ($my_limits as $my_limit) {
		$a_limit['value'] = $my_limit;
		$a_limit['href'] = $url.'?limit='.$my_limit;
		$a_limit['text'] = $my_limit;
		$limits[] = $a_limit;
	}

	if(isset($_GET['limit'])) {
		$limit = $_GET['limit'];
	}
	else {
		$limit = '';
	}
?>
4. Save the modified files and upload.

Tested and working in OC version 1.5.0.5.

Newbie

Posts

Joined
Wed Aug 26, 2009 3:07 pm

Post by yiyinlah » Mon Jul 04, 2011 2:41 am

Will it work in 1.4.9.5 please?

I don't think 1.5.0.5 is stable enough yet :(

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore
Who is online

Users browsing this forum: No registered users and 27 guests