diff --git a/adm/tabs/AdminOrders.php b/adm/tabs/AdminOrders.php index 2d95c6dc..95fe52d3 100755 --- a/adm/tabs/AdminOrders.php +++ b/adm/tabs/AdminOrders.php @@ -1324,6 +1324,7 @@ class AdminOrders extends AdminTab
'.Tools::substr($order->payment, 0, 32).' '.($order->module ? '('.$order->module.')' : '').'
+ '.Order::getPaymentInfos($order).''.$this->l('Cart #').sprintf('%06d', $cart->id).'
'.$this->l('Recycled package').'
'.(!empty($order->gift_message) ? ' '.$this->l('Gift wrapping').'':$this->l('Gift wrapping')).'
diff --git a/override/classes/Order.php b/override/classes/Order.php index 3d854b67..6777e7d2 100644 --- a/override/classes/Order.php +++ b/override/classes/Order.php @@ -307,5 +307,34 @@ class Order extends OrderCore return $id_order_state?$id_order_state:false; } + public static function getPaymentInfos($order) + { + $returned_string = ''; + if(!Validate::isLoadedObject($order)){ + return ''; + } + if(strtolower($order->payment) === 'paypal'){ + $infos = Db::getInstance()->getRow(' + SELECT `id_transaction`, `payment_status`, `total_paid` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order`='.(int)$order->id + ); + $paypal_base_url = 'https://www.paypal.com/activity/payment/'; + $returned_string .= 'ID TRANS. : '. + $infos['id_transaction'].' ()'. + '
'; + }elseif(strtolower($order->payment) === 'paybox'){ + $infos = Db::getInstance()->getRow(' + SELECT `paiement`, `num_transaction` + FROM `'._DB_PREFIX_.'paybox_transaction` + where `id_cart` ='.(int)$order->id_cart + ); + $returned_string .= 'ID : '. + $infos['num_transaction'].' - '.$infos['paiement']. + '
'; + } + return $returned_string; + + } }