Skip to content

Commit

Permalink
https://github.com/opencart/opencart/issues/2266
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed Nov 14, 2014
1 parent 42c0efc commit 88471d1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 41 deletions.
10 changes: 0 additions & 10 deletions upload/catalog/controller/product/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,6 @@ public function index() {

$data['pagination'] = $pagination->render();

$this->document->addLink($this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page=' . $pagination->page), 'canonical');

if ($pagination->limit && ceil($pagination->total / $pagination->limit) > $pagination->page) {
$this->document->addLink($this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page=' . ($pagination->page + 1)), 'next');
}

if ($pagination->page > 1) {
$this->document->addLink($this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page=' . ($pagination->page - 1)), 'prev');
}

$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));

$data['sort'] = $sort;
Expand Down
10 changes: 0 additions & 10 deletions upload/catalog/controller/product/manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,6 @@ public function info() {

$data['pagination'] = $pagination->render();

$this->document->addLink($this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page=' . $pagination->page), 'canonical');

if ($pagination->limit && ceil($pagination->total / $pagination->limit) > $pagination->page) {
$this->document->addLink($this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page=' . ($pagination->page + 1)), 'next');
}

if ($pagination->page > 1) {
$this->document->addLink($this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page=' . ($pagination->page - 1)), 'prev');
}

$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));

$data['sort'] = $sort;
Expand Down
10 changes: 0 additions & 10 deletions upload/catalog/controller/product/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,6 @@ public function index() {

$data['pagination'] = $pagination->render();

$this->document->addLink($this->url->link('product/search', $url . '&page=' . $pagination->page), 'canonical');

if ($pagination->limit && ceil($pagination->total / $pagination->limit) > $pagination->page) {
$this->document->addLink($this->url->link('product/search', $url . '&page=' . ($pagination->page + 1)), 'next');
}

if ($pagination->page > 1) {
$this->document->addLink($this->url->link('product/search', $url . '&page=' . ($pagination->page - 1)), 'prev');
}

$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));
}

Expand Down
13 changes: 2 additions & 11 deletions upload/catalog/controller/product/special.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function index() {
$data['button_list'] = $this->language->get('button_list');
$data['button_grid'] = $this->language->get('button_grid');
$data['button_continue'] = $this->language->get('button_continue');
$data['continue'] = $this->language->get('continue');

$data['compare'] = $this->url->link('product/compare');

Expand Down Expand Up @@ -253,22 +252,14 @@ public function index() {

$data['pagination'] = $pagination->render();

$this->document->addLink($this->url->link('product/special', $url . '&page=' . $pagination->page), 'canonical');

if ($pagination->limit && ceil($pagination->total / $pagination->limit) > $pagination->page) {
$this->document->addLink($this->url->link('product/special', $url . '&page=' . ($pagination->page + 1)), 'next');
}

if ($pagination->page > 1) {
$this->document->addLink($this->url->link('product/special', $url . '&page=' . ($pagination->page - 1)), 'prev');
}

$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));

$data['sort'] = $sort;
$data['order'] = $order;
$data['limit'] = $limit;

$data['continue'] = $this->url->link('common/home');

$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
Expand Down

0 comments on commit 88471d1

Please sign in to comment.