From 5a45aad049c6ba0327a22fd1b2a780405de385a1 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Wed, 18 Nov 2020 08:32:09 +0000 Subject: - Abo Einstellungen ins Produkt git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7811 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_abo/mail_autoinformation.phtml | 2 +- views/mods/mod_abo/mail_autoinformation_html.phtml | 2 +- views/mods/mod_abo/order_view.phtml | 6 +- views/mods/mod_abo/page_abo.phtml | 27 +++++-- views/mods/mod_abo/produkt_addedit_content.phtml | 85 ++++++++++++++++++++++ views/mods/mod_abo/settings_edit.phtml | 38 ++++++++-- 6 files changed, 144 insertions(+), 16 deletions(-) (limited to 'views/mods') diff --git a/views/mods/mod_abo/mail_autoinformation.phtml b/views/mods/mod_abo/mail_autoinformation.phtml index e309e02..38c53fe 100644 --- a/views/mods/mod_abo/mail_autoinformation.phtml +++ b/views/mods/mod_abo/mail_autoinformation.phtml @@ -6,7 +6,7 @@ ?> view['customer']['vname']); ?> view['customer']['name']); ?>, -view['oProduct']->getProductName(), $this->get_option('wpsg_mod_abo_autoexpire_informationtime')); ?> +view['oProduct']->getProductName(), $this->view['wpsg_mod_abo_autoexpire_informationtime']); ?> diff --git a/views/mods/mod_abo/mail_autoinformation_html.phtml b/views/mods/mod_abo/mail_autoinformation_html.phtml index 784e27d..c5d0498 100644 --- a/views/mods/mod_abo/mail_autoinformation_html.phtml +++ b/views/mods/mod_abo/mail_autoinformation_html.phtml @@ -6,7 +6,7 @@ ?>

view['customer']['vname']); ?> view['customer']['name']); ?>,

-

view['oProduct']->getProductName(), $this->get_option('wpsg_mod_abo_autoexpire_informationtime')); ?>

+

view['oProduct']->getProductName(), $this->view['wpsg_mod_abo_autoexpire_informationtime']); ?>

diff --git a/views/mods/mod_abo/order_view.phtml b/views/mods/mod_abo/order_view.phtml index 3242993..0dca512 100644 --- a/views/mods/mod_abo/order_view.phtml +++ b/views/mods/mod_abo/order_view.phtml @@ -16,7 +16,11 @@ ?> - getProduct()->getProductName()); ?> + getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()).'">'. + $oOrderProduct->getProduct()->getProductName(). + '' + ); ?> callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?> 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?> diff --git a/views/mods/mod_abo/page_abo.phtml b/views/mods/mod_abo/page_abo.phtml index 7b33792..a562ef9 100644 --- a/views/mods/mod_abo/page_abo.phtml +++ b/views/mods/mod_abo/page_abo.phtml @@ -15,7 +15,22 @@
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())); ?> + callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { + + $product_id = $oOrderProduct->getProductId(); + $aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); + + try { + + $oAbo = wpsg_abo::getFromOrderAndProduct($oOrder->getId(), $oOrderProduct->getId()); + + } catch (\Exception $e) { + + continue; + + } + + ?>
@@ -51,16 +66,18 @@ callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?> - time()) { ?> + getState() === wpsg_abo::STATE_RUNNING) { ?> - + getState() === wpsg_abo::STATE_INEXTENSION) { ?> + + getState() === wpsg_abo::STATE_EXTEND) { ?>
- + @@ -73,7 +90,7 @@ - get_option('wpsg_mod_abo_autoexpire_customer'), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?> + callMod('wpsg_mod_abo', 'getSetting', ['wpsg_mod_abo_autoexpire_customer', $product_id]), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?> diff --git a/views/mods/mod_abo/produkt_addedit_content.phtml b/views/mods/mod_abo/produkt_addedit_content.phtml index d6e0acd..e4060fd 100644 --- a/views/mods/mod_abo/produkt_addedit_content.phtml +++ b/views/mods/mod_abo/produkt_addedit_content.phtml @@ -3,6 +3,9 @@ /** * Integriert die Abo-Einstellungen in das Produkt */ + + $arPaymentSelect = Array(); + foreach ($this->arPayment as $p) { $arPaymentSelect[$p['id']] = $p['name']; } ?> +
+
+
diff --git a/views/mods/mod_abo/settings_edit.phtml b/views/mods/mod_abo/settings_edit.phtml index d134aaf..d9f88c1 100644 --- a/views/mods/mod_abo/settings_edit.phtml +++ b/views/mods/mod_abo/settings_edit.phtml @@ -24,9 +24,14 @@ 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',)); ?> + __('Nein', 'wpsg'), + '1' => __('Ja', 'wpsg') + ], $this->get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('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',)); ?>
@@ -34,15 +39,32 @@ get_option('wpsg_mod_abo_autoexpire_payment'), array('help' => 'wpsg_mod_abo_autoexpire_payment')); ?> -
- get_option('wpsg_mod_abo_autoexpire_customermail'),array('help' => 'wpsg_mod_abo_autoexpire_customermail')); ?> - get_option('wpsg_mod_abo_autoexpire_adminmail'), array ('help' => 'wpsg_mod_abo_autoexpire_adminmail')); ?> -
- get_option('wpsg_mod_abo_autoexpire_information'), array('hint' => wpsg_translate(__('Mail wird X-Tage vor einer automatischen Verlängerung versendet. (mail_autoinformation.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabautoinfo'), 'help' => 'wpsg_mod_abo_autoexpire_information')); ?> + + __('Nein', 'wpsg'), + '1' => __('Ja', 'wpsg') + ], $this->get_option('wpsg_mod_abo_autoexpire_customermail'), ['help' => 'wpsg_mod_abo_autoexpire_customermail']); ?> + + __('Nein', 'wpsg'), + '1' => __('Ja', 'wpsg') + ], $this->get_option('wpsg_mod_abo_autoexpire_adminmail'), ['help' => 'wpsg_mod_abo_autoexpire_adminmail']); ?> + + __('Nein', 'wpsg'), + '1' => __('Ja', 'wpsg') + ], $this->get_option('wpsg_mod_abo_autoexpire_information'), [ + 'help' => 'wpsg_mod_abo_autoexpire_information', + 'hint' => wpsg_translate(__('Mail wird X-Tage vor einer automatischen Verlängerung versendet. (mail_autoinformation.phtml) -> Konfiguration', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabautoinfo') + ]); ?> + -
+ +
__('Nichts', 'wpsg'), @@ -82,7 +104,7 @@ jQuery('#wpsg_mod_abo_autoexpire_information').bind('change', function() { - if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_abo_autoexpire_informationactiv').show(); + if (jQuery(this).val() === '1') jQuery('.wpsg_mod_abo_autoexpire_informationactiv').show(); else jQuery('.wpsg_mod_abo_autoexpire_informationactiv').hide(); } ).change(); -- cgit v1.2.3