[+] CORE: OrderControler display the payment_cc detail for an order, transaction_id can be changed manually

This commit is contained in:
vSchoener
2011-10-25 13:46:37 +00:00
parent 5f09a4c526
commit e2890d6191
3 changed files with 52 additions and 9 deletions
+14 -1
View File
@@ -432,6 +432,19 @@ class AdminOrdersControllerCore extends AdminController
{
Message::markAsReaded($_GET['messageReaded'], $this->context->employee->id);
}
else if (Tools::isSubmit('setTransactionId') && ((int)Tools::getValue('id_order')))
{
$order = new Order((int)(Tools::getValue('id_order')));
$pcc = new PaymentCC((int)Tools::getValue('id_payment_cc'));
$pcc->id_order = $order->id;
$pcc->transaction_id = (string)Tools::getValue('transaction_id');
$pcc->id_currency = $order->id_currency;
$pcc->amount = $order->total_paid;
$pcc->save();
unset($order, $pcc);
}
parent::postProcess();
}
@@ -482,7 +495,7 @@ class AdminOrdersControllerCore extends AdminController
if (Validate::isLoadedObject($addressDelivery) AND $addressDelivery->id_state)
$deliveryState = new State((int)($addressDelivery->id_state));
}
// Smarty assign
$this->context->smarty->assign(array(
'order' => $order,