1, EsiConf::FLD_TAG => 'wishlist', EsiConf::FLD_PURGE_CONTROLLERS => 'iqitwishlistactionsModuleFrontController', EsiConf::FLD_ASVAR => 1, ); $this->esiConf = new EsiConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData); $this->registerEsiModule(); $this->addJsDef('iqitwishlist:nbProducts', $this); return true; } protected function JSKeyProcess($jskey) { $funcname = 'getWishlistProductsNb'; $classname = 'IqitWishlistProduct'; if ($jskey != 'iqitwishlist:nbProducts' || !method_exists($classname, $funcname)) { //something wrong, should not happen LSLog::log(__FUNCTION__ . ' unexpected ' . $jskey, LSLog::LEVEL_EXCEPTION); return ''; } $data = (int) $classname::$funcname((int) Context::getContext()->customer->id); return json_encode($data); } } LscIqitWishlist::register();