6833 |
thomas |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Übersichtsseite der Abonnements im Frontend
|
|
|
5 |
*/
|
6834 |
daniel |
6 |
|
6833 |
thomas |
7 |
?>
|
|
|
8 |
|
|
|
9 |
<div class="wpsg_mod_kundenverwaltung_abo wpsg">
|
|
|
10 |
|
|
|
11 |
<?php echo $this->writeFrontendMessage(); ?>
|
|
|
12 |
|
|
|
13 |
<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
|
|
|
14 |
|
6834 |
daniel |
15 |
<div class="wpsg_mod_abo_order_product_wrap">
|
|
|
16 |
<?php foreach ($this->view['arOrder'] as $oOrder) { ?>
|
|
|
17 |
|
|
|
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())); ?>
|
6833 |
thomas |
19 |
|
6834 |
daniel |
20 |
<div class="wpsg_mod_abo_order_product">
|
6833 |
thomas |
21 |
|
6834 |
daniel |
22 |
<h1 class="entry-title title">
|
|
|
23 |
<?php echo wpsg_translate(__('Abo "#1#" aus Bestellung #2#', 'wpsg'), $oOrderProduct->getProduct()->getProductName(), $oOrder->getNr()); ?>
|
|
|
24 |
</h1>
|
|
|
25 |
|
|
|
26 |
<?php $nAttachmentID = $this->imagehandler->getAttachmentID($oOrderProduct->getProductKey()); ?>
|
|
|
27 |
|
|
|
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 } ?>
|
6833 |
thomas |
33 |
|
6834 |
daniel |
34 |
<div class="content">
|
|
|
35 |
|
|
|
36 |
<div class="start">
|
6838 |
thomas |
37 |
<span class="label"><?php echo __('Erstkauf (Startzeitpunkt):', 'wpsg'); ?></span>
|
6834 |
daniel |
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">
|
6838 |
thomas |
49 |
<span class="label"><?php echo __('Laufzeit (Endzeitpunkt):', 'wpsg'); ?></span>
|
6834 |
daniel |
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 |
|
6836 |
thomas |
70 |
<?php if (strtotime($aboStatus['mail_admin_stop']) > 0) { ?>
|
6834 |
daniel |
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))) { ?>
|
|
|
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 |
|
|
|
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>
|
6833 |
thomas |
93 |
|
6834 |
daniel |
94 |
<?php } // foreach OrderProducts ?>
|
|
|
95 |
|
|
|
96 |
<?php } // foreach Order ?>
|
|
|
97 |
</div>
|
6833 |
thomas |
98 |
|
|
|
99 |
<?php } else { ?>
|
6834 |
daniel |
100 |
|
|
|
101 |
<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
|
|
|
102 |
|
6833 |
thomas |
103 |
<?php } ?>
|
|
|
104 |
</div>
|