Prev and Next product
1.0.0
2.1.2
LeorLindel
data['text_select'] = $this->language->get('text_select');
]]>
model_catalog_product->getProduct($product_id+1);
$rsLast = $this->model_catalog_product->getProduct($product_id-1);
if($rsNext):
$this->data['next_url'] = $this->url->link('product/product', 'product_id=' . $rsNext['product_id']);
$this->data['next_text']= $rsNext['name']." >>";
else:
$this->data['next_url'] = '';
$this->data['next_text']= '';
endif;
if($rsLast):
$this->data['prev_url'] = $this->url->link('product/product', 'product_id=' . $rsLast['product_id']);
$this->data['prev_text']= "<< ".$rsLast['name'];
else:
$this->data['prev_url'] = '';
$this->data['prev_text']= null;
endif;
]]>
]]>
]]>