Dear All, presta 1.7.6.5
I would like to change order status from external file located:
{Presta_Folder}/some_folder/someFile.php
/*File source*/
<?php
require('../config/config.inc.php');
$objOrder = new Order(1);
//order with id=1
$history = new OrderHistory();
$history->id_order = (int)$objOrder->id;
$history->changeIdOrderState(3, (int)($objOrder->id)); //order status=3
$history->addWithemail();
in general, the status change operation work, i mean
Status has new value, but no e-mail have been sent - instead of this server responds err:500
it seems there is problem to acces to Mail.php, but maybe i am wrong.
Have you any idea ?
Serwer Logs:
[Wed Dec 30 20:00:49 2020] [error] [client xxxx] request="GET / HTTP/1.1" pid=140466905475053 uid=3409069 gid=3409069
[Wed Dec 30 20:22:11 2020] [error] [client xxxxx] request="GET /Some_Folder/someFile.php?id_order=11 HTTP/1.1" pid=140466905431992 uid=3409069 gid=3409069
[Wed Dec 30 20:22:11 2020] [error] [client xxxx] PHP Fatal error: Uncaught Exception: Kernel Container is not available in
{Presta_Folder} /src/Adapter/ContainerFinder.php:77\nStack trace:\n#0
{Presta_Folder} /classes/Tools.php(796): PrestaShop\\PrestaShop\\Adapter\\ContainerFinder->getContainer()\n#1
{Presta_Folder} /classes/Tools.php(773): ToolsCore::getContextLocale(Object(Context))\n#2
{Presta_Folder} /classes/order/OrderHistory.php(513): ToolsCore::displayPrice(85.6, Object(Currency), false)\n#3
{Presta_Folder} /classes/order/OrderHistory.php(468): OrderHistoryCore->sendEmail(Object(Order), false)\n#4
{Presta_Folder} /Some_Folder/ExternalChangeOrderId.php(16): OrderHistoryCore->addWithemail(true)\n#5 {main}\n thrown in
{Presta_Folder} /src/Adapter/ContainerFinder.php on line 77