* @copyright 2012-2015 IXYCOM * @license You are just allowed to modify this copy for your own use. You must not redistribute it. License is permitted for one Prestashop instance only but you can install it on your test instances. */ class SiretProgramDefaultModuleFrontController extends ModuleFrontController { public $auth = true; public $ssl = true; public function initContent() { if (!Context::getContext()->customer->id) Tools::redirect(__PS_BASE_URI__); $this->context->controller->addCSS(_MODULE_DIR_.$this->module->name.'/views/css/style.css'); $sp = new SiretProgram(); $statut = $sp->getCustomerSIRET(Context::getContext()->customer->id); if ($statut) { $this->context->smarty->assign(array( 'ok' => $sp->l('SIRET enregistré.'), 'siret' => $statut['siret'], 'statut' => $statut['statut'])); } else { $this->context->smarty->assign(array( 'ok' => '', 'siret' => '', 'statut' => '')); } $this->context->smarty->assign(array( 'mode_manuel' => (int)Configuration::get('SIRET_MODE_MANUEL'), 'en_attente' => (int)Configuration::get('SIRET_ACCES_VALIDATION'), 'erreur' => '')); parent::initContent(); return $this->setTemplate('module:siretprogram/views/templates/front/siretprogram-program.tpl'); } public function getBreadcrumbLinks() { $breadcrumb = parent::getBreadcrumbLinks(); $breadcrumb['links'][] = $this->addMyAccountToBreadcrumb(); return $breadcrumb; } }