Subversion Repositories wpShopGermany4

Rev

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

Rev 7811 Rev 7812
Line 10... Line 10...
10
       
10
       
11
<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) {
11
<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) {
12
 
12
 
13
	try {
13
	try {
14
    
14
    
15
		$oAbo = wpsg_abo::getFromOrderAndProduct($view['oOrder']->getId(), $oOrderProduct->getId());
15
		$oAbo = wpsg_abo::getFromOrderAndOrderProduct($view['oOrder']->getId(), $oOrderProduct->getId());
16
		
16
		
17
		?>
17
		?>
18
	
18
	
19
		<?php echo wpsg_drawForm_AdminboxStart(
19
		<?php echo wpsg_drawForm_AdminboxStart(
20
			'<a href="'.wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()).'">'.
20
			'<a href="'.wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()).'">'.
21
			$oOrderProduct->getProduct()->getProductName().
21
			$oOrderProduct->getProduct()->getProductName().
22
			'</a>'
22
			'</a>'
23
		); ?>
23
		); ?>
24
	
24
	
25
			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
25
			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getId()))); ?>
26
			<?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?>
26
			<?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration_'.$oOrderProduct->getProductIndex(), Array('class_content_wrap' => 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?>
27
		
27
		
28
			<script>
28
			<script>
29
	
29
	
30
				moment.locale('de');
30
				moment.locale('de');
31
				
31
				
32
				jQuery('#wpsg_mod_abo_duration').editable({
32
				jQuery('#wpsg_mod_abo_duration_<?php echo $oOrderProduct->getProductIndex(); ?>').editable({
33
					type: 'combodate',
33
					type: 'combodate',
34
					display: function(value) {
34
					display: function(value) {
35
						
35
						
36
						jQuery(this).html(value.format('DD.MM.YYYY HH:mm:ss'));
36
						jQuery(this).html(value.format('DD.MM.YYYY HH:mm:ss'));
37
						
37
						
Line 40... Line 40...
40
						
40
						
41
						jQuery.ajax({
41
						jQuery.ajax({
42
							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
42
							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
43
							data: {
43
							data: {
44
								field: 'duration',
44
								field: 'duration',
45
								product_key: '<?php echo $oOrderProduct->getProductKey(); ?>',
45
								order_product_id: '<?php echo $oOrderProduct->getId(); ?>',
46
								order_id: '<?php echo $view['oOrder']->getId() ?>',
46
								order_id: '<?php echo $view['oOrder']->getId() ?>',
47
								date: newValue.format()
47
								date: newValue.format()
48
							},
48
							},
49
							success: function(response) {
49
							success: function(response) {
50
	 
50
 
51
								jQuery('.wpsg_abo_state').attr("class", "col-sm-6 wpsg_abo_state_class_" + response.state)
51
                                jQuery('#wpsg_mod_abo_duration_<?php echo $oOrderProduct->getProductIndex(); ?>').parent().parent().attr("class", "col-sm-6 wpsg_abo_state_class_" + response.state)
52
															
52
															
53
							}
53
							}
54
						})
54
						})
55
						
55
						
56
					},
56
					},
Line 67... Line 67...
67
			</script>
67
			</script>
68
	
68
	
69
			<?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
69
			<?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
70
			<?php
70
			<?php
71
		
71
		
72
				$strURL = $this->callMod('wpsg_mod_abo', 'getRebuyLink', [$view['oOrder']->getId(), $oOrderProduct->getProductKey()]);
72
				$strURL = $this->callMod('wpsg_mod_abo', 'getRebuyLink', [$view['oOrder']->getId(), $oOrderProduct->getId()]);
73
				$strURL = '<a href="'.$strURL.'">'.$strURL.'</a>';
73
				$strURL = '<a href="'.$strURL.'">'.$strURL.'</a>';
74
		
74
		
75
				echo wpsg_drawForm_Text(__('URL für den Kauf einer Verlängerung', 'wpsg'), $strURL); 
75
				echo wpsg_drawForm_Text(__('URL für den Kauf einer Verlängerung', 'wpsg'), $strURL); 
76
				
76
				
77
			?>
77
			?>
78
		
78
		
79
			<?php echo wpsg_drawForm_TextStart(); ?>
79
			<?php echo wpsg_drawForm_TextStart(); ?>
80
			
80
			
81
				<?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
81
				<?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getId())); ?>
82
		
82
		
83
				<?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
83
				<?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
84
			
84
			
85
					<?php echo __('Aktiv', 'wpsg'); ?>
85
					<?php echo __('Aktiv', 'wpsg'); ?>
86
			
86