Community Forums

Problem with pagination

General support for technical problems with OpenCart v1.x

Problem with pagination

Postby ebudowanie » Tue Oct 26, 2010 7:46 am

Good morning,

i have a problem with pagination on my site:

http://www.e-budowanie.com/tynki?page=2

I have opencart version 1.4.9.1

this link doesn't work.

content my htaccess file:
Code: Select all
Options +FollowSymlinks

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L]
RewriteRule ^robots.txt$ $0 [L]


i don't have idea, what do this problem

I'm counting on your help.

thank you in advance
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby ebudowanie » Sun Oct 31, 2010 5:45 pm

anyone have any idea ?
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby ebudowanie » Thu Dec 09, 2010 12:14 pm

somebody help me...
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby JAY6390 » Thu Dec 09, 2010 12:43 pm

Please post the /catalog/controller/product/category.php file if this is the category page, or manufacturer.php if this is the manufacturer page
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4634
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: Problem with pagination

Postby ebudowanie » Thu Dec 09, 2010 12:57 pm

this is a code of category.php

Code: Select all
<?php
class ControllerProductCategory extends Controller { 
   public function index() {
      $this->language->load('product/category');
   
      $this->document->breadcrumbs = array();

         $this->document->breadcrumbs[] = array(
            'href'      => HTTP_SERVER . 'index.php?route=common/home',
             'text'      => $this->language->get('text_home'),
             'separator' => FALSE
         );   

      $this->load->model('catalog/category');
      $this->load->model('tool/seo_url'); 
      
      if (isset($this->request->get['path'])) {
         $path = '';
      
         $parts = explode('_', $this->request->get['path']);
      
         foreach ($parts as $path_id) {
            $category_info = $this->model_catalog_category->getCategory($path_id);
            
            if ($category_info) {
               if (!$path) {
                  $path = $path_id;
               } else {
                  $path .= '_' . $path_id;
               }

                   $this->document->breadcrumbs[] = array(
                      'href'      => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $path),
                      'text'      => $category_info['name'],
                    'separator' => $this->language->get('text_separator')
                 );
            }
         }      
      
         $category_id = array_pop($parts);
      } else {
         $category_id = 0;
      }
      
      $category_info = $this->model_catalog_category->getCategory($category_id);
   
      if ($category_info) {
           $this->document->title = $category_info['name'];
         
         $this->document->keywords = $category_info['meta_keywords'];
         
         $this->document->description = $category_info['meta_description'];
         
         $this->data['heading_title'] = $category_info['name'];
         
         $this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
         
         $this->data['text_sort'] = $this->language->get('text_sort');
         
         $this->load->model('tool/image');
         
         if ($category_info['image']) {
            $image = $category_info['image'];
         } else {
            $image = '';
         }

         $this->data['thumb'] = $this->model_tool_image->resize($image, $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
         
         if (isset($this->request->get['page'])) {
            $page = $this->request->get['page'];
         } else {
            $page = 1;
         }   
         
         if (isset($this->request->get['sort'])) {
            $sort = $this->request->get['sort'];
         } else {
            $sort = 'p.sort_order';
         }

         if (isset($this->request->get['order'])) {
            $order = $this->request->get['order'];
         } else {
            $order = 'ASC';
         }

         $url = '';
         
         if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
         }   

         if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
         }
         
         $this->load->model('catalog/product'); 
                  
         $category_total = $this->model_catalog_category->getTotalCategoriesByCategoryId($category_id);
         $product_total = $this->model_catalog_product->getTotalProductsByCategoryId($category_id);
         
         if ($category_total || $product_total) {
              $this->data['categories'] = array();
              
            $results = $this->model_catalog_category->getCategories($category_id);
            
              foreach ($results as $result) {
               if ($result['image']) {
                  $image = $result['image'];
               } else {
                  $image = 'no_image.jpg';
               }
               
               $this->data['categories'][] = array(
                     'name'  => $result['name'],
                     'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
                     'thumb' => $this->model_tool_image->resize($image, $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
                   );
              }
      
            $this->load->model('catalog/review');
            
            $this->data['button_add_to_cart'] = $this->language->get('button_add_to_cart');
            
            $this->data['products'] = array();
              
            $results = $this->model_catalog_product->getProductsByCategoryId($category_id, $sort, $order, ($page - 1) * $this->config->get('config_catalog_limit'), $this->config->get('config_catalog_limit'));
            
              foreach ($results as $result) {
               if ($result['image']) {
                  $image = $result['image'];
               } else {
                  $image = 'no_image.jpg';
               }
               
               if ($this->config->get('config_review')) {
                  $rating = $this->model_catalog_review->getAverageRating($result['product_id']);   
               } else {
                  $rating = false;
               }
                
               $special = FALSE;
               
               $discount = $this->model_catalog_product->getProductDiscount($result['product_id']);
                
               if ($discount) {
                  $price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
               } else {
                  $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
               
                  $special = $this->model_catalog_product->getProductSpecial($result['product_id']);
               
                  if ($special) {
                     $special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
                  }               
               }
         
               $options = $this->model_catalog_product->getProductOptions($result['product_id']);
               
               if ($options) {
                  $add = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']);
               } else {
                  $add = HTTPS_SERVER . 'index.php?route=checkout/cart&product_id=' . $result['product_id'];
               }
               
               $this->data['products'][] = array(
                     'name'    => $result['name'],
                  'model'   => $result['model'],
                     'rating'  => $rating,
                  'stars'   => sprintf($this->language->get('text_stars'), $rating),
                  'thumb'   => $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
                     'price'   => $price,
                     'options' => $options,
                  'special' => $special,
                  'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']),
                  'add'     => $add
                   );
              }

            if (!$this->config->get('config_customer_price')) {
               $this->data['display_price'] = TRUE;
            } elseif ($this->customer->isLogged()) {
               $this->data['display_price'] = TRUE;
            } else {
               $this->data['display_price'] = FALSE;
            }
      
            $url = '';
      
            if (isset($this->request->get['page'])) {
               $url .= '&page=' . $this->request->get['page'];
            }         
      
            $this->data['sorts'] = array();
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_default'),
               'value' => 'p.sort_order-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_name_asc'),
               'value' => 'pd.name-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC')
            );
 
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_name_desc'),
               'value' => 'pd.name-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC')
            );

            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_price_asc'),
               'value' => 'p.price-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=p.price&order=ASC')
            );

            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_price_desc'),
               'value' => 'p.price-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=p.price&order=DESC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_rating_desc'),
               'value' => 'rating-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=rating&order=DESC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_rating_asc'),
               'value' => 'rating-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=rating&order=ASC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_model_asc'),
               'value' => 'p.model-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=p.model&order=ASC')
            );
 
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_model_desc'),
               'value' => 'p.model-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . '&sort=p.model&order=DESC')
            );
            
            $url = '';
      
            if (isset($this->request->get['sort'])) {
               $url .= '&sort=' . $this->request->get['sort'];
            }   

            if (isset($this->request->get['order'])) {
               $url .= '&order=' . $this->request->get['order'];
            }
         
            $pagination = new Pagination();
            $pagination->total = $product_total;
            $pagination->page = $page;
            $pagination->limit = $this->config->get('config_catalog_limit');
            $pagination->text = $this->language->get('text_pagination');
            $pagination->url = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . $url . '&page={page}');
         
            $this->data['pagination'] = $pagination->render();
         
            $this->data['sort'] = $sort;
            $this->data['order'] = $order;
         
            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
               $this->template = $this->config->get('config_template') . '/template/product/category.tpl';
            } else {
               $this->template = 'default/template/product/category.tpl';
            }   
            
            $this->children = array(
               'common/column_right',
               'common/column_left',
               'common/footer',
               'common/header'
            );
      
            $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));                              
            } else {
              $this->document->title = $category_info['name'];
            
            $this->document->description = $category_info['meta_description'];
            
              $this->data['heading_title'] = $category_info['name'];

              $this->data['text_error'] = $this->language->get('text_empty');

              $this->data['button_continue'] = $this->language->get('button_continue');

              $this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
      
            $this->data['categories'] = array();
            
            $this->data['products'] = array();
                  
            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
               $this->template = $this->config->get('config_template') . '/template/product/category.tpl';
            } else {
               $this->template = 'default/template/product/category.tpl';
            }   
            
            $this->children = array(
               'common/column_right',
               'common/column_left',
               'common/footer',
               'common/header'
            );
      
            $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
            }
       } else {
         $url = '';
         
         if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
         }   

         if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
         }
            
         if (isset($this->request->get['page'])) {
            $url .= '&page=' . $this->request->get['page'];
         }   
         
         if (isset($this->request->get['path'])) {   
                $this->document->breadcrumbs[] = array(
                   'href'      => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $this->request->get['path'] . $url),
                   'text'      => $this->language->get('text_error'),
                 'separator' => $this->language->get('text_separator')
              );
         }
            
         $this->document->title = $this->language->get('text_error');

            $this->data['heading_title'] = $this->language->get('text_error');

            $this->data['text_error'] = $this->language->get('text_error');

            $this->data['button_continue'] = $this->language->get('button_continue');

            $this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
         
         if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
         } else {
            $this->template = 'default/template/error/not_found.tpl';
         }   
         
         $this->children = array(
            'common/column_right',
            'common/column_left',
            'common/footer',
            'common/header'
         );
      
         $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
      }
     }
}
?>
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby ebudowanie » Thu Dec 09, 2010 12:57 pm

this is a code of manufacturer.php

Code: Select all
<?php
class ControllerProductManufacturer extends Controller { 
   public function index() {
      $this->language->load('product/manufacturer');

      $this->load->model('catalog/manufacturer');
      $this->load->model('catalog/product');
      $this->load->model('tool/seo_url');
      $this->load->model('tool/image');
      
      $this->document->breadcrumbs = array();
      
         $this->document->breadcrumbs[] = array(
           'href'      => HTTP_SERVER . 'index.php?route=common/home',
           'text'      => $this->language->get('text_home'),
           'separator' => FALSE
         );

      if (isset($this->request->get['manufacturer_id'])) {
         $manufacturer_id = $this->request->get['manufacturer_id'];
      } else {
         $manufacturer_id = 0;
      }
      
      $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
   
      if ($manufacturer_info) {
            $this->document->breadcrumbs[] = array(
              'href'      => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id']),
              'text'      => $manufacturer_info['name'],
              'separator' => $this->language->get('text_separator')
            );
                       
         $this->document->title = $manufacturer_info['name'];
                           
         $this->data['heading_title'] = $manufacturer_info['name'];

         $this->data['text_sort'] = $this->language->get('text_sort');
      
         $product_total = $this->model_catalog_product->getTotalProductsByManufacturerId($this->request->get['manufacturer_id']);
         
         if ($product_total) {
            if (isset($this->request->get['page'])) {
               $page = $this->request->get['page'];
            } else {
               $page = 1;
            }            

            if (isset($this->request->get['sort'])) {
               $sort = $this->request->get['sort'];
            } else {
               $sort = 'p.sort_order';
            }

            if (isset($this->request->get['order'])) {
               $order = $this->request->get['order'];
            } else {
               $order = 'ASC';
            }
         
            $this->load->model('catalog/review');
            
            $this->data['button_add_to_cart'] = $this->language->get('button_add_to_cart');
            
            $this->data['products'] = array();
              
            $results = $this->model_catalog_product->getProductsByManufacturerId($this->request->get['manufacturer_id'], $sort, $order, ($page - 1) * $this->config->get('config_catalog_limit'), $this->config->get('config_catalog_limit'));
            
              foreach ($results as $result) {
               if ($result['image']) {
                  $image = $result['image'];
               } else {
                  $image = 'no_image.jpg';
               }
               
               if ($this->config->get('config_review')) {
                  $rating = $this->model_catalog_review->getAverageRating($result['product_id']);   
               } else {
                  $rating = false;
               }
               
               $special = FALSE;
               
               $discount = $this->model_catalog_product->getProductDiscount($result['product_id']);
                
               if ($discount) {
                  $price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
               } else {
                  $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
               
                  $special = $this->model_catalog_product->getProductSpecial($result['product_id']);
               
                  if ($special) {
                     $special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
                  }                  
               }
               
               $options = $this->model_catalog_product->getProductOptions($result['product_id']);
               
               if ($options) {
                  $add = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']);
               } else {
                  $add = HTTPS_SERVER . 'index.php?route=checkout/cart&product_id=' . $result['product_id'];
               }
               
                   $this->data['products'][] = array(
                     'name'    => $result['name'],
                  'model'   => $result['model'],
                  'rating'  => $rating,
                  'stars'   => sprintf($this->language->get('text_stars'), $rating),                     
                  'thumb'   => $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
                     'price'   => $price,
                     'options' => $options,
                  'special' => $special,
                  'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&product_id=' . $result['product_id']),
                  'add'     => $add
                   );
              }
            
            if (!$this->config->get('config_customer_price')) {
               $this->data['display_price'] = TRUE;
            } elseif ($this->customer->isLogged()) {
               $this->data['display_price'] = TRUE;
            } else {
               $this->data['display_price'] = FALSE;
            }

            $url = '';
      
            if (isset($this->request->get['page'])) {
               $url .= '&page=' . $this->request->get['page'];
            }   
            
            $this->data['sorts'] = array();
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_default'),
               'value' => 'p.sort_order-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.sort_order&order=ASC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_name_asc'),
               'value' => 'pd.name-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=ASC')
            ); 
 
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_name_desc'),
               'value' => 'pd.name-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=DESC')
            ); 

            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_price_asc'),
               'value' => 'p.price-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=ASC')
            );

            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_price_desc'),
               'value' => 'p.price-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=DESC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_rating_desc'),
               'value' => 'rating-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=DESC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_rating_asc'),
               'value' => 'rating-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=ASC')
            );
            
            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_model_asc'),
               'value' => 'p.model-ASC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=ASC')
            );

            $this->data['sorts'][] = array(
               'text'  => $this->language->get('text_model_desc'),
               'value' => 'p.model-DESC',
               'href'  => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=DESC')
            );

            $url = '';
      
            if (isset($this->request->get['sort'])) {
               $url .= '&sort=' . $this->request->get['sort'];
            }   

            if (isset($this->request->get['order'])) {
               $url .= '&order=' . $this->request->get['order'];
            }
            
            $pagination = new Pagination();
            $pagination->total = $product_total;
            $pagination->page = $page;
            $pagination->limit = $this->config->get('config_catalog_limit');
            $pagination->text = $this->language->get('text_pagination');
            $pagination->url = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page={page}');
         
            $this->data['pagination'] = $pagination->render();

            $this->data['sort'] = $sort;
            $this->data['order'] = $order;
            
            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer.tpl')) {
               $this->template = $this->config->get('config_template') . '/template/product/manufacturer.tpl';
            } else {
               $this->template = 'default/template/product/manufacturer.tpl';
            }   
            
            $this->children = array(
               'common/column_right',
               'common/column_left',
               'common/footer',
               'common/header'
            );      
            
            $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));                              
            } else {
              $this->document->title = $manufacturer_info['name'];

              $this->data['heading_title'] = $manufacturer_info['name'];

              $this->data['text_error'] = $this->language->get('text_empty');

              $this->data['button_continue'] = $this->language->get('button_continue');

              $this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
      
            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
               $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
            } else {
               $this->template = 'default/template/error/not_found.tpl';
            }
            
            $this->children = array(
               'common/column_right',
               'common/column_left',
               'common/footer',
               'common/header'
            );      
            
            $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));               
            }
       } else {
         $url = '';
         
         if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
         }   

         if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
         }
            
         if (isset($this->request->get['page'])) {
            $url .= '&page=' . $this->request->get['page'];
         }   
         
            $this->document->breadcrumbs[] = array(
              'href'      => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $manufacturer_id . $url),
              'text'      => $this->language->get('text_error'),
              'separator' => $this->language->get('text_separator')
            );
               
         $this->document->title = $this->language->get('text_error');

            $this->data['heading_title'] = $this->language->get('text_error');

            $this->data['text_error'] = $this->language->get('text_error');

            $this->data['button_continue'] = $this->language->get('button_continue');

            $this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
              
         if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
         } else {
            $this->template = 'default/template/error/not_found.tpl';
         }
         
         $this->children = array(
            'common/column_right',
            'common/column_left',
            'common/footer',
            'common/header'
         );      
         
         $this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
      }
     }
}
?>
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby JAY6390 » Thu Dec 09, 2010 1:39 pm

Wow, this is actually a BUG due to the .htaccess file

Open the .htaccess file, and find the line
Code: Select all
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

Change it to
Code: Select all
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

This looks to be a bug on all versions!
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4634
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: Problem with pagination

Postby ebudowanie » Thu Dec 09, 2010 1:53 pm

thanks, it's working
ebudowanie
 
Posts: 17
Joined: Tue Oct 26, 2010 7:36 am

Re: Problem with pagination

Postby JAY6390 » Thu Dec 09, 2010 1:55 pm

No problem
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4634
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: Problem with pagination

Postby casperaustin » Sun Apr 07, 2013 7:39 pm

Hi there,

I'm having the same issue but, it works on my category page. It does not work on my search results.... Any ideas??

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


DOESNT WORK:
http://www.justicejewelers.com/index.ph ... old%20ring

WORKS:
http://www.justicejewelers.com/engagement
casperaustin
 
Posts: 11
Joined: Fri Aug 03, 2012 2:49 pm


Return to General Support

Who is online

Users browsing this forum: amatta, Danni2013, dirtboy, dtprojects, k23, kfroman, labeshops, opencartArab and 78 guests

Hosted by Arvixe Web Hosting