Dziękuje za podpowiedz. Znalazłem tą tabelę już wczseniej , ale modyfikacja tam pozycji ze statusem nic nie zmienia, dlatego sądze , ze dodatkowo należy to zmienić - albo gdzie indziej albo w inny sposob.
znalzłem w orderHistory.php czesc odpowiedzialna za zmiany i nadawanie statusów ale nie wiem co one zmieniaja jako obiekty
$this->id_order_state = (int)$new_order_state;
// changes invoice number of order ?
if (!Validate::isLoadedObject($new_os) || !Validate::isLoadedObject($order))
die(Tools::displayError('Invalid new order state'));
// the order is valid if and only if the invoice is available and the order is not cancelled
$order->current_state = $this->id_order_state;
$order->valid = $new_os->logable;
$order->update();
if ($new_os->invoice && !$order->invoice_number)
$order->setInvoice($use_existing_payment);
// set orders as paid
if ($new_os->paid == 1)
{
$invoices = $order->getInvoicesCollection();
if ($order->total_paid != 0)
$payment_method = Module::getInstanceByName($order->module);
foreach ($invoices as $invoice)
{
$rest_paid = $invoice->getRestPaid();
if ($rest_paid > 0)
{
$payment = new OrderPayment();
$payment->order_reference = $order->reference;
$payment->id_currency = $order->id_currency;
$payment->amount = $rest_paid;
if ($order->total_paid != 0)
$payment->payment_method = $payment_method->displayName;
else
$payment->payment_method = null;
// Update total_paid_real value for backward compatibility reasons
if ($payment->id_currency == $order->id_currency)
$order->total_paid_real += $payment->amount;
else
$order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2);
$order->save();
$payment->conversion_rate = 1;
$payment->save();
Db::getInstance()->execute('
INSERT INTO `'._DB_PREFIX_.'order_invoice_payment`
VALUES('.(int)$invoice->id.', '.(int)$payment->id.', '.(int)$order->id.')');
}
}
}