Skip to main content

Change pagination on product listing

14 years 5 days ago - 14 years 5 days ago #73320 by Thalia
Hi,

how can I change the pagination on my product listing?

I get this list at the moment: 30,5,10,15,20,25,30,50,100,all ... and I think it's too much. :dry:

I would prefer something like this: 25,50,100,all

I am looking at product / listing_div (Display -> Views Menu) :unsure: . Is this the file I should change, and how?

Thanks in advance, :)

Thalia
Last edit: 14 years 5 days ago by Thalia.

Please Log in or Create an account to join the conversation.

14 years 5 days ago - 14 years 5 days ago #73413 by Xavier
Hi,

You can edit the file: "administrator/components/com_hikashop/helpers/pagination.php" and for the function "getLimitBox()" change the value of the variable $minimum to "25" like that:
function getLimitBox($minimum=25){...
Last edit: 14 years 5 days ago by Xavier.

Please Log in or Create an account to join the conversation.

14 years 4 days ago #73577 by Thalia
Thanks Xavier! :cheer:

I had to comment also the line 263 because the initialization and the sorting didn't work right.

The function looks like that now,

function getLimitBox(){
$limits = array ();

// $limits[] = JHTML::_('select.option', (string)$this->limit);
for ($i = 25; $i <= 100; $i += 25) {

$limits[] = JHTML::_('select.option', "$i");

}

$limits[] = JHTML::_('select.option', '0', JText::_('all'));
return JHTML::_('select.genericlist', $limits, 'limit'.$this->hikaSuffix, 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', $this->_viewall ? 0 : $this->limit);

}


and my list is: 25, 50, 75, 100, all. :)

Thanks again,

Thalia

Please Log in or Create an account to join the conversation.

13 years 9 months ago #88451 by bohemier
Is there a way to create a template override for this?

Please Log in or Create an account to join the conversation.

13 years 9 months ago #88619 by Jerome
Hi,

In HikaShop 2.1.0 there would be a way to override the function thanks to a class function override.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum