file = $file; $this->module = $module; $this->context = Context::getContext(); $this->_path = $path; } public function run() { $id_product = (int)Tools::getValue('id_product'); // Looks for a simulator associate with product $simulatorCode = $this->context->smarty->getVariable('simulatorCode'); if (!empty($simulatorCode)) { return $this->module->display($this->file, 'productbloc/'.$simulatorCode.'.tpl'); } // Fallback return $this->module->display($this->file, 'displayProductBloc.tpl'); } }