From 141750106d23b13633fad3e828e7565976762abd Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Tue, 19 Dec 2017 10:15:56 +0000 Subject: - AboModul Erweiterung - Optionaler Versand an Admin wenn Abo angehlaten werden soll - Protokoll - Frontendfunktionen / Darstellung der Abos git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6834 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/css/frontend.css | 13 +++ views/mods/mod_abo/mail_admin_stoprenewal.phtml | 14 +++ .../mods/mod_abo/mail_admin_stoprenewal_html.phtml | 16 ++++ views/mods/mod_abo/order_view.phtml | 26 +++--- views/mods/mod_abo/page_abo.phtml | 104 +++++++++++++++++++++ views/mods/mod_abo/settings_edit.phtml | 10 +- views/mods/mod_kundenverwaltung/abo.phtml | 57 ----------- views/order/index.phtml | 57 ++++++----- 8 files changed, 197 insertions(+), 100 deletions(-) create mode 100644 views/mods/mod_abo/mail_admin_stoprenewal.phtml create mode 100644 views/mods/mod_abo/mail_admin_stoprenewal_html.phtml create mode 100644 views/mods/mod_abo/page_abo.phtml delete mode 100644 views/mods/mod_kundenverwaltung/abo.phtml (limited to 'views') diff --git a/views/css/frontend.css b/views/css/frontend.css index cd7ad5f..f4f68a8 100644 --- a/views/css/frontend.css +++ b/views/css/frontend.css @@ -183,6 +183,19 @@ input.wpsg_error { border-color:red !important; } .invalid { padding-left:22px; line-height:24px; color:#ec3f41; } .valid { padding-left:22px; line-height:24px; color:#3a7d34; } +/* Modul "Abo Produkte" */ +.wpsg_mod_abo_order_product_wrap { } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product { border-bottom:1px solid #EEEEEE; padding-bottom:15px; margin-bottom:15px; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap { display:inline-block; margin-left:10px; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap:before { content:'['; margin-right:5px; display:inline-block; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap:after { content:']'; margin-left:5px; display:inline-block; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .status_activ { color:green; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .status_inactiv { color:red; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .value { margin-left:10px; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .duration_running { color:green; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .duration_expired { color:red; } +.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .image { float:left; margin-right:15px; } + /* Produktattribute */ .wpsg_cell_produktattribute_value { text-align:right; } .wpsg_mod_produktattribute_label { display:inline-block; min-width:120px; } diff --git a/views/mods/mod_abo/mail_admin_stoprenewal.phtml b/views/mods/mod_abo/mail_admin_stoprenewal.phtml new file mode 100644 index 0000000..9bb7825 --- /dev/null +++ b/views/mods/mod_abo/mail_admin_stoprenewal.phtml @@ -0,0 +1,14 @@ + + +view['oCustomer']->getFirstname().$this->view['oCustomer']->getName()), $this->view['oProduct']->getProductName()); ?> + +#1#', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['oOrder']->id); ?> +#1#', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id='.$this->view['oOrder']->id.'&product_key='.$this->view['product_key'].'&do=stop&noheader=1'); ?> + + \ No newline at end of file diff --git a/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml b/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml new file mode 100644 index 0000000..e30f72b --- /dev/null +++ b/views/mods/mod_abo/mail_admin_stoprenewal_html.phtml @@ -0,0 +1,16 @@ + + +
+
+view['oCustomer']->getFirstname().$this->view['oCustomer']->getName()), $this->view['oProduct']->getProductName()); ?>
+
+#1#', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['oOrder']->id); ?>
+#1#', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id='.$this->view['oOrder']->id.'&product_key='.$this->view['product_key'].'&do=stop&noheader=1'); ?>
+
+ diff --git a/views/mods/mod_abo/order_view.phtml b/views/mods/mod_abo/order_view.phtml index 8ae8a65..29fc978 100644 --- a/views/mods/mod_abo/order_view.phtml +++ b/views/mods/mod_abo/order_view.phtml @@ -10,35 +10,31 @@ view['arOrderedAboProducts'] as $oOrderProduct) { ?> getProduct()->getProductName()); ?> - + + callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?> + + getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?> + - + callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?> - -  [  ] + +  [  ] - + -  [  ] +  [  ] - - 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'))); ?> - - - - view['data']['cdate']); ?> - - - + \ No newline at end of file diff --git a/views/mods/mod_abo/page_abo.phtml b/views/mods/mod_abo/page_abo.phtml new file mode 100644 index 0000000..1646cff --- /dev/null +++ b/views/mods/mod_abo/page_abo.phtml @@ -0,0 +1,104 @@ + + +
+ + writeFrontendMessage(); ?> + + view['arOrder'])) { ?> + +
+ view['arOrder'] as $oOrder) { ?> + + callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { $aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); ?> + +
+ +

+ getProduct()->getProductName(), $oOrder->getNr()); ?> +

+ + imagehandler->getAttachmentID($oOrderProduct->getProductKey()); ?> + + +
+ +
+ + +
+ +
+ + + + cdate)); ?> + + +
+
+ getProduct()->wpsg_mod_abo_durration); ?> + getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency')); ?> +
+
+ + + + callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?> + + time()) { ?> + + + + + + +
+
+ + + + + + + + + + + + + + get_option('wpsg_mod_abo_autoexpire_customer'), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?> + + + + + + + + + + +
+
+ +
+ +
+ + + + +
+ + + +

+ + +
\ No newline at end of file diff --git a/views/mods/mod_abo/settings_edit.phtml b/views/mods/mod_abo/settings_edit.phtml index bd57d0e..8b88bfb 100644 --- a/views/mods/mod_abo/settings_edit.phtml +++ b/views/mods/mod_abo/settings_edit.phtml @@ -16,8 +16,8 @@
_('Mail versenden', 'wpsg'), - wpsg_mod_abo::EXPIRE_AUTO => _('Automatisch verlängern', 'wpsg') + wpsg_mod_abo::EXPIRE_MAIL => __('Mail versenden', 'wpsg'), + wpsg_mod_abo::EXPIRE_AUTO => __('Automatisch verlängern', 'wpsg') ), $this->get_option('wpsg_mod_abo_expiremode'), array('help' => 'wpsg_mod_abo_expiremode')); ?>
@@ -32,9 +32,9 @@ get_option('wpsg_mod_abo_autoexpire_customermail')); ?> get_option('wpsg_mod_abo_autoexpire_adminmail')); ?> _('Nichts', 'wpsg'), - wpsg_mod_abo::CUSTOMER_AUTO_DIRECT => _('Verlängerung direkt stoppen', 'wpsg'), - wpsg_mod_abo::CUSTOMER_AUTO_MAIL => _('Verlängerung über Mail an Administrator stoppen', 'wpsg') + wpsg_mod_abo::CUSTOMER_AUTO_NOTHING => __('Nichts', 'wpsg'), + wpsg_mod_abo::CUSTOMER_AUTO_DIRECT => __('Verlängerung direkt stoppen', 'wpsg'), + wpsg_mod_abo::CUSTOMER_AUTO_MAIL => __('Verlängerung über Mail an Administrator stoppen', 'wpsg') ), $this->get_option('wpsg_mod_abo_autoexpire_customer'), array()); ?>
diff --git a/views/mods/mod_kundenverwaltung/abo.phtml b/views/mods/mod_kundenverwaltung/abo.phtml deleted file mode 100644 index 483d46d..0000000 --- a/views/mods/mod_kundenverwaltung/abo.phtml +++ /dev/null @@ -1,57 +0,0 @@ -view['arOrder']); - -?> - -
- - writeFrontendMessage(); ?> - - view['arOrder'])) { ?> - view['arOrder'] as $order) { ?> - -
- -
- - - getProduct()->getProductName()); ?> - - - - - callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?> - - - - - -  [  ] - - - - - -  [  ] - - - - - - - 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'))); ?> - -
- -
- - - -

- -
\ No newline at end of file diff --git a/views/order/index.phtml b/views/order/index.phtml index 7c8f463..aca2971 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -171,22 +171,10 @@ hasMod('wpsg_mod_abo')) { ?> - - callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?> - - callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id))); ?> - - - time()) { ?> - - - - - - - - callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?> + callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 1) { ?> + + callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?> - getOrderProducts(); - foreach ($oOrderProducts as $oOrderProduct) { ?> - #3# für je #4#', 'wpsg'), - $oOrderProduct->getCount(), - WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), - $oOrderProduct->getProductName(), - wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency')) - ); ?>
+ getOrderProducts(); ?> + + + + #3# für je #4#', 'wpsg'), + $oOrderProduct->getCount(), + WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), + $oOrderProduct->getProductName(), + wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency')) + ); ?>
+ + hasMod('wpsg_mod_abo')) { ?> + + callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?> + + callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?> + + + + time()) { ?> + + + + + +
+ + + + + -- cgit v1.2.3