<?php
/**
* ---------------------------------------------------------------------------------
*
* This file is part of the 'giftonordermodule' module feature (main || related module)
* Developped for Prestashop platform.
* You are not allowed to use it on several site
* You are not allowed to redistribute this module
* This header must not be removed
*
* @category  giftonordermodule
* @author    OleaCorner <contact@oleacorner.com> <www.oleacorner.com>
* @copyright OleaCorner
* @version   4.3
* @license   XXX
*         
* ---------------------------------------------------------------------------------
*/
class ProductController extends ProductControllerCore
{
	/*
    * module: giftonordermodule
    * date: 2017-02-24 15:46:17
    * version: 5.0.7
    */
    public function init()
	{
		
		$id_product = (int)Tools::getValue('id_product');
		if ($id_product && Product::idIsOnCategoryId($id_product, 
				array(array('id_category'=>Configuration::get('OLEA_GIFTONORDER_GIFT_CATEGORY')))))
			Tools::redirect($this->context->link->getModuleLink('giftonordermodule', 'allgifts'));		
		
			
		parent::init ();
	}
		
}
