Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Products Per Page dropdown - How to customise?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-21-2011, 08:14 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

Default 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
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #2  
Old 01-21-2011, 08:26 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,195
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
carpeperdiem (11-18-2011)
  #3  
Old 01-21-2011, 12:26 PM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

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

Nice one Steve ... found it in include/search.php

Thanks a lot
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #4  
Old 06-29-2011, 12:06 PM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default 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.
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
  #5  
Old 10-25-2011, 11:50 AM
 
nickff nickff is offline
 

Senior Member
  
Join Date: Aug 2010
Posts: 132
 

Default 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...
__________________
nick hoag
looking forward to the future
http://thefutureforward.com
xcart versions 4.2.x, 4.3.x, 4.4.x
Reply With Quote
  #6  
Old 02-22-2012, 09:19 AM
  joshf's Avatar 
joshf joshf is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 97
 

Default 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!
__________________
joshf | X-Cart Portfolio
Currently: http://nightowlpapergoods.com | http://pinkolive.com
Reply With Quote

The following 3 users thank joshf for this useful post:
am2003 (03-08-2012), PhilJ (02-22-2012), Stizerg (09-18-2014)
  #7  
Old 03-08-2012, 12:39 PM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default 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
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
  #8  
Old 03-08-2012, 12:43 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

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

Quote:
has this changed in 4.4.5?
No, it's there
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:13 AM.

   

 
X-Cart forums © 2001-2020