Merge branch 'ticket-15155-paypal-order-display' into develop
This commit is contained in:
commit
69500d338e
@ -1324,6 +1324,7 @@ class AdminOrders extends AdminTab
|
||||
<div style="background:#efefef;padding:10px;">
|
||||
'.$deviceHtml.'
|
||||
<p style="margin-bottom:0px;"><span class="anticon anticon-credit-card"></span> '.Tools::substr($order->payment, 0, 32).' '.($order->module ? '('.$order->module.')' : '').'</p>
|
||||
'.Order::getPaymentInfos($order).'
|
||||
<p><span class="anticon anticon-cart"></span> <a href="?tab=AdminCarts&id_cart='.$cart->id.'&viewcart&token='.Tools::getAdminToken('AdminCarts'.(int)(Tab::getIdFromClassName('AdminCarts')).(int)($cookie->id_employee)).'">'.$this->l('Cart #').sprintf('%06d', $cart->id).'</a></p>
|
||||
<p style="margin-bottom:0px;"><span class="anticon anticon-'.($order->recyclable ? 'checkmark text-green-light' : 'cross text-rose').'"></span> '.$this->l('Recycled package').'</p>
|
||||
<p><span class="anticon anticon-gift '.($order->gift ? 'text-green-light' : 'text-rose').'"></span> '.(!empty($order->gift_message) ? ' <a role="button" data-toggle="collapse" href="#collapseGiftMessage">'.$this->l('Gift wrapping').'</a>':$this->l('Gift wrapping')).'</p>
|
||||
|
@ -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 .= '<p style="margin-bottom:0px;">ID TRANS. : '.
|
||||
$infos['id_transaction'].' (<a href="'.$paypal_base_url. $infos['id_transaction'].'" target="_blank"><span class="anticon anticon-link"></span></a>)'.
|
||||
'</p>';
|
||||
}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 .= '<p style="margin-bottom:0px;">ID : '.
|
||||
$infos['num_transaction'].' - '.$infos['paiement'].
|
||||
'</p>';
|
||||
}
|
||||
return $returned_string;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user