Subversion Repositories wpShopGermany4

Rev

Rev 7486 | Rev 7787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7486 Rev 7490
Line 17... Line 17...
17
	$arCalculation = $oCalculation->getCalculationArray();
17
	$arCalculation = $oCalculation->getCalculationArray();
18
	$voucher = [
18
	$voucher = [
19
		'code' => '',
19
		'code' => '',
20
		'id' => 0,
20
		'id' => 0,
21
		'set' => 0,
21
		'set' => 0,
22
		'type' => 'voucher'
22
		'type' => 'voucher',
23
	];
23
	];
24
	
24
	
-
 
25
	//wpsg_debug(array_merge($arCalculation['voucher'], $arCalculation['coupon']));
-
 
26
	//wpsg_Debug($_REQUEST);
-
 
27
	
25
	// Voucher suchen
28
	// Voucher suchen
26
	foreach (array_merge($arCalculation['voucher'], $arCalculation['coupon']) as $v) {
29
	foreach (array_merge($arCalculation['voucher'], $arCalculation['coupon']) as $v) {
27
		
30
		
28
		if ($v['order_voucher_id'] == $_REQUEST['order_voucher_id']) {
31
		if ($v['order_voucher_id'] == $_REQUEST['order_voucher_id']) {
-
 
32
		
-
 
33
			$order_voucher_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER_VOUCHER."` WHERE `id` = '".wpsg_q($_REQUEST['order_voucher_id'])."' ");
29
			
34
			
30
			$voucher = $v;
35
			$voucher = $v;
31
			
36
			
-
 
37
			//if ($order_voucher_db['coupon'] === '1') $voucher['type'] = 'coupon';
-
 
38
						
32
		}
39
		}
33
		
40
		
34
	}
41
	}
35
	  
42
	  
36
	$strVal = ((isset($voucher['set']))?$voucher['set']:0); 
43
	$strVal = ((isset($voucher['set']))?$voucher['set']:0); 
37
	
44
	
38
	if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(wpsg_tf($strVal), '%');
45
	if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(abs(wpsg_tf($strVal)), '%');
39
	else $strVal = wpsg_ff(wpsg_tf($strVal), $this->get_option('wpsg_currency'));
46
	else $strVal = wpsg_ff(abs(wpsg_tf($strVal)), $this->get_option('wpsg_currency'));
40
 	
47
 	
41
?>
48
?>
42
 
49
 
43
<form id="wpsg_be_voucher_form">
50
<form id="wpsg_be_voucher_form">
44
	
51
	
Line 72... Line 79...
72
 
79
 
73
				jQuery('#be_voucher_code').val(ui.item.code);
80
				jQuery('#be_voucher_code').val(ui.item.code);
74
				jQuery('#be_voucher_id').val(ui.item.id);				
81
				jQuery('#be_voucher_id').val(ui.item.id);				
75
				jQuery('#be_voucher_amount').val(ui.item.gs_value);
82
				jQuery('#be_voucher_amount').val(ui.item.gs_value);
76
				
83
				
-
 
84
				if (ui.item.coupon === '1') jQuery('#be_voucher_coupon').prop('checked', true);
-
 
85
				else jQuery('#be_voucher_coupon').prop('checked', false);
-
 
86
				
77
				jQuery('#be_voucher_search').val('');
87
				jQuery('#be_voucher_search').val('');
78
				
88
				
79
				return false;
89
				return false;
80
 
90
 
81
			}
91
			}