How to correctly change the joomshopping order status with a cron script?
I tried this:
\JModelLegacy::addIncludePath(JPATH_BASE.'/components/com_jshopping/models');
$model = \JSFactory::getModel('checkout', 'jshop');
$model->changeStatusOrder($order_id, $order_status, 1);
The model can be obtained, but errors are thrown when the changeStatusOrder method is called.
I also tried to use the Joomla CLI functionality
having previously launched the application like this:
$instance = \JApplicationCli:: getInstance('TestCron');
\JFactory::$application = $instance;
$instance->execute();
However, you still cannot change the order status
Is there anyone here who has encountered a similar problem? Help!