controller->php_self = 'search'; $doofinder = Module::getInstanceByName('doofinder'); $check_api_key = Tools::getValue('check_api_key'); if ($check_api_key) { die($doofinder->checkApiKey(true)); } $autoinstaller = Tools::getValue('autoinstaller'); $shop_id = Tools::getValue('shop_id', NULL); if ($autoinstaller) { if (Tools::getValue('token') == Tools::encrypt('doofinder-ajax')) { $doofinder->autoinstaller($shop_id ); die('OK'); } else { $msgError = 'Forbidden access.' . ' Token for autoinstaller invalid.'; die($msgError); } } if ($doofinder->canAjax()) { echo $doofinder->ajaxCall(); }