Subversion Repositories wpShopGermany4

Rev

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

Rev 6833 Rev 6834
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
	/**
3
	/**
4
	 * Template für die Übersichtsseite der Abonnements im Frontend
4
	 * Template für die Übersichtsseite der Abonnements im Frontend
5
	 */
5
	 */
6
 
6
 
7
	//wpsg_debug($this->view['arOrder']);
-
 
8
 
-
 
9
?>
7
?>
10
 
8
 
11
<div class="wpsg_mod_kundenverwaltung_abo wpsg">
9
<div class="wpsg_mod_kundenverwaltung_abo wpsg">
12
 
10
 
13
	<?php echo $this->writeFrontendMessage(); ?>
11
	<?php echo $this->writeFrontendMessage(); ?>
14
	
12
	
15
	<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
13
	<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
16
		<?php foreach ($this->view['arOrder'] as $order) { ?>
-
 
17
		
14
		
18
		<div class="wpsg_box">
15
		<div class="wpsg_mod_abo_order_product_wrap">
19
			
-
 
20
			<div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
16
		<?php foreach ($this->view['arOrder'] as $oOrder) { ?>
21
			
17
		
22
			<?php /* Abo-Name */ ?>
-
 
23
			<?php echo ($oOrderProduct->getProduct()->getProductName()); ?>
18
			<?php foreach ($this->callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { $aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); ?>
24
			
-
 
25
			<?php /* Abo-Preis */ ?>
-
 
26
			
19
			
27
			<?php /* Anhalten des Abos */ ?>
-
 
28
			<?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
-
 
29
    
-
 
30
            <?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
-
 
31
        
-
 
32
                <?php echo __('Aktiv', 'wpsg'); ?>
-
 
33
 
-
 
34
                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Anhalten'); ?></a>&nbsp;]
20
				<div class="wpsg_mod_abo_order_product">
35
        
-
 
36
            <?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
-
 
37
        
-
 
38
                <?php echo __('Angehalten', 'wpsg'); ?>
-
 
39
 
21
 
-
 
22
					<h1 class="entry-title title">
40
                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Fortsetzen'); ?></a>&nbsp;]
23
						<?php echo wpsg_translate(__('Abo "#1#" aus Bestellung #2#', 'wpsg'), $oOrderProduct->getProduct()->getProductName(), $oOrder->getNr()); ?>
-
 
24
					</h1>
41
        
25
					
42
            <?php } ?>
26
					<?php $nAttachmentID = $this->imagehandler->getAttachmentID($oOrderProduct->getProductKey()); ?>
43
    
27
					
44
        	<?php echo wpsg_drawForm_TextEnd(__('Verlängerung')); ?>
28
					<?php if (wpsg_isSizedInt($nAttachmentID)) { ?>
-
 
29
						<div class="image">
-
 
30
							<?php echo wp_get_attachment_image($nAttachmentID, array(100, 100), false, array()); ?>
-
 
31
						</div>
-
 
32
					<?php } ?>
45
			
33
			
-
 
34
					<div class="content">
-
 
35
					
-
 
36
						<div class="start">
-
 
37
							<span class="label"><?php echo __('Erstkauf:', 'wpsg'); ?></span>
-
 
38
							<span class="value">
-
 
39
								
-
 
40
								<?php echo wpsg_formatTimestamp(strtotime($oOrder->cdate)); ?>
-
 
41
								
-
 
42
							</span>
-
 
43
						</div>
-
 
44
						<div class="price">
-
 
45
							<span class="label"><?php echo wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration); ?></span>
-
 
46
							<span class="value"><?php echo wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency')); ?></span>
-
 
47
						</div>
-
 
48
						<div class="duration">
-
 
49
							<span class="label"><?php echo __('Laufzeit:', 'wpsg'); ?></span>
-
 
50
							<span class="value">
-
 
51
								
-
 
52
								<?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?>
-
 
53
								
-
 
54
								<?php if (strtotime($exp) > time()) { ?>
-
 
55
									<span class="duration_running"><?php echo $exp; ?></span>
-
 
56
								<?php } else { ?>
-
 
57
									<span class="duration_expired"><?php echo $exp; ?></span>
-
 
58
								<?php }  ?>
-
 
59
								
-
 
60
							</span>
-
 
61
						</div>					
-
 
62
						<div class="status">
-
 
63
							<span class="label"><?php echo __('Verlängerung:', 'wpsg'); ?></span>
-
 
64
							<span class="value">
-
 
65
													
-
 
66
								<?php if ($aboStatus['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
-
 
67
									
-
 
68
									<span class="status_activ"><?php echo __('Aktiv'); ?></span>
-
 
69
									
-
 
70
									<?php if (strtotime($aboStatus['mail_admin_stop'])) { ?>
-
 
71
	
-
 
72
										<?php echo __('Kündigung ausstehend', 'wpsg'); ?>
-
 
73
										
-
 
74
									<?php } else { ?>
-
 
75
									
-
 
76
										<?php if (in_array($this->get_option('wpsg_mod_abo_autoexpire_customer'), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?>
46
			<?php /* Ablaufzeitpunkt */ ?>		
77
										<span class="link_wrap"><a href="<?php echo $this->getUrl(wpsg_ShopController::URL_ABO, 'wpsg_mod_abo', 'stoprenewal', Array('order_id' => $oOrder->id, 'product_key' => $oOrderProduct->getProductKey())); ?>"><?php echo __('Deaktivieren'); ?></a></span>
-
 
78
										<?php } ?>
-
 
79
							
-
 
80
									<?php } ?>
-
 
81
									
47
			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id']))); echo wpsg_drawForm_Text(__('Abo läuft bis'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>				
82
								<?php } else if ($aboStatus['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
-
 
83
									<span class="status_inactiv"><?php echo __('Inaktiv') ?></span>
-
 
84
								<?php } ?> 
-
 
85
								
-
 
86
							</span>
-
 
87
						</div>
-
 
88
					</div>
-
 
89
					
-
 
90
					<div class="wpsg_clear"></div>
-
 
91
					
-
 
92
				</div>
48
				
93
				
49
			</div>
94
			<?php } // foreach OrderProducts ?>
50
		
95
							
-
 
96
		<?php } // foreach Order ?>
51
		</div>
97
		</div>
52
				
98
		
53
		<?php } ?>
-
 
54
	<?php } else { ?>
99
	<?php } else { ?>
-
 
100
	
55
	<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
101
		<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
-
 
102
		
56
	<?php } ?>
103
	<?php } ?>
57
</div>
104
</div>
58
105