summaryrefslogtreecommitdiff
path: root/views/mods/mod_abo/index.phtml
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2020-11-17 12:53:35 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2020-11-17 12:53:35 +0000
commit754a5c89e217a89f3ffa652f35e680f1bfb63375 (patch)
treee22d12cade51f7ddde7de9c1ec1299ccbbc3580c /views/mods/mod_abo/index.phtml
parent6cfdc4f806651c18ab97a742eae41eca11cfa176 (diff)
- K
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7809 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_abo/index.phtml')
-rw-r--r--views/mods/mod_abo/index.phtml83
1 files changed, 50 insertions, 33 deletions
diff --git a/views/mods/mod_abo/index.phtml b/views/mods/mod_abo/index.phtml
index aaf9cb3..d188f46 100644
--- a/views/mods/mod_abo/index.phtml
+++ b/views/mods/mod_abo/index.phtml
@@ -1,8 +1,9 @@
<?php
-/**
- * Template für die Übersicht der Abonnements
-*/
+ /**
+ * Template für die Übersicht der Abonnements
+ */
+
?>
<div class="wpsg_order" id="wpsg-bs">
@@ -133,7 +134,12 @@
</tr>
</thead>
<tbody>
- <?php foreach ($this->view['arData'] as $oAbo) { $oOrder = $oAbo->getOrder(); ?>
+ <?php foreach ($this->view['arData'] as $oAbo) {
+
+ $oOrder = $oAbo->getOrder();
+ $oOrderProduct = $oAbo->getOrderProduct();
+
+ ?>
<tr>
<td class="col_checkbox">
@@ -154,7 +160,7 @@
|
<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie dieses Abonnement löschen möchten?', 'wpsg'); ?>');" title="<?php echo __('Dieses Abonnement löschen', 'wpsg'); ?>" href="<?php
- echo wpsg_admin_url('Order', 'delete', ['edit_id' => $oOrder->id], ['abo' => '1', 'noheader' => '1']);
+ echo wpsg_admin_url('Abo', 'delete', ['abo_id' => $oAbo->id], ['noheader' => '1']);
?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
@@ -213,19 +219,21 @@
</td>
<td class="col_products">
- <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
-
- <?php foreach ($oOrderProducts as $oOrderProduct) { ?>
-
- <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> für je #4#', 'wpsg'),
- $oOrderProduct->getCount(),
+ <?php if ($oOrderProduct === false) { ?>
+
+ <?php echo __('Produkt nicht gefunden.', 'wpsg'); ?>
+
+ <?php } else { ?>
+
+ <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> für je #4#', 'wpsg'),
+ $oOrderProduct->getCount(),
wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()),
- $oOrderProduct->getProductName(),
- wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
- ); ?>
+ $oOrderProduct->getProductName(),
+ wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
+ ); ?>
+
+ <?php } ?>
- <?php } ?>
-
</td>
<td class="col_sum">
<?php echo wpsg_ff($oOrder->getAmount(), $this->get_option('wpsg_currency')); ?>
@@ -233,23 +241,32 @@
<?php /* Laufzeitspalte */ ?>
<td class="col_time">
- <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
-
- <?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
-
- <?php if ($abo_expiration > time()) { ?>
-
- <span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
-
- <?php } else { ?>
-
- <span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
-
- <?php } ?>
-
- <br />
-
- <?php } ?>
+
+ <?php if ($oOrderProduct === false) { ?>
+
+ <?php echo __('Produkt nicht gefunden.', 'wpsg'); ?>
+
+ <?php } else { ?>
+
+ <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
+
+ <?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
+
+ <?php if ($abo_expiration > time()) { ?>
+
+ <span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+
+ <?php } else { ?>
+
+ <span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+
+ <?php } ?>
+
+ <br />
+
+ <?php } ?>
+
+ <?php } ?>
</td>