* @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_CAN_LOAD_FILES_')) exit; class Blockcontact extends Module { public function __construct() { $this->name = 'blockcontact'; $this->tab = 'front_office_features'; $this->version = '1.0'; parent::__construct(); $this->displayName = $this->l('Contact Block'); $this->description = $this->l('Allows you to add additional information about your store\'s customer service.'); } public function install() { return parent::install() && Configuration::updateValue('blockcontact_telnumber', '') && Configuration::updateValue('blockcontact_email', '') && $this->registerHook('displayRightColumn') && $this->registerHook('displayHeader'); } public function uninstall() { // Delete configuration return Configuration::deleteByName('blockcontact_telnumber') && Configuration::deleteByName('blockcontact_email') && parent::uninstall(); } public function getContent() { $html = ''; // If we try to update the settings if (Tools::isSubmit('submitModule')) { Configuration::updateValue('blockcontact_telnumber', Tools::getValue('telnumber')); Configuration::updateValue('blockcontact_email', Tools::getValue('email')); $this->_clearCache('blockcontact.tpl'); $html .= '