<?xml version="1.0" encoding="utf-8"?>
<modification>
    <id>Prev Next Product</id>
    <version>1.0.0</version>
    <vqmver>2.5.1</vqmver>
    <author>OpenCartBoost</author>
	<email>support@opencartboost.com</email>
	<website>opencartboost.com</website>

	<file name="catalog/controller/product/product.php">
		<operation>
			<search position="after"><![CDATA[$data['heading_title'] = $product_info['name'];]]></search>
			<add><![CDATA[
			$data['text_prev'] = $this->language->get('text_prev');
			$data['text_next'] = $this->language->get('text_next');
			
			$data['next_prod'] = $next_prod = $this->model_catalog_product->getProduct($product_id+1);
			$data['prev_prod'] = $prev_prod = $this->model_catalog_product->getProduct($product_id-1);

			if($next_prod) {
				$data['next_product_url'] = $this->url->link('product/product', 'product_id=' .  $next_prod['product_id']);
				$data['next_product_name']= $next_prod['name'];
			} 

			if($prev_prod) {
				$data['prev_product_url'] = $this->url->link('product/product', 'product_id=' .  $prev_prod['product_id']);
				$data['prev_product_name']= $prev_prod['name'];
			} 
			]]></add>
		</operation>
	</file>
	
	<file name="catalog/language/*/product/product.php">
		<operation>
			<search position="after"><![CDATA[<?]]></search>
			<add><![CDATA[
			$_['text_prev']        = 'Previous';
			$_['text_next']        = 'Next';
			]]></add>
		</operation>
	</file>

	<file name="catalog/view/theme/*/template/product/product.tpl">
		<operation>
			<search position="before"><![CDATA[<h1><?php echo $heading_title; ?></h1>]]></search>
			<add><![CDATA[
			<div class="btn-group pull-right" >
			<?php if($prev_prod) { ?>
			  <button type="button" onclick="location.href='<?php echo $prev_product_url; ?>'" data-toggle="tooltip" class="btn btn-default" title="<?php echo $prev_product_name; ?>"><?php echo $text_prev; ?></button>
			<?php } ?>
			<?php if($next_prod) { ?>
			  <button type="button" onclick="location.href='<?php echo $next_product_url; ?>'" data-toggle="tooltip" class="btn btn-default" title="<?php echo $next_product_name; ?>"><?php echo $text_next; ?></button>
			  <?php } ?>
			</div>
			]]></add>
		</operation>
	</file>
	
</modification>