summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2016-10-27 12:48:23 +0000
committerhartmut <noreply@maennchen1.de>2016-10-27 12:48:23 +0000
commit8e30745d2d58cd1078df00d1f587de27f4588033 (patch)
tree14a03a95f95aef6ddb4d4dabb841b40c82e140cf /views
parent5dd5d5d4c599fd2d8467655af14cf7b382d90ffe (diff)
Abgleich V3 und V4
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5873 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/admin/customerpreset.phtml43
-rw-r--r--views/gfx/targologo.pngbin0 -> 9955 bytes
-rw-r--r--views/mods/mod_addressvalidation/addressvalidation.js82
-rw-r--r--views/mods/mod_addressvalidation/settings_edit.phtml12
-rw-r--r--views/mods/mod_creditcard/settings_edit.phtml2
-rw-r--r--views/mods/mod_targo/order_done.phtml91
-rw-r--r--views/mods/mod_targo/order_view_afterpayment.phtml27
-rw-r--r--views/mods/mod_targo/settings_edit.phtml55
8 files changed, 311 insertions, 1 deletions
diff --git a/views/admin/customerpreset.phtml b/views/admin/customerpreset.phtml
new file mode 100644
index 0000000..128c2ac
--- /dev/null
+++ b/views/admin/customerpreset.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für die Kundenvoreinstellungen im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_shipping', __('Standard Versandart', 'wpsg'), $this->view['arShipping'], $this->get_option('wpsg_customerpreset_shipping'), array('help' => 'wpsg_customerpreset_shipping')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_payment', __('Standard Zahlungsart', 'wpsg'), $this->view['arPayment'], $this->get_option('wpsg_customerpreset_payment'), array('help' => 'wpsg_customerpreset_payment')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_defaultland', __('Standardland', 'wpsg'), $this->view['arLander'], $this->get_option('wpsg_defaultland'), array('help' => 'wpsg_defaultland', 'hint' =>
+ 'nohspc_'.wpsg_translate(__('Die Länder können in der <a href="#1#">Länderverwaltung</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender')
+ )); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array( 'help' => 'wpsg_customerpreset_title',
+ 'hint' => 'nohspc_'.wpsg_translate(__('Die Auswahl kann in den <a href="#1#">Kundendaten</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten'),
+ 'noIndex' => true
+ )); ?>
+
+ <br />
+
+ <input class="button-primary" type="submit" name="wpsg-submit" value="<?php echo __('Speichern', 'wpsg'); ?>" />
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/gfx/targologo.png b/views/gfx/targologo.png
new file mode 100644
index 0000000..fa22bda
--- /dev/null
+++ b/views/gfx/targologo.png
Binary files differ
diff --git a/views/mods/mod_addressvalidation/addressvalidation.js b/views/mods/mod_addressvalidation/addressvalidation.js
new file mode 100644
index 0000000..b74aa5b
--- /dev/null
+++ b/views/mods/mod_addressvalidation/addressvalidation.js
@@ -0,0 +1,82 @@
+/**
+ * Globale Funktionen zur Adressvalidation
+ */
+
+function validateAddressBind(data) {
+ jQuery(data.PLZ).on("input", function () {
+ validateAddress(data);
+ });
+ jQuery(data.Ort).on("input", function () {
+ validateAddress(data);
+ });
+ jQuery(data.Strasse).on("input", function () {
+ validateAddress(data);
+ });
+ jQuery(data.Land).on("input", function () {
+ validateAddress(data);
+ });
+}
+
+// Adress-Validation
+function validateAddress(data) {
+ var
+ plz,
+ ort,
+ strasse,
+ astr1,
+ land = 'de',
+ rw;
+ plz = jQuery(data.PLZ).val();
+ ort = jQuery(data.Ort).val();
+ strasse = jQuery(data.Strasse).val();
+ nr = jQuery(data.Nr).val();
+ if (nr !== undefined) {
+ strasse = strasse + ' ' + nr;
+ }
+ land = jQuery(data.Land + ' option:selected').val();
+ land = jQuery(data.Land + ' option:selected').attr('data-land');
+
+ astr1 = localStorage.getItem(data.StorageKey);
+ if ((plz.length > 3) && (ort.length > 3) && (strasse.length > 3) &&
+ (astr1 != (strasse + plz + ort + land)))
+ {
+
+ astr1 = strasse + plz + ort + land;
+ localStorage.setItem(data.StorageKey, astr1);
+ jQuery.ajax({
+ url: 'http://api.address-validator.net/api/verify',
+ type: 'POST',
+ data: { StreetAddress: strasse,
+ City: ort,
+ PostalCode: plz,
+ //State: State,
+ CountryCode: land,
+ //Locale: land,
+ APIKey: data.Key},
+ dataType: 'json',
+ success: function (json) {
+ // check API result
+ if (typeof(json.status) != "undefined") {
+ status = json.status;
+ formattedaddress = json.formattedaddress;
+ if (json.status === 'VALID') {
+
+
+ } else if ((json.status === 'INVALID') || (json.status === 'SUSPECT')) {
+
+ alert(data.MsgTeil1 + '-Validation fehlerhaft. Bitte Straße, Hausnummer, PLZ, Ort und Land überprüfen.');
+
+ } else {
+
+ alert('Adress-Validation Serverproblem: ' + json.status);
+
+ }
+ }
+
+ }
+ });
+
+ }
+
+}
+
diff --git a/views/mods/mod_addressvalidation/settings_edit.phtml b/views/mods/mod_addressvalidation/settings_edit.phtml
new file mode 100644
index 0000000..db047cc
--- /dev/null
+++ b/views/mods/mod_addressvalidation/settings_edit.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Adressvalidation"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_addressvalidation_apikey', __('API-Key', 'wpsg'), $this->get_option('wpsg_mod_addressvalidation_apikey'), array('help' => 'wpsg_mod_addressvalidation_apikey')); ?>
+
+<a class="button-primary" id="button-google" target="popup" href="http://www.address-validator.net/address-online-verification-api.html" onclick="window.open('', 'popup', 'width=500;height=200,resizable=yes,menubar=yes')">
+ <?php echo __('Schlüssel anfordern', 'wpsg'); ?>
+</a> \ No newline at end of file
diff --git a/views/mods/mod_creditcard/settings_edit.phtml b/views/mods/mod_creditcard/settings_edit.phtml
index d8ec516..3d034f9 100644
--- a/views/mods/mod_creditcard/settings_edit.phtml
+++ b/views/mods/mod_creditcard/settings_edit.phtml
@@ -14,4 +14,4 @@
<?php echo wpsg_drawForm_Select('wpsg_mod_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_creditcard_mwst')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_creditcard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_iban', __('IBAN/BIC statt Kontonummer/BLZ verwenden', 'wpsg'), $this->get_option('wpsg_mod_creditcard_iban'), array('help' => 'wpsg_mod_creditcard_iban')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_schluessel', __('Schluessel', 'wpsg'), $this->get_option('wpsg_mod_creditcard_schluessel'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_schluessel', __('AES-256 Passwort', 'wpsg'), $this->get_option('wpsg_mod_creditcard_schluessel'), array('help' => 'wpsg_mod_creditcard_schluessel')); ?>
diff --git a/views/mods/mod_targo/order_done.phtml b/views/mods/mod_targo/order_done.phtml
new file mode 100644
index 0000000..d5dbde6
--- /dev/null
+++ b/views/mods/mod_targo/order_done.phtml
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * Dieses Template wird nach einer Targo Zahlung angezeigt
+*/
+
+$url = $this->get_option('wpsg_mod_targo_url');
+?>
+
+<p><?php echo __('Um den Betrag mit Targo zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $this->get_option('wpsg_mod_targo_url'); ?>">
+ <img src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" align="left" alt="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
+
+ </a>
+</p>
+
+<form hidden class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $this->get_option('wpsg_mod_targo_url'); ?>">
+<?php $o_id = $this->view['o_id'];
+ $k_id = $this->view['k_id'];
+ $oOrder = wpsg_order::getInstance($o_id);
+ $brutto = $oOrder->getAmount(WPSG_BRUTTO);
+ $brutto = wpsg_round($brutto, 2);
+ /** @var wpsg_customer */
+ $oCustomer = wpsg_customer::getInstance($k_id);
+ /*
+ $geb1 = $oCustomer->getBirthdate("Y-m-d");
+ $geb2 = $oCustomer->getBirthdate();
+ $geb3 = $oCustomer->data["geb"];
+ $geb4 = wpsg_date("Y-m-d", strtotime($geb3));
+ $geb5 = strtotime($geb3);
+ $geb6 = strtotime("0000-00-00");
+ $geb6 = strtotime("1901-12-13");
+ $geb6 = strtotime("1901-12-14");
+ */
+ $dl = $this->view['targoLink'];
+
+ $street = $oOrder-> getInvoiceStreetClear(true);
+ $nr = $oOrder-> getInvoiceStreetNr();
+
+
+?>
+<?php ?>
+<?php ?>
+
+<br /><br />
+<b>Obligatorische Daten für Targobank</b><br />
+<input type="text" id="koop_id" name="koop_id" value="<?php echo $this->get_option('wpsg_mod_targo_koop_id');?>" placeholder="koop_id"><br />
+<input type="text" id="SessionID" name="sessionID" value="<?php echo session_id();?>" placeholder="sessionID"><br />
+<input type="text" id="amount" name="amount" value="<?php echo $brutto;?>" placeholder="amount"><br />
+<input type="text" id="dealerID" name="dealerID" value="<?php echo $this->get_option('wpsg_mod_targo_dealerid');?>" placeholder="dealerID"><br />
+<input type="text" id="dealerText" name="dealerText" value="<?php echo $this->view['targoLink'];?>" placeholder="dealerText"><br />
+<input type="text" id="documentno" name="documentno" value="" placeholder="documentno"><br />
+
+
+<b>Optionale Daten für Targobank</b><br />
+<input type="text" id="dealerShopURL" name="dealerShopURL" value="" placeholder="dealerShopURL"><br />
+<input type="text" id="dealerAbortURL" name="dealerAbortURL" value="" placeholder="dealerAbortURL"><br />
+<input type="text" id="hash" name="hash" value="" placeholder="hash">(hashkey)<br />
+<input type="text" id="" name="" value="" placeholder=""><br />
+
+
+<b>Adressdaten aus Kundendaten</b><br />
+<input type="text" id="surname" name="surname" value="<?php echo $oCustomer->getName();?>" placeholder="surname"><br />
+<input type="text" id="firstname" name="firstname" value="<?php echo $oCustomer->getFirstname();?>" placeholder="firstname"><br />
+<input type="text" id="street" name="street" value="<?php echo $oOrder->getInvoiceStreetClear(true);?>" placeholder="street"><br />
+<input type="text" id="streetnumber" name="streetnumber" value="<?php echo $oOrder->getInvoiceStreetNr();?>" placeholder="streetnumber"><br />
+<input type="text" id="zip" name="zip" value="<?php echo $oCustomer->getZip();?>" placeholder="zip"><br />
+<input type="text" id="city" name="city" value="<?php echo $oCustomer->getCity();?>" placeholder="city"><br />
+<input type="text" id="telnocode" name="telnocode" value="" placeholder="vorwahl"><br />
+<input type="text" id="telno" name="telno" value="<?php echo $oCustomer->getPhone();?>" placeholder="telno"><br />
+<input type="text" id="birthday" name="birthday" value="<?php echo $oCustomer->getBirthdate("Y-m-d");?>" placeholder="birthday"><br />
+<input type="text" id="email" name="email" value="<?php echo $oCustomer->getEMail();?>" placeholder="email"><br />
+
+<input type="submit" id="submit" name="submit" value="submit" >
+
+</form>
+
+
+<?php if ($this->get_option('wpsg_mod_targo_autostart') == '1') { ?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ //location.href = "<?php echo $this->view['targoLink']; ?>";
+ location.href = "<?php echo $this->get_option('wpsg_mod_targo_url');?>";
+ }, 1000);
+ } );
+
+/* ]]> */</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_targo/order_view_afterpayment.phtml b/views/mods/mod_targo/order_view_afterpayment.phtml
new file mode 100644
index 0000000..147de14
--- /dev/null
+++ b/views/mods/mod_targo/order_view_afterpayment.phtml
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Template für die Integration der PayPal Zahlungsart in die Bestellverwaltung
+ */
+
+?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'))) { ?>
+
+ <div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_paypal&do=refresh&edit_id=<?php echo $this->view['oOrder']->id; ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentstate')); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+<?php } ?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'))) { ?>
+
+ <?php echo wpsg_drawForm_Input('', __('SaleID', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'), array('text' => true)); ?>
+
+<?php } ?>
diff --git a/views/mods/mod_targo/settings_edit.phtml b/views/mods/mod_targo/settings_edit.phtml
new file mode 100644
index 0000000..091a5f5
--- /dev/null
+++ b/views/mods/mod_targo/settings_edit.phtml
@@ -0,0 +1,55 @@
+<?php
+
+ /**
+ * Templatedatei für die Einstellungen des Targo Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_targo_bezeichnung'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_targo_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_targo_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_targo_aktiv'), array('help' => 'wpsg_mod_targo_activ')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_autostart', __('Autostart', 'wpsg'), $this->get_option('wpsg_mod_targo_autostart'), array('help' => 'wpsg_mod_targo_autostart')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_summe_min', __('Mindestfinanzierungssumme', 'wpsg'), $this->get_option('wpsg_mod_targo_summe_min'), array('help' => 'wpsg_mod_targo_summe_min')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_summe_max', __('Maximale Finanzierungssumme', 'wpsg'), $this->get_option('wpsg_mod_targo_summe_max'), array('help' => 'wpsg_mod_targo_summe_max')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_laufzeit_min', __('Mindestlaufzeit (Monate)', 'wpsg'), $this->get_option('wpsg_mod_targo_laufzeit_min'), array('help' => 'wpsg_mod_targo_laufzeit_min')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_laufzeit_max', __('Maximale Laufzeit (Monate)', 'wpsg'), $this->get_option('wpsg_mod_targo_laufzeit_max'), array('help' => 'wpsg_mod_targo_laufzeit_max')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_rate_min', __('Mindestrate', 'wpsg'), $this->get_option('wpsg_mod_targo_rate_min'), array('help' => 'wpsg_mod_targo_rate_min')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_url', __('Targo-URL', 'wpsg'), $this->get_option('wpsg_mod_targo_url'), array('help' => 'wpsg_mod_targo_url')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_koop_id', __('Targo-Koop-ID', 'wpsg'), $this->get_option('wpsg_mod_targo_koop_id'), array('help' => 'wpsg_mod_targo_koop_id')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_dealerid', __('Targo-Dealer-ID', 'wpsg'), $this->get_option('wpsg_mod_targo_dealerid'), array('help' => 'wpsg_mod_targo_dealerid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_hashkey', __('Targo-Hash-Key', 'wpsg'), $this->get_option('wpsg_mod_targo_hashkey'), array('help' => 'wpsg_mod_targo_hashkey')); ?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_createwebhook', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_targo_createwebhook')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_targo_gebuehr'), true), array('help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_targo_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_targo_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_targo_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_targo_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_targo_success'), array('help' => 'wpsg_mod_targo_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_targo_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_targo_error'), array('help' => 'wpsg_mod_targo_error')); ?>
+
+<br />
+
+<div class="wpsg_mod_targo_mode_layer wpsg_mod_targo_mode_1">
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_targo_mode').bind('change', function() {
+
+ jQuery('.wpsg_mod_targo_mode_layer').hide();
+ jQuery('.wpsg_mod_targo_mode_' + jQuery(this).val()).show();
+
+ }).change();
+
+
+ });
+
+/* ]]> */</script>
+
+
+<br />