snubbr.com

Is this site safe? It is VeriSign Secured and offers paypal? Safe to buy from?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
First of all Is this site safe? It is VeriSign Secured and offers paypal? Safe to buy from? Many thanks for any comment. Second question.. Hi,.

Does anybody know how I can limit the number of pages that each category displays. For example, I have over 100 products in a given category but I only want to display 40 of them at any given time. I'm displaying 8 items per page and would like to only display 40 items total in any given category or six pages..

I tried to limit the SQL statement to the top 40 but that didn't work. Then, I thought there would be a way to set the number of pages a category can display..

Does anybody have a suggestion how I can make this work?.

Thank you,.

Mike..

Comments (19)

You betcha! however you might want to make sure and wait for someone else here to confirm it as I am not sure. Better yet, why don't you give a call to the Verisign guys because they can assist you better...

Comment #1

Hi bktrain,.

I've worked with that product to display the number of products per page..

Search Results: Number of products listed on the store product pages per page..

I'm trying to set the maximum number of pages per category. Any Ideas?.

Mike..

Comment #2

Maybe it is not so easy to limit the number of pages per category. Would it be easier setting the Limit in the SQL statement so only 40 products are show per category?.

Mike..

Comment #3

Has anyonve ever worked with the split_page-results.php in the classes folder to only display a fixed number of pages per category?.

This post has been edited by.

Netinsco.

: 10 February 2009, 21:39..

Comment #4

Okay Okay, I'm getting somewhere and I wanted to share it with the forum for later reference if someone want to do what I'm trying..

I have found I can hard code the number of rows I can get for any query in the splitPageResults Class which is in the split_page_results.php. So, I can now show a fixed number of products for ALL categories. for example 40 in every category or 5 pages..

$count_query = tep_db_query("select count("$count_string") as total "substr($this->sql_query, $pos_from, ($pos_to - $pos_from)));.

$count = tep_db_fetch_array($count_query);.

//$this->number_of_rows = $count['total']; //I COMMENTED THIS LINE OUT THEN.

$this->number_of_rows = 40; //ADDED THIS LINE.

Since I have Maximum Search results set at 8 and set the select count to 40 I display 5 pages in all categories..

Now all I need is to figure out how I can pass the category ID into the splitpageResuts class and function so I can control the number of rows I display in each category. Does anybody have an idea how I can pass the $cPath variable into the class and function?..

Comment #5

OKAY, I made it work and thought I'd share with you what I did..

I took the appoach to manage the number of pages per category. So in split_page_results.php I brought in a global variable $current_category_id on line 18..

Function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') {.

Global $HTTP_GET_VARS, $HTTP_POST_VARS, $current_category_id;.

Then I added a switch/case statement to set the number of items in the same file..

Switch ($current_category_id) {.

Case 21: //HANDBAGS.

$this->number_of_rows = 40;.

Break;.

Case 22: //WALLETS.

$this->number_of_rows = 16;.

Break;.

Case 31: //EARRINGS.

$this->number_of_rows = 24;.

Break;.

Case 34: //NECKLACES.

$this->number_of_rows = 32;.

Break;.

Case 32: //BRACELETS.

$this->number_of_rows = 8;.

Break;.

Case 24: //SHAWLS.

$this->number_of_rows = 32;.

Break;.

Case 25: //SCARVES.

$this->number_of_rows = 32;.

Break;.

Default:.

$this->number_of_rows = $count['total'];.

Break;.

}..

Comment #6

Hi,.

Does anybody know how I can limit the number of pages that each category displays. For example, I have over 100 products in a given category but I only want to display 40 of them at any given time. I'm displaying 8 items per page and would like to only display 40 items total in any given category or six pages..

I tried to limit the SQL statement to the top 40 but that didn't work. Then, I thought there would be a way to set the number of pages a category can display..

Does anybody have a suggestion how I can make this work?.

Thank you,.

Mike..

Comment #7

Go to your Admin>Configuration>Maximum Values. Try setting Search Results to what you want...

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.