Redirect CMS Category to CMS Page [Prestashop]

<?php

class CmsController extends CmsControllerCore
{

public function initContent()
	{
		
CmsControllerCore::initContent();
		if(isset($this->context->controller->cms_category->id)) {
		 if($this->context->controller->cms_category->id == 17)
			Tools::redirect('index.php?id_cms=138&controller=cms');
			
		 if($this->context->controller->cms_category->id == 16)
			Tools::redirect('index.php?id_cms=137&controller=cms');
		}
	}

}

 

Get browser properties without browscap in php

There are several methods to get browser properties. php get_browser function is very useful as it return many browser properties.but In for get_browser to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system. Continue reading “Get browser properties without browscap in php”