Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fixed paging in categories can someone help with manufacturers


rkoechel2004

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...