Post by munaim1 » Fri May 23, 2014 10:39 pm

Opencart 1.5.5.1
Custom Theme.

We just realised that there is an issue with our special offer page. Basically, for some reason not all the items that are on special offer are showing up in the specials page. For example those four systems here: http://uniqpcs.co.uk/Computer-Systems/H ... e-Mini-PCs that have a special price, not all are specials page here: http://uniqpcs.co.uk/special.

Not sure why that is happening. Also under the Special page, we cannot change the show products count from 100 to 20 etc, it just shows 42 all together which is wrong anyway.

Any ideas?
Last edited by munaim1 on Mon May 26, 2014 2:55 am, edited 1 time in total.

Active Member

Posts

Joined
Tue Dec 10, 2013 2:05 am

Post by munaim1 » Mon May 26, 2014 1:35 am

Anyone have any ideas?

Active Member

Posts

Joined
Tue Dec 10, 2013 2:05 am

Post by NoJoke » Mon May 26, 2014 2:14 am

When i change the count to 75 I am seeing those products on that page.. now there is a way to get rid of the 100...

in your catalog/controller/product/special.php page you should see some code that looks like :

Code: Select all

$this->data['limits'] = array();
		
		$this->data['limits'][] = array(
			'text'  => $this->config->get('config_catalog_limit'),
			'value' => $this->config->get('config_catalog_limit'),
			'href'  => $this->url->link('product/special', $url . '&limit=' . $this->config->get('config_catalog_limit'))
		);
					
		$this->data['limits'][] = array(
			'text'  => 25,
			'value' => 25,
			'href'  => $this->url->link('product/special', $url . '&limit=25')
		);
		
		$this->data['limits'][] = array(
			'text'  => 50,
			'value' => 50,
			'href'  => $this->url->link('product/special', $url . '&limit=50')
		);

		$this->data['limits'][] = array(
			'text'  => 75,
			'value' => 75,
			'href'  => $this->url->link('product/special', $url . '&limit=75')
		);
		
		$this->data['limits'][] = array(
			'text'  => 100,
			'value' => 100,
			'href'  => $this->url->link('product/special', $url . '&limit=100')
		);
So the first one should show the default amount that you have set in your admin. You can remove the first one in this code which is the default and change it to whatever you want.


So for myself I would have the code maybe something like :

Code: Select all

$this->data['limits'] = array();
		
		$this->data['limits'][] = array(
				'text'  => 20,
				'value' => 20,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=20')
			);
			
			$this->data['limits'][] = array(
				'text'  => 40,
				'value' => 40,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=40')
			);

			$this->data['limits'][] = array(
				'text'  => 60,
				'value' => 60,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=60')
			);
			
			$this->data['limits'][] = array(
				'text'  => 80,
				'value' => 80,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=80')
			);

             $this->data['limits'][] = array(
				'text'  => 'All',
				'value' => 9999,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=9999')
			);	
So that would show 20 as the default, 40, 60, 80 and then All which would show a 9999 in the address bar when clicked on so it can show all the products that are on the specials page.

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by munaim1 » Mon May 26, 2014 2:48 am

For some reason the special.php looks different. Please find attached. (Is not part of a commercial theme)

Also if you check out the page itself, it seems the pagination doesn't also work, however, you're right, when changing the product count from 100 to say 20 it does show 20 products but again the drop down remains at 100 and the pagination doesn't seem to work.

EDIT: Solved it completely, it was a problem with pagination limit code.

SPECIAL PAGE: (..\catalog\controller\product\special.php)

Line 229-235

foreach($limits as $limit){
$this->data['limits'][] = array(
'text' => $limit,
'value' => $limit,
'href' => $this->url->link('product/special', $url . '&limit=' . $limit)
);
}

Replace with:

foreach($limits as $limits){
$this->data['limits'][] = array(
'text' => $limits,
'value' => $limits,
'href' => $this->url->link('product/special', $url . '&limit=' . $limits)
);
}

Active Member

Posts

Joined
Tue Dec 10, 2013 2:05 am

Post by NoJoke » Mon May 26, 2014 11:30 am

Glad I was able to point you into the right direction to get this solved.

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by evakotsi » Tue Sep 23, 2014 2:55 am

I was having the exact same problem!
God bless you for the solution :)

User avatar
Newbie

Posts

Joined
Mon Sep 01, 2014 4:07 am
Location - Greece

Post by wenza8 » Wed Jul 01, 2015 1:40 pm

Having the same issue.
Thanks for solving the problem

Newbie

Posts

Joined
Mon May 04, 2015 9:48 pm
Who is online

Users browsing this forum: Bing [Bot] and 54 guests