PrestaShop/PrestaShop — pull request #1869 by FlYos (2014-06-05 15:26:34+00:00)
Title: [+] Project  : Add override module php code for current theme

# override module PHP code

Allow overrrided prestashop module php in `themes/[YOURTHEME]/modules/[THEMODULE]/[THEMODULE].php`

## Usage

Create the same filename of the original module into your theme directory

`themes/my_theme/modules/blocksearch/blocksearch.php`

Declare you class and extend the mother with added Module suffix

```php
registerHook('displayLeftColumn'))
return false;
return true;
}

public function hookLeftColumn($params)
{
if (!$this->isCached('blocksearch.tpl', $this->getCacheId()))
{
$this->calculHookCommon($params);
$this->smarty->assign('blocksearch_type', 'block');
}
return $this->display(__FILE__, 'blocksearch.tpl', $this->getCacheId());
}
}
```

For more information : http://www.webaki.com/blog/override-module-8.html (in french)