How to correctly change the joomshopping order status with a cron script?

01.12.2021 23:39
#1
suwariwaza
Joomshopping forum user no avatar
Name: suwariwaza
07.06.2012
Posts: 3
Quote
How to correctly change the joomshopping order status with a cron script?

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!

 
02.12.2021 07:49
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25938
Quote
Aw: How to correctly change the joomshopping order status with a cron script?

-The model can be obtained, but errors are thrown when the changeStatusOrder method is called.
Errors?

 
02.12.2021 10:59
#3
suwariwaza
Joomshopping forum user no avatar
Name: suwariwaza
07.06.2012
Posts: 3
Quote
Aw: How to correctly change the joomshopping order status with a cron script?

for example
PHP Notice: Undefined index: HTTP_HOST in /libraries/src/Uri/Uri.php on line 101

 
02.12.2021 11:37
#4
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25938
Quote
Aw: How to correctly change the joomshopping order status with a cron script?

Function Change status not works for CLI

create JoomShopping controller cron
And create
cron
wget http://www.example.com/.......

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.