* @copyright 2007-2012 PrestaShop SA * @version Release: $Revision$ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * @since 1.5.0 */ class MailalertsAccountModuleFrontController extends ModuleFrontController { public function init() { parent::init(); require_once($this->module->getLocalPath().'MailAlert.php'); } public function initContent() { parent::initContent(); if (!Context::getContext()->customer->isLogged()) Tools::redirect('index.php?controller=auth&redirect=account&module=mailalerts&fc=module'); if (Context::getContext()->customer->id) { $this->context->smarty->assign('id_customer', Context::getContext()->customer->id); $this->context->smarty->assign('mailAlerts', MailAlert::getMailAlerts((int)Context::getContext()->customer->id, (int)Context::getContext()->language->id)); $this->setTemplate('mailalerts-account.tpl'); } } }