1, EsiConf::FLD_TAG => 'compare', EsiConf::FLD_PURGE_CONTROLLERS => 'iqitcompareactionsModuleFrontController', EsiConf::FLD_ASVAR => 1, ); $this->esiConf = new LiteSpeedCacheEsiModConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData); $this->registerEsiModule(); $this->addJsDef('iqitcompare:nbProducts', $this); return true; } protected function JSKeyProcess($jskey) { if ($jskey != 'iqitcompare:nbProducts') { //something wrong, should not happen LSLog::log(__FUNCTION__ . ' unexpected key ' . $jskey, LSLog::LEVEL_EXCEPTION); return ''; } $data = (int) Context::getContext()->cookie->iqitCompareNb; return json_encode($data); } } LscIqitCompare::register();