Change pagination on product listing

  • Posts: 5
  • Thank you received: 0
12 years 2 months ago #73320

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: 12 years 2 months ago by Thalia.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 2 months ago #73413

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: 12 years 2 months ago by Xavier.

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

  • Posts: 5
  • Thank you received: 0
12 years 2 months ago #73577

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.

  • Posts: 35
  • Thank you received: 1
11 years 11 months ago #88451

Is there a way to create a template override for this?

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

  • Posts: 26172
  • Thank you received: 4030
  • MODERATOR
11 years 11 months ago #88619

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum