roykin/erp/oneorderUpdate.php
2017-06-14 11:41:31 +02:00

34 lines
1.0 KiB
PHP
Executable File

<?php
// remove this die if you wanna use that script :p
die();
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
require_once dirname(__FILE__).'/../config/config.inc.php';
require_once dirname(__FILE__).'/../modules/erporder/erporder.php';
if (!defined(ERP_ENABLED) || !ERP_ENABLED) {
die();
}
// $model = ripcord::client(ERP_URL.'/xmlrpc/2/object');
// $report = ripcord::client(ERP_URL.'/xmlrpc/2/report');
// $common = ripcord::client(ERP_URL.'/xmlrpc/2/common');
// $common->version();
// $uid = $common->authenticate(ERP_DB, ERP_USERNAME, ERP_PASSWORD, array());
// $tmp = new newOrder($model, $uid);
// $tmp->exec_workflow(16900);
$params['id_order'] = 3777;
$params['newOrderStatus'] = new StdClass();
$params['newOrderStatus']->id = 2;
//Db::getInstance()->execute('DELETE FROM ps_orders_erp WHERE id_order = '.$params['id_order']);
$order = new Order($params['id_order']);
$erpOrder = new Erporder();
$erpOrder->hookActionOrderStatusPostUpdate($params);