ajax = 1; if (Configuration::get('OMNIBUSEUFREE_CRON_STATUS', null, null, null, 2) == 1 && Tools::getIsset('token') && Tools::getIsset('type')) { if (Configuration::get('OMNIBUSEUFREE_CRON_TOKEN') == Tools::getValue('token')) { $type = (int) Tools::getValue('type'); if ($type == 1) { $Omnibus = new OmnibusEuFree; $InsertDataCounter = $Omnibus->insertAllProductsToOmnibusTable(); PrestaShopLogger::addLog('[CRON] Omnibus Directive module by presta.studio - Updated price history. Number of products checked: ' . $InsertDataCounter); echo 'Inserted records: ' . $InsertDataCounter; } if ($type == 2) { $Omnibus = new OmnibusEuFree; $OldDataCounter = $Omnibus->removeOldDataFromOmnibusTable(); PrestaShopLogger::addLog('[CRON] Omnibus Directive module by presta.studio - Deleted old data. Number of records deleted in database: ' . $OldDataCounter); echo 'Deleted old records: ' . $OldDataCounter; } } } } }