Hi guys,
I have a class ‘Get_Orders_Into_Database_Cron.php’ and inside a have a lots of functions.
But, in one function I want to insert orders into the database table, and have standard OXID code:
$oDb = oxDb::getDb();
But, when I am trying to execute the class via terminal and then set-up as a cron:
php Get_Orders_Into_Database_Cron.php I am getting following error:
Fatal error: Class ‘oxDb’ not found in /home/shop-name/Get_Orders_Into_Database_Cron.php on line 158
I tried with following line at the top of the script:
require_once ZMB_DIR_ROOT . ‘/lib/autoload.php’;
Any help how to load OXID classes in the file or extend them and then to be able to execute the class via terminal.
Thank you!