Jump to content
Sign in to follow this  
rkoechel2004

Fixed paging in categories can someone help with manufacturers

Recommended Posts

I found this post on a different SEO thread and it works perfectly to fix the paging problem with category pages, can someone help me adapt it for manufacturer pages?

 

QUOTE(yeahyeahyeah @ Aug 2 2005, 02:41 PM)

is there a way to incorporate ?page= into the URL when paginating a category's products?

 

if this has already been addressed and i missed it, can someone point out where?

 

thanks!

 

 

 

 

i jury rigged a fix. i'm thinking this can be done in the seo class, but i did it in includes/classes/split_page_results.php

if the other class is a better way, any help working this is appreciated.

 

i replaced

var $sql_query, $number_of_rows, $current_page_number, $number_of_pages, $number_of_rows_per_page, $page_name;

 

 

with

 

var $sql_query, $number_of_rows, $current_page_number, $number_of_pages, $number_of_rows_per_page, $page_name, $dummy;

 

 

then

 

if (isset($HTTP_GET_VARS[$page_holder])) {
       $page = $HTTP_GET_VARS[$page_holder];
     } elseif (isset($HTTP_POST_VARS[$page_holder])) {
       $page = $HTTP_POST_VARS[$page_holder];
     } else {
       $page = '';
     }

 

with

 

preg_match("/(-c-).*\.html/",$_SERVER['REQUEST_URI'],$this->dummy); 
    if($this->dummy[1]!=NULL) {//yeahyeahyeah. if we're on a category page do this
     preg_match("/-pp-(\d*)\.html/",$_SERVER['REQUEST_URI'],$matches);
     $page = $matches[1];
    }
    else {//any other page with splits
     if (isset($HTTP_GET_VARS[$page_holder])) {
       $page = $HTTP_GET_VARS[$page_holder];
     } elseif (isset($HTTP_POST_VARS[$page_holder])) {
       $page = $HTTP_POST_VARS[$page_holder];
     } else {
       $page = '';
     }
    }

then

 

return $display_links_string;

 

with

 

if($this->dummy[1]!=NULL)//yeahyeahyeah. if we're on a category page do this
     $display_links_string=preg_replace("/(-pp-\d*)?\.html\?page=(\d*)/","-pp-$2.html",$display_links_string);//attempt to rewrite using regex
    return $display_links_string;

 

 

category page pagination will now look like baby-burp-cloths-ribbon-only-c-21_37-pp-2.html

 

instead of baby-burp-cloths-ribbon-only-c-21_37.html?page=2


rkoechel2004

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×