From d67a2847c17e077b641a316af40f13ffc71f37dc Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Mon, 18 Dec 2017 11:03:23 +0000 Subject: - AboModul Erweiterung - Start / Stop im Backend - Automatische Verlängerung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6830 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/admin/form/checkbox.phtml | 4 +++ views/css/admin.css | 6 ++++- views/mods/mod_abo/order_view.phtml | 44 ++++++++++++++++++++++++++++++ views/mods/mod_abo/settings_edit.phtml | 49 +++++++++++++++++++++++++++++++--- views/order/index.phtml | 26 +++++++++++++----- 5 files changed, 119 insertions(+), 10 deletions(-) create mode 100644 views/mods/mod_abo/order_view.phtml (limited to 'views') diff --git a/views/admin/form/checkbox.phtml b/views/admin/form/checkbox.phtml index 8a574f2..12e184a 100644 --- a/views/admin/form/checkbox.phtml +++ b/views/admin/form/checkbox.phtml @@ -36,6 +36,10 @@ + view['field_config']['hint'])) { ?> +
view['field_config']['hint']; ?>
+ + diff --git a/views/css/admin.css b/views/css/admin.css index e7d9fa1..f80cd80 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -217,7 +217,7 @@ table.wpsgitrecht_table { width:100%; } .wpsg_order .wpsg_status_link_wrap { min-height:50px; float:left; display:inline-block; } .wpsg_order .col_checkbox { width:20px; } .wpsg_order .col_checkbox input { margin-top:-2px; } -.wpsg_order .col_nr { width:200px; } +.wpsg_order .col_nr { width:250px; } .wpsg_order .col_nr .actions a { font-size:0.9em; } .wpsg_order .col_nr .glyphicon { margin-top:5px; font-size:1.2em; margin-right:5px; text-decoration:none; } .wpsg_order .col_nr .glyphicon.shippingadress { color:red; } @@ -257,6 +257,10 @@ table.wpsgitrecht_table { width:100%; } /* Formularanpassungen */ .form-checkbox label { font-size:12px; line-height:200%; } +/* Modul AboProdukte */ +.wpsg_mod_abo_expired { color:red; } +.wpsg_mod_abo_future_expire { color:green; } + /* Modul Produktbilder (wpsg_mod_produktbilder) */ #produktbilder_target img { } .wpsg_mod_produktbilder_admin_bild a { position:relative; display:inline-block; float:left; margin-right:5px; margin-bottom:5px; } diff --git a/views/mods/mod_abo/order_view.phtml b/views/mods/mod_abo/order_view.phtml new file mode 100644 index 0000000..8ae8a65 --- /dev/null +++ b/views/mods/mod_abo/order_view.phtml @@ -0,0 +1,44 @@ + + +view['arOrderedAboProducts'] as $oOrderProduct) { ?> + + 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'))); ?> + + + + view['data']['cdate']); ?> + + + + + + \ 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 8dcb052..bd57d0e 100644 --- a/views/mods/mod_abo/settings_edit.phtml +++ b/views/mods/mod_abo/settings_edit.phtml @@ -3,10 +3,53 @@ /** * Template für die Einstellungen des Abo Moduls */ - + + $arPaymentSelect = Array(); + foreach ($this->arPayment as $p) { $arPaymentSelect[$p['id']] = $p['name']; } + ?> get_option('wpsg_mod_abo_url'), array ('help' => 'wpsg_mod_abo_url')); ?>
get_option('wpsg_mod_abo_wpsgmodabofirstbuy'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Bezahlung der Abo Bestellung zusätzlich versendet. (mail_firstbuy.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabofirstbuy'), 'help' => 'wpsg_mod_abo_wpsgmodabofirstbuy',)); ?> -get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?> -get_option('wpsg_mod_abo_wpsgmodabrebuy'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Bezahlung einer Abo Verlängerung versendet. (mail_rebuy.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabrebuy'), 'help' => 'wpsg_mod_abo_wpsgmodabrebuy',)); ?> \ No newline at end of file +get_option('wpsg_mod_abo_wpsgmodabrebuy'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Bezahlung einer Abo Verlängerung versendet. (mail_rebuy.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabrebuy'), 'help' => 'wpsg_mod_abo_wpsgmodabrebuy',)); ?> + +
+ + _('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')); ?> + +
+ + get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?> + +
+ +
+ + get_option('wpsg_mod_abo_autoexpire_payment'), array()); ?> + 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') + ), $this->get_option('wpsg_mod_abo_autoexpire_customer'), array()); ?> + +
+ + diff --git a/views/order/index.phtml b/views/order/index.phtml index 223f688..7c8f463 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -171,20 +171,34 @@ hasMod('wpsg_mod_abo')) { ?> - callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 1) { ?> - callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id)) ?> - callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?> + + 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', 'getOriginOrder', array($oOrder->id)); $origin_order_data = $this->cache->loadOrder($origin_order_id); ?> - callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($origin_order_data['id'])) ?>
#2#', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$origin_order_id, $origin_order_data['onr']); ?> + - - + + -- cgit v1.2.3