X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Products Per Page dropdown - How to customise? (https://forum.x-cart.com/showthread.php?t=57657)

chamberinternet 01-21-2011 08:14 AM

Products Per Page dropdown - How to customise?
 
Does anyone know how to customise the values within the "Products per Page" dropdown box?

As default the value set goes up in increments of 5 from 5 to 50.
But i'd like to set it to increments of 3 from 3 to 30.

Cant seem to see anything within the administration area to change this.

Any Ideas?

Thanks

Shafiq :sK

cflsystems 01-21-2011 08:26 AM

Re: Products Per Page dropdown - How to customise?
 
Start here
/skin/common_files/customer/main/per_page.tpl

the php script sets the values - $per_page_values

chamberinternet 01-21-2011 12:26 PM

Re: Products Per Page dropdown - How to customise?
 
Nice one Steve ... found it in include/search.php

Thanks a lot :-)

taponitrof 06-29-2011 12:06 PM

Re: Products Per Page dropdown - How to customise?
 
Awesome. This was very helpful. Worked like a charm. FYI:

open include/search.php and search for per_page_values
There you can change the multiples and top number; eg default is multiples of 5 and top if 50. You can change to whatever you want.

Thanks again for this info.

nickff 10-25-2011 11:50 AM

Re: Products Per Page dropdown - How to customise?
 
Anyone know of a way to add a "view all" option to the dropdown? Can't figure it out...

joshf 02-22-2012 09:19 AM

Re: Products Per Page dropdown - How to customise?
 
Here's the 5 minute way to do show all products per page:

include/search.php
Find:
Code:

        for ($i = 5; 50 >= $i; $i = $i + 5) {
            $perPageValues[] = $i;
        }

Immediately after that, add:
Code:

        #Show all products per page
        $perPageValues[] = 999;


skin/common_files/customer/main/per_page.tpl
Find:
Code:

    <option value="{$value}"{if $value eq $objects_per_page} selected="selected"{/if}>{$value}</option>
Replace with:
Code:

    <option value="{$value}"{if $value eq $objects_per_page} selected="selected"{/if}>{if $value == 999}View all{else}{$value}{/if}</option>

Enjoy!

taponitrof 03-08-2012 12:39 PM

Re: Products Per Page dropdown - How to customise?
 
has this changed in 4.4.5? I cannot find $per_page_values. only #$perpagevalues in /admin/include/search.php, but it has no affect on prod per page list

PhilJ 03-08-2012 12:43 PM

Re: Products Per Page dropdown - How to customise?
 
Quote:

has this changed in 4.4.5?
No, it's there :)


All times are GMT -8. The time now is 05:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.