Post by PlusCybernet » Fri Mar 02, 2012 12:03 pm

I have changed Settings for "Default Items Per Page" minimum 36 products per page... it's done ... but the dropdown list of on category page "Show: 36, 50, 75, 100" ... I want to change it to "36, 72, 108, 144". How can I do it, pls advice.

User avatar
Active Member

Posts

Joined
Sun Dec 25, 2011 12:01 pm

Post by florinsith » Fri Mar 02, 2012 12:27 pm

Here is the code you have to change in controllers:

Code: Select all

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

			$this->data['limits'][] = array(
				'text'  => 75,
				'value' => 75,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=75')
			);
			
			$this->data['limits'][] = array(
				'text'  => 100,
				'value' => 100,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=100')
			);
				
The files that have the code and need modifications are located in catalog/controller/product , named category.php , search.php , special.php and manufacturer.php .

You need to replace the numbers in each block , with the one you want.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by PlusCybernet » Fri Mar 02, 2012 1:03 pm

All right ... I'm using VQMOD to replace the details; but following code is not responding as per the requirement, do you have any idea what's wrong with following code:

Code: Select all

		<file name="catalog/controller/product/category.php">
                
				<operation>
                        <search position="replace" offset="2"><![CDATA[
						'text'  => 25,
						'value' => 25,
						'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=25')
                        ]]></search>
                        
                        <add trim="true"><![CDATA[
                        'text'  => 72,
						'value' => 72,
						'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=72')
                        ]]></add>
                </operation>
				
        </file>

User avatar
Active Member

Posts

Joined
Sun Dec 25, 2011 12:01 pm

Post by florinsith » Fri Mar 02, 2012 1:08 pm

you can only search single line from what I know.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by PlusCybernet » Fri Mar 02, 2012 1:11 pm

hmm... but I'm using "offset" attribute in VQMOD ...

User avatar
Active Member

Posts

Joined
Sun Dec 25, 2011 12:01 pm

Post by grgr » Fri Mar 02, 2012 5:26 pm

The offset is x number of lines below the searched line. Or to put it another way, find this line <search> and then include the x number <offset> of lines below it.

Image Image Image Image Image Image Image Image


User avatar
Active Member
Online

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by PlusCybernet » Fri Mar 02, 2012 6:53 pm

Yes, you're right, it's done ... thank you for your support.

User avatar
Active Member

Posts

Joined
Sun Dec 25, 2011 12:01 pm

Post by PlusCybernet » Fri Mar 02, 2012 6:55 pm

Another query, should we count "blank lines" as well in offset attribute?

User avatar
Active Member

Posts

Joined
Sun Dec 25, 2011 12:01 pm

Post by Qphoria » Sat Mar 03, 2012 2:58 am

PlusCybernet wrote:Another query, should we count "blank lines" as well in offset attribute?
yes

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ThePath » Wed Aug 01, 2012 12:03 am

Where is this on the latest OC. Cant find those limit arrays anywhere.....are they now pulled from a model file.....just cant find any reference to them in any controller file

Image

OpenCart Theme Options - See All My Extensions - OpenCart Themes and Mods


User avatar
Active Member

Posts

Joined
Fri Jun 26, 2009 11:53 pm
Location - Scotland

Post by chriswillows » Fri Aug 23, 2013 5:48 pm

Hi guys,

We have created a vQmod extension for this:
http://www.opencart.com/index.php?route ... n_id=13477

:crazy:

Want an OpenCart extension? http://www.willowsconsulting.ie : your sole OpenCart partner in Ireland since 2013 ! :)


User avatar
Newbie

Posts

Joined
Fri Aug 23, 2013 5:42 pm

Post by stokeyblokey » Tue Sep 17, 2013 3:22 am

Very good willows - now fess up and at least give us poor souls a pointer in the right direction for doing it manually lol

EDIT: I think this might be something to do with it but not got time to look further: if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}

$this->data['categories'] = array();

from catalog\controller\product\category.php

2nd EDIT: Found it! ;D

$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));

line 336 of catalog\controller\product\category.php - just change those figures and you are good to go ;)

Stokey

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by 1975bloom » Fri Jan 06, 2017 3:28 am

I need some help with mine, I set it to 15 per page but its showing all the products on one page, can anyone tell me how to fix this, I am using 2.3.0.2.
Thanks

New member

Posts

Joined
Wed Apr 10, 2013 10:42 pm

Post by buburuzza » Tue Sep 15, 2020 9:05 pm

FIXED. It fixed itself in about 15-20 mins... probably needed time to update or something

Hi,
I have the same issue. I cannot change the options for how many products are being displayed on a page, i have edited the numbers (25,50,75,100) from:
category.php
special.php
search.php
manufacturer.php
And nothing. All the same.
Opencart 3.0.3.6.
Also, I don't have these line of code anywhere:

Code: Select all

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

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

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by khnaz35 » Tue Sep 15, 2020 11:16 pm

buburuzza wrote:
Tue Sep 15, 2020 9:05 pm
FIXED. It fixed itself in about 15-20 mins... probably needed time to update or something

Hi,
I have the same issue. I cannot change the options for how many products are being displayed on a page, i have edited the numbers (25,50,75,100) from:
category.php
special.php
search.php
manufacturer.php
And nothing. All the same.
Opencart 3.0.3.6.
Also, I don't have these line of code anywhere:

Code: Select all

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

			$this->data['limits'][] = array(
				'text'  => 75,
				'value' => 75,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=75')
			);
			
			$this->data['limits'][] = array(
				'text'  => 100,
				'value' => 100,
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=100')
			);
How about changing it from admin dashboard?

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 25 guests