* @copyright 2021 DIGITAL RETAIL TECHNOLOGIES SL * @license https://opensource.org/licenses/MIT The MIT License * * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ require_once dirname(__FILE__) . '/../../bootstrap.php'; class RetailcrmCatalogController extends RetailcrmAdminPostAbstractController { protected function postHandler() { if (!Tools::getIsset('generate') && !Tools::getIsset('updateUrl')) { throw new Exception('Invalid request data'); } $jobName = (Tools::getIsset('generate') ? RetailcrmIcmlEvent::class : RetailcrmIcmlUpdateUrlEvent::class); $result = RetailcrmJobManager::execManualJob($jobName); return [ 'success' => true, 'result' => $result, ]; } protected function getHandler() { return [ 'success' => true, 'catalog' => RetailcrmSettingsHelper::getCatalogInfo(), ]; } }