Projekt

Allgemein

Profil

GX-Bug #55026 » GambioHubInvoicePackingslipExtender.inc.php

Moritz Bunjes, 02.02.2018 18:57

 
1
<?php
2
/* --------------------------------------------------------------
3
   GambioHubInvoicePackingslipExtender.inc.php 2018-02-02
4
   http://www.gambio.de
5
   Copyright (c) 2018 Gambio GmbH
6
   Released under the GNU General Public License (Version 2)
7
   [http://www.gnu.org/licenses/gpl-2.0.html]
8
   --------------------------------------------------------------
9
*/
10

    
11
/**
12
 * Class GambioHubInvoicePackingslipExtender
13
 */
14
class GambioHubInvoicePackingslipExtender extends GambioHubInvoicePackingslipExtender_parent
15
{
16
	/**
17
	 * @param array $order_info
18
	 *
19
	 * @return array
20
	 */
21
	public function extendOrderInfo($order_info)
22
	{
23
		$order_info = parent::extendOrderInfo($order_info);
24
		
25
		if(!empty($order_info['PAYMENT_METHOD'][0]))
26
		{
27
			$query  = 'SELECT `gambio_hub_module_title` 
28
					FROM `orders` 
29
					WHERE 
30
						`orders_id` = ' . (int)$this->v_data_array['order_id'] . ' AND 
31
						`payment_class` = "gambio_hub"';
32
			$result = xtc_db_query($query);
33
			
34
			if(xtc_db_num_rows($result))
35
			{
36
				$order_info['PAYMENT_METHOD'][1] = xtc_db_fetch_array($result)['gambio_hub_module_title'];
37
			}
38
			
39
			return $order_info;
40
		}
41
	}
42
}
    (1-1/1)