diff options
Diffstat (limited to 'views/mods/mod_kundenverwaltung')
23 files changed, 1572 insertions, 0 deletions
diff --git a/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml b/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml new file mode 100644 index 0000000..39b4838 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml @@ -0,0 +1,19 @@ +<?php
+
+ /**
+ * Template für die Integration in die Verwaltung der Berechtigungen
+ */
+
+ global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles");
+
+?>
+<tr>
+ <td class="wpsg_col_capname"><?php echo __('Kundenverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_customer]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_customer']) && $r['capabilities']['wpsg_customer'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_customer]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+</tr>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml b/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml new file mode 100644 index 0000000..093024b --- /dev/null +++ b/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml @@ -0,0 +1,23 @@ +<?php
+
+ /**
+ * Template für die Registrierung während des Checkouts
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][pwd1]" value="" />
+</div>
+
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][pwd2]" value="" />
+</div>
+
+<div class="wpsg_clear"></div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/checkout_login.phtml b/views/mods/mod_kundenverwaltung/checkout_login.phtml new file mode 100644 index 0000000..855449c --- /dev/null +++ b/views/mods/mod_kundenverwaltung/checkout_login.phtml @@ -0,0 +1,32 @@ +<?php
+
+ /**
+ * Template für die Integration des Login Formulares in den Checkout
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_box">
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
+ </div>
+
+ <br />
+
+ <div class="wpsg_checkoutblock">
+ <a class="wpsg_pwdvergessen_link" href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>">Passwort vergessen?</a>
+ <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" />
+ </div>
+
+ <div class="wpsg_clearer"></div><br />
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/checkout_logout.phtml b/views/mods/mod_kundenverwaltung/checkout_logout.phtml new file mode 100644 index 0000000..b23a0bd --- /dev/null +++ b/views/mods/mod_kundenverwaltung/checkout_logout.phtml @@ -0,0 +1,16 @@ +<?php
+
+ /**
+ * Template für die Integration des Logout Buttons in den Checkout
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_checkout wpsg_logout_box">
+ <?php echo __('Hallo','wpsg');?>
+ <?php echo wpsg_hspc(($this->view['basket']['checkout']['title'] != '' && $this->view['basket']['checkout']['title'] != '-1')?$this->view['basket']['checkout']['title']:''); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['vname']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['name']); ?>
+ <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_LOGOUT); ?>"><?php echo __('Abmelden', 'wpsg'); ?></a>
+
+ <div class="wpsg_clearer"></div><br />
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/edit.phtml b/views/mods/mod_kundenverwaltung/edit.phtml new file mode 100644 index 0000000..d550f0f --- /dev/null +++ b/views/mods/mod_kundenverwaltung/edit.phtml @@ -0,0 +1,260 @@ +<?php
+
+ /**
+ * Template für die Bearbeitung eines Kunden im Backend
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ jQuery(document).ready( function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery("#normal-sortables, #side-sortables").sortable({
+ connectWith: ".meta-box-sortables",
+ placeholder: 'wpsg_placeholder',
+ dropOnEmpty: true,
+ cursor: 'move',
+ handle: '.wpsg_handlediv',
+ grid: [50, 20],
+ forceHelperSize: true,
+ forcePlaceholderSize: true,
+ opacity: 0.8,
+ stop: function(e,ui) {
+
+ var ser = jQuery("#normal-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customer_view_normal', ser);
+
+ var ser = jQuery("#side-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customer_view_side', ser);
+
+ },
+ receive: function(e, ui) {
+ }
+ });
+
+ if (jQuery.cookie('wpsg_customer_view_normal') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customer_view_normal').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ if (jQuery.cookie('wpsg_customer_view_side') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customer_view_side').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_customer_view .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_customer_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_customer_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_customer_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */
+</script>
+
+<div class="wrap columns-2 wpsg_produkt_addedit wpsg_customer_view">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo wpsg_hspc($this->view['data']['vname'].' '.$this->view['data']['name']); ?>
+ </h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=save&noheader=1" enctype="multipart/form-data">
+
+ <div id="postbox" class="metabox-holder has-right-sidebar">
+
+ <div id="side-info-column" class="inner-sidebar" style="width:386px;">
+ <div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
+
+ <div id="wpsg_customerpasswd" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Passwortänderung', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('password1', __('Passwort', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Input('password2', __('Wiederholung', 'wpsg'), ''); ?>
+ </div>
+ </div>
+
+ <div id="wpsg_customerstats" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Information', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Bestellungen', 'wpsg'); ?>:</div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo $this->view['data']['countOrder']; ?>
+ <?php if ($this->view['data']['countOrder'] > 0) { ?>
+ [ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $this->view['data']['id']; ?>"><?php echo __('Bestellungen anzeigen', 'wpsg'); ?></a> ]
+ <?php } ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Letzte Bestellung', 'wpsg'); ?>:</div>
+ <div class="wpsg_form_right"><p><?php echo wpsg_formatTimestamp(strtotime($this->view['data']['lastorder'])); ?></p></div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php if ($this->hasMod('wpsg_mod_statistics')) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo wpsg_translate(__('Umsatz in #1#', 'wpsg'), $this->get_option('wpsg_currency')); ?>:</div>
+ <div class="wpsg_form_right wpsg_mod_kundenverwaltung_customeramount">
+ <p>
+ <?php
+ echo wpsg_translate(__('<a href="#1#" title="Storniert" class="wpsg_storno">#2#</a> / <a href="#3#" title="Offen" class="wpsg_open">#4#</a> / <a href="#5#" title="Bezahlt" class="wpsg_payed">#6#</a>', 'wpsg'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=500&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountStorno']),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=0&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountAll'] - $this->view['amountStorno'] - $this->view['amountPayed']),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=100,110&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountPayed'])
+ );
+ ?>
+ </p>
+ </div>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
+ <div id="wpsg_customercustomfields" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Benutzerdefinierte Felder', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <?php echo wpsg_drawForm_Input('custom['.$c_id.']', __($c['name'], 'wpsg'), @$this->view['data']['custom'][$c_id]); ?>
+ <?php } else if ($c['typ'] == '1') { // Auswahl ?>
+ <?php echo wpsg_drawForm_Select('custom['.$c_id.']', __($c['name'], 'wpsg'), wpsg_array_merge(array('' => __('Keine Auswahl', 'wpsg')), explode('|', $c['auswahl'])), @$this->view['data']['custom'][$c_id], array('noIndex' => true)); ?>
+ <?php } else if ($c['typ'] == '2') { // Checkbox?>
+ <?php echo wpsg_drawForm_Checkbox('custom['.$c_id.']', __($c['name'], 'wpsg'), @$this->view['data']['custom'][$c_id]); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('wpsg_mod_customer_sidebar', array(&$this->view['data'])); ?>
+
+ </div>
+ </div>
+
+ <div id="post-body">
+
+ <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
+
+ <div id="wpsg_customeraddress" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Name/Anschrift', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('knr', __('Kundennummer', 'wpsg'), $this->view['data']['knr']); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
+ <?php echo wpsg_drawForm_Select('group_id', __('Kundengruppe', 'wpsg'), $this->view['arCustomergroup'], $this->view['data']['group_id']); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+ <?php echo wpsg_drawForm_Input('vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+ <?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime($this->view['data']['geb']), true), array('datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Input('email', __('E-Mail', 'wpsg'), $this->view['data']['email']); ?>
+ <?php echo wpsg_drawForm_Input('firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
+ <?php echo wpsg_drawForm_Input('tel', __('Telefon', 'wpsg'), $this->view['data']['tel']); ?>
+ <?php echo wpsg_drawForm_Input('fax', __('Fax', 'wpsg'), $this->view['data']['fax']); ?>
+ <?php echo wpsg_drawForm_Input('strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
+ <?php echo wpsg_drawForm_Input('plz', __('PLZ', 'wpsg'), $this->view['data']['plz']); ?>
+ <?php echo wpsg_drawForm_Input('ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+ <?php echo wpsg_drawForm_Select('land', __('Land', 'wpsg'), $this->view['arLand'], $this->view['data']['land']); ?>
+ <?php echo wpsg_drawForm_Input('ustidnr', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr']); ?>
+ <?php echo wpsg_drawForm_Select('status', __('Status', 'wpsg'), array('inaktiv', 'aktiv'), $this->view['data']['status'], array()); ?>
+ <?php echo wpsg_drawForm_Checkbox('info-mail', __('Mail bei Statusänderung', 'wpsg'), '', array()); ?>
+ </div>
+ </div>
+
+ <div id="wpsg_customercomment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Kundenkommentar', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <textarea name="comment"><?php echo wpsg_hspc($this->view['data']['comment']); ?></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ <?php if ($_REQUEST['edit_id'] > 0) { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $_REQUEST['edit_id']; ?>" />
+ <?php } ?>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Kunde speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Kunde speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+ </p>
+
+ </div>
+
+ </div>
+
+
+ </form>
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/getpwd.phtml b/views/mods/mod_kundenverwaltung/getpwd.phtml new file mode 100644 index 0000000..ef99967 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/getpwd.phtml @@ -0,0 +1,35 @@ +<?php
+
+ /**
+ * Template für die Seite, auf der der Kunde sein Passwort erneuern kann
+ */
+
+?>
+<div class="wpsg_register">
+
+ <p>
+ <?php echo __('Geben Sie hier die E-Mail Adresse an, mit der Sie bereits bestellt haben. Sie erhalten dann eine E-Mail mit der Aufforderung ein neues Passwort zu generieren.', 'wpsg'); ?>
+ </p>
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
+
+ <div class="wpsg_block">
+
+ <label for="wpsg_firma"><?php echo __("E-Mail", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_email" name="wpsg[sendpwd][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+
+ </div>
+
+ <br />
+
+ <input type="submit" value="<?php echo __('Passwort anfordern', 'wpsg'); ?>" class="wpsg_button wpsg_button_sendpwd" name="wpsg_mod_kundenverwaltung_sendpwd" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/import.phtml b/views/mods/mod_kundenverwaltung/import.phtml new file mode 100644 index 0000000..d8b898b --- /dev/null +++ b/views/mods/mod_kundenverwaltung/import.phtml @@ -0,0 +1,30 @@ +<?php
+
+ /**
+ * Template für den Import der Kundendaten
+ */
+
+?>
+<div class="wrap">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Kundenimport', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=index" class="add-new-h2"><?php echo __("Zurück zur Kundenverwaltung", "wpsg"); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+ <br />
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import&noheader=1" id="import_form" enctype="multipart/form-data">
+
+ <div class="wpsg_hinweis"><?php echo __('Laden Sie ein vorher exportiertes CSV File hoch, die Kundendaten werden dann aus dieser Datei importiert.', 'wpsg'); ?></div>
+ <br />
+
+ <input type="file" name="wpsg_importfile" />
+
+ <br /><br />
+ <input type="submit" value="<?php echo __('Import starten', 'wpsg'); ?>" class="button-primary" name="wpsg_import" />
+
+ </form>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml new file mode 100644 index 0000000..a8753e4 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/index.phtml @@ -0,0 +1,264 @@ +<?php
+
+ /**
+ * Template für die Kundenübersichtsseite im Backend
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
+ var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>'; +
+ function wpsg_setOrder(order)
+ {
+
+ if (order == wpsg_order)
+ {
+
+ // Nur Richtung ändern
+ if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+ else jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order').val(order);
+ jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function wpsg_setOrder(order)
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_customer_index .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_customer_index_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_customer_index_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_customer_index_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ if (arClose[index] != '') jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+ +/* ]]> */</script>
+
+<div class="wrap wpsg_customer_index">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo __('Kundenverwaltung', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=export&noheader=1" class="add-new-h2"><?php echo __('Exportieren', 'wpsg'); ?></a>
+ <?php } ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import" class="add-new-h2"><?php echo __('Importieren', 'wpsg'); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" id="filter_form">
+
+ <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
+ <select style="float:left;" name="customergroup" onchange="jQuery('#filter_form').submit();">
+ <option value="-1"><?php echo __('Alle Kundengruppen', 'wpsg'); ?></option>
+ <option value="0" <?php echo (($_REQUEST['customergroup'] === '0')?'selected="selected"':''); ?>><?php echo __('Unzugeordnet', 'wpsg'); ?></option>
+ <?php foreach ((array)$this->view['arCustomergroup'] as $customer_group_id => $customer_group_name) { ?>
+ <option value="<?php echo $customer_group_id; ?>" <?php echo (($customer_group_id == $_REQUEST['customergroup'])?'selected="selected"':''); ?>><?php echo $customer_group_name; ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+
+ <p class="search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Kunden suchen', 'wpsg'); ?>:</label>
+ <input type="text" value="<?php echo wpsg_hspc($_REQUEST['s']); ?>" name="s" id="post-search-input">
+ <input type="submit" value="<?php echo __('Kunden suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
+ </p>
+
+ <div class="tablenav top">
+
+ <?php if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=1&s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear" />
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
+
+ <input style="display:none;" type="submit" name="suchen" value="" />
+
+ <?php $this->callMods('wpsg_mod_customer_head'); ?>
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" style="width:60px;">
+ <a href="#" onclick="return wpsg_setOrder('nr');">
+ <span><?php echo __("Nr.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-adress <?php echo (($this->view['filter']['order'] == 'adress')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('adress');">
+ <span><?php echo __("Anschrift", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['data'] as $k) { ?>
+ <tr>
+ <td class="manage-column column-title">
+ <?php echo ((strlen($k['knr']) > 0)?$k['knr']:$k['id']); ?>
+ </td>
+ <td class="manage-column column-title">
+ <strong> <?php echo wpsg_hspc((trim($k['vname'].' '.$k['name']) == "")?__("---- ", "wpsg"):$k['vname'].' '.$k['name']); ?> <a href="mailto:<?php echo wpsg_hspc($k['email']); ?>" style="font-weight:normal;">(<?php echo wpsg_hspc($k['email']); ?>)</a></strong>
+ </td>
+ <td rowspan="2" class="manage-column column-adress">
+ <?php echo (($k['firma'] != '')?$k['firma']:'').'<br />'; ?>
+ <?php echo isset($this->$k['strasse']) && $k['strasse'].' '.isset ($this->$k['hausnr']) && $k['hausnr']; ?><br />
+ <?php echo $k['plz'].' '.$k['ort'].' '.$k['land_kuerzel']; ?><br />
+ </td>
+ <td rowspan="2" class="manage-column column-status">
+ <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $k['order_count']); ?><br />
+ <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($k['order_umsatz'], $this->get_option('wpsg_currency'))); ?>
+ <?php if ($k['order_count'] > 0) { ?>
+ <br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $k['id']; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="manage-column wpsg-row-actions" colspan="2">
+ <div>
+ <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $k['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diesen Kunden löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=del&edit_id=<?php echo $k['id']; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
+ <?php if ($k['order_count'] > 0) { ?>
+ |
+ <span class="order"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $k['id']; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a></span>
+ <?php } ?>
+ </div>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('nr');">
+ <span><?php echo __("Nr.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-adress <?php echo (($this->view['filter']['order'] == 'adress')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('adress');">
+ <span><?php echo __("Anschrift", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+
+ <?php /* if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav">
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=1&s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear">
+ </div>
+ </div>
+ <?php } */ ?>
+
+ <?php } else { ?>
+ <p><?php echo __('Keine Kunden in der Datenbank.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ </form>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/login.phtml b/views/mods/mod_kundenverwaltung/login.phtml new file mode 100644 index 0000000..668420e --- /dev/null +++ b/views/mods/mod_kundenverwaltung/login.phtml @@ -0,0 +1,42 @@ +<?php
+
+ /**
+ * Dieses Template wird angezeigt, wenn z.B. auf die Profilseite zugegriffen wird und der User nicht eingelogt ist
+ */
+
+?>
+<div class="wpsg_profil wpsg_checkout wpsg">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
+ <div class="wpsg_box">
+
+ <h2><?php echo __('Bereits Kunde? Hier einloggen ...', 'wpsg'); ?></h2>
+
+ <div class="wpsg_inner wpsg_login">
+
+ <div class="wpsg_block wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
+ </div>
+
+ <div class="wpsg_block wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
+ </div>
+
+ <br />
+
+ <div class="wpsg_checkoutblock">
+ <a class="wpsg_pwdvergessen_link" href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>">Passwort vergessen?</a>
+ <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" />
+ </div>
+
+ <div class="wpsg_clearer"></div><br />
+
+ </div>
+ </div>
+ </form>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/logout.phtml b/views/mods/mod_kundenverwaltung/logout.phtml new file mode 100644 index 0000000..1ae3443 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/logout.phtml @@ -0,0 +1,10 @@ +<?php
+
+ /**
+ * Wird angezeigt, wenn die Registrierungsseite aufgerufen wird und man bereits eingelogt ist
+ */
+
+?>
+<div class="wpsg_logout wpsg">
+ <?php echo wpsg_translate(__('Sie können sich nicht registrieren, da sie derzeit eingelogt sind. Klicken Sie <a href="#1#">hier</a> um sich abzumelden.', 'wpsg'), $this->callMod('wpsg_mod_kundenverwaltung', 'getLogoutURL')); ?>
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_activate.phtml b/views/mods/mod_kundenverwaltung/mail_activate.phtml new file mode 100644 index 0000000..07cb0d4 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_activate.phtml @@ -0,0 +1,14 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn der Status seines Accounts ändert
+ * und die entsprechende Option aktiviert ist
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Der Status Ihres Accounts hat sich gändert auf:', 'wpsg'); ?> <?php echo $this->view['kunde']['status'] ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_activate_html.phtml b/views/mods/mod_kundenverwaltung/mail_activate_html.phtml new file mode 100644 index 0000000..c57c69d --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_activate_html.phtml @@ -0,0 +1,14 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn der Status seines Accounts ändert
+ * und die entsprechende Option aktiviert ist (HTML)
+ */
+
+?><p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Der Status Ihres Accounts hat sich gändert auf:', 'wpsg'); ?> <?php echo $this->view['kunde']['status'] ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml b/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml new file mode 100644 index 0000000..6052c69 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml @@ -0,0 +1,19 @@ +<?php
+
+ /**
+ * Template für die Mail einer Anfrage nach einem neuen Passwort
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?>
+
+<?php echo __('Es wird ihnen ein neues Passwort generiert, wenn sie auf folgenden Link klicken:', 'wpsg'); ?>
+
+<?php echo $this->view['strLink']; ?>
+
+<?php echo __('Sollten Sie kein neues Passwort angefragt haben können Sie diese Mail ignorieren.', 'wpsg'); ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml b/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml new file mode 100644 index 0000000..51f042d --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml @@ -0,0 +1,20 @@ +<?php
+
+ /**
+ * Template für die Mail einer Anfrage nach einem neuen Passwort (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?></p>
+
+<p><?php echo __('Es wird ihnen ein neues Passwort generiert, wenn sie auf folgenden Link klicken:', 'wpsg'); ?></p>
+
+<a href="<?php echo $this->view['strLink']; ?>"><?php echo __('Neues Passwort generieren', 'wpsg'); ?></a>
+
+<p><?php echo __('Sollten Sie kein neues Passwort angefragt haben können Sie diese Mail ignorieren.', 'wpsg'); ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml b/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml new file mode 100644 index 0000000..bac5a15 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml @@ -0,0 +1,15 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Passwort Anfrage erfolgreich bestätigt hat
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?>
+
+<?php echo wpsg_translate(__('Ihr neues Passwort lautet ab sofort: #1#', 'wpsg'), $this->view['kunde']['passwort']); ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml b/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml new file mode 100644 index 0000000..18dc959 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml @@ -0,0 +1,15 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Passwort Anfrage erfolgreich bestätigt hat
+ */
+
+?><p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?></p>
+
+<p><?php echo wpsg_translate(__('Ihr neues Passwort lautet ab sofort: #1#', 'wpsg'), $this->view['kunde']['passwort']); ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_register.phtml b/views/mods/mod_kundenverwaltung/mail_register.phtml new file mode 100644 index 0000000..7c015fa --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_register.phtml @@ -0,0 +1,26 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Registrierung erfolgreich beendet hat
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben sich mit folgenden Daten bei uns registriert.', 'wpsg'); ?>
+<?php echo '--------------------------------------------------------------------' ?>
+<?php echo wpsg_translate(__('Firma: #1#', 'wpsg'), $this->view['kunde']['firma']); ?>
+<?php echo wpsg_translate(__('Vorname: #1#', 'wpsg'), $this->view['kunde']['vname']); ?>
+<?php echo wpsg_translate(__('Name: #1#', 'wpsg'), $this->view['kunde']['name']); ?>
+<?php echo wpsg_translate(__('E-Mail: #1#', 'wpsg'), $this->view['kunde']['email']); ?>
+<?php echo wpsg_translate(__('Telefon: #1#', 'wpsg'), $this->view['kunde']['tel']); ?>
+<?php echo wpsg_translate(__('Fax: #1#', 'wpsg'), $this->view['kunde']['fax']); ?>
+<?php echo wpsg_translate(__('Straße: #1#', 'wpsg'), $this->view['kunde']['strasse']); ?>
+<?php echo wpsg_translate(__('PLZ: #1#', 'wpsg'), $this->view['kunde']['plz']); ?>
+<?php echo wpsg_translate(__('Ort: #1#', 'wpsg'), $this->view['kunde']['ort']); ?>
+<?php echo wpsg_translate(__('Land: #1#', 'wpsg'), $this->view['kunde']['land']); ?>
+<?php echo wpsg_translate(__('UStIdNr.: #1#', 'wpsg'), $this->view['kunde']['ustidnr']); ?>
+<?php echo '--------------------------------------------------------------------' ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/mail_register_html.phtml b/views/mods/mod_kundenverwaltung/mail_register_html.phtml new file mode 100644 index 0000000..2a302b4 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/mail_register_html.phtml @@ -0,0 +1,61 @@ +<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Registrierung erfolgreich beendet hat (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben sich mit folgenden Daten bei uns registriert.', 'wpsg'); ?></p>
+
+<table style="width:100%;">
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['firma']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Vorname', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['vname']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('E-Mail', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['email']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['tel']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['fax']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['strasse']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('PLZ', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['plz']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['ort']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['land']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('UStIdNr.', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['ustidnr']); ?></td>
+ </tr>
+</table>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/order.phtml b/views/mods/mod_kundenverwaltung/order.phtml new file mode 100644 index 0000000..59853e9 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/order.phtml @@ -0,0 +1,94 @@ +<?php
+
+ /**
+ * Template für die Übersichtsseite der Bestellungen im Frontend
+ */
+
+ //wpsg_debug($this->view['arOrder']);
+
+?>
+
+<div class="wpsg_mod_kundenverwaltung_order wpsg">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
+ <?php foreach ($this->view['arOrder'] as $order) { ?>
+
+ <div class="wpsg_box">
+
+ <h2><?php echo wpsg_translate(__('Bestellung vom #1# über #2#', 'wpsg'), date('d.m.Y', strtotime($order['cdate'])), wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency'))); ?></h2>
+
+ <div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
+ <strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>
+ <?php echo $this->arStatus[$order['status']]; ?>
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+
+ <?php if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', array($order['id']))) { ?>
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $r['rnr']); ?></a>
+ <?php } else if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderCredit', array($order['id']))) { ?>
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $r['gnr']); ?></a>
+ <?php } ?>
+
+ <?php } ?>
+ <br />
+ <strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
+ <strong><?php echo __('Bestellte Produkte', 'wpsg'); ?>:</strong>
+
+ <table class="wpsg_mod_kundenverwaltung_producttable">
+ <tr>
+ <th class="col_name"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
+ </tr>
+ <?php foreach ((array)$order['arProdukte'] as $p) { ?>
+ <tr>
+ <td class="col_name">
+ <a href="<?php echo $p['url']; ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
+ <br /><?php echo __('Artikelnummer', 'wpsg'); ?>: <?php echo $p['anr']; ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && wpsg_isSizedString($p['mod_vp_varkey'])) { $arVarInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['mod_vp_varkey'])); ?>
+ <br /><?php echo __('Variante', 'wpsg'); ?>: <?php echo $arVarInfo['key']; ?>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_downloadplus')) { ?>
+ <?php if ($this->callMod('wpsg_mod_downloadplus', 'isPDFProdukt', array($p['id'])) === true) { $arDownloads = $this->callMod('wpsg_mod_downloadplus', 'getIndivFiles', array($p['id'], $order['id'])); ?>
+ <?php foreach ((array)$arDownloads as $d) { ?>
+ <br /><?php echo wpsg_translate(__('Datei "#1#": ', 'wpsg'), ((strlen($d['file_out']) > 0)?$d['file_out']:$d['file'])); ?>
+ <?php if ($d['status'] == '0') { ?>
+ <?php echo __('Noch nicht geplant', 'wpsg'); ?>
+ <?php } else if ($d['status'] == '1') { ?>
+ <?php echo wpsg_translate(__('Geplant am #1#.', 'wpsg'), date('d.m.Y', strtotime($d['scheduled']))); ?>
+ <?php } else if ($d['status'] == '2') { ?>
+ <?php $strURL = site_url().'?wpsg_action=wpsg_mod_downloadplus_download&hash='.$d['hash'].'&indi='.$d['indiv_id']; ?>
+ <?php echo wpsg_translate(__('<a href="#1#" target="blank">Download</a>', 'wpsg'), $strURL); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <br />
+ <?php if ($this->hasMod('wpsg_mod_productvars')) { $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($order['id'], $p['product_index'])); ?>
+ <?php if (wpsg_isSizedArray($arPV)) { ?>
+ <?php foreach ($arPV as $pv) { ?>
+ <?php echo wpsg_hspc($pv['name']); ?>: <?php echo wpsg_hspc($pv['value']); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="col_price">
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_ff($p['preis_netto'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ </div>
+ </div>
+
+ <?php } ?>
+ <?php } else { ?>
+ <p><?php echo __('Bisher keine Bestellungen durchgeführt.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/profil.phtml b/views/mods/mod_kundenverwaltung/profil.phtml new file mode 100644 index 0000000..e95e157 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/profil.phtml @@ -0,0 +1,193 @@ +<?php
+
+ /**
+ * Seite für das Profil eines Kunden
+ */
+
+?>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery("#form-profil").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
+
+ } );
+
+</script>
+
+<div class="wpsg wpsg_profil wpsg_checkout">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" id="form-profil" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
+
+ <h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[profil][firma]" value="<?php echo htmlspecialchars($this->view['data']['firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[profil][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo $t; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[profil][vname]" value="<?php echo htmlspecialchars($this->view['data']['vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[profil][name]" value="<?php echo htmlspecialchars($this->view['data']['name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[profil][geb]" value="<?php echo htmlspecialchars($this->view['data']['geb']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[profil][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+ </div>
+
+ <?php if ($this->view['pflicht']['emailconfirm'] == '1') { ?>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[profil][email2]" value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>" />
+ </div>
+
+ <?php } ?>
+
+ <div class="wpsg_checkoutblock">
+ <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[profil][fax]" value="<?php echo htmlspecialchars($this->view['data']['fax']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[profil][tel]" value="<?php echo htmlspecialchars($this->view['data']['tel']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[profil][strasse]" value="<?php echo htmlspecialchars($this->view['data']['strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[profil][plz]" value="<?php echo htmlspecialchars($this->view['data']['plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[profil][ort]" value="<?php echo htmlspecialchars($this->view['data']['ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[profil][land]" class="wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_ustidnr" class="wpsg_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[profil][ustidnr]" value="<?php echo htmlspecialchars($this->view['data']['ustidnr']); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['data']['custom'][$c_id]); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['data']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="0" />
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
+ <span class="wpsg_clear"></span>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <input type="submit" class="wpsg_button wpsg_saveButton" value="<?php echo __('Speichern', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_save" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ </form>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/register.phtml b/views/mods/mod_kundenverwaltung/register.phtml new file mode 100644 index 0000000..01c06ab --- /dev/null +++ b/views/mods/mod_kundenverwaltung/register.phtml @@ -0,0 +1,235 @@ +<?php
+
+ /**
+ * Template für die Registrierungsseite
+ */
+
+?>
+<?php //wpsg_debug($this->view['error']) ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
+
+ if (typeof jQuery.validationEngine == "object")
+ {
+
+ jQuery("#form-step2").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
+
+ jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
+ jQuery("#form-step2").validationEngine('detach');
+ });
+
+ }
+
+ <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
+
+ jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
+ jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
+ jQuery("#form-step2").validate( {
+ ignore: '',
+ errorClass: 'wpsg_error',
+ onsubmit: false,
+ showErrors: function(errorMap, errorList) {
+
+ this.defaultShowErrors();
+
+ }
+ } );
+
+ jQuery('.wpsg_registerButton').bind('click', function() {
+
+ var bReturn = jQuery('#form-step2').validate().form();
+ if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
+ return bReturn;
+
+ } );
+
+ <?php } ?>
+
+ } );
+
+ <?php
+ if ($_GET["wpsg_spam_email"] != "") {
+ echo "<p>Sie haben ein Feld ausgefüllt, das frei bleiben muss.</p>";
+ exit;
+ }
+ ?>
+
+</script>
+
+<div class="wpsg wpsg_checkout wpsg_register">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form id="form-step2" method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[register][firma]" value="<?php echo htmlspecialchars($this->view['data']['firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[register][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo $t; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_register"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[register][vname]" value="<?php echo htmlspecialchars($this->view['data']['vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_register"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->data['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[register][name]" value="<?php echo htmlspecialchars($this->view['data']['name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[register][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[register][email2]" value="<?php echo htmlspecialchars($this->view['data']['register']['email2']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['pwd1'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['pwd1'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd1" name="wpsg[register][register_pwd1]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['pwd2'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['pwd2'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd2" name="wpsg[register][register_pwd2]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="geb" class="wpsg_register"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[register][geb]" value="<?php echo htmlspecialchars($this->view['data']['geb']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="fax" class="wpsg_register"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[register][fax]" value="<?php echo htmlspecialchars($this->view['data']['fax']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="tel" class="wpsg_register"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[register][tel]" value="<?php echo htmlspecialchars($this->view['data']['tel']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_register"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[register][strasse]" value="<?php echo htmlspecialchars($this->view['data']['strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars($this->view['data']['plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpsg_register"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[register][ort]" value="<?php echo htmlspecialchars($this->view['data']['ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_register"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[register][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc($l['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_ustidnr" class="wpsg_register"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[register][ustidnr]" value="<?php echo htmlspecialchars($this->view['data']['ustidnr']); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['data']['custom'][$c_id]); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['data']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="0" />
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
+ <span class="wpsg_clear"></span>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+ <?php /* versteckte Sicherheitsabfrage als Bot-Schutz START*/ ?>
+ <span style="display:none">
+ <label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
+ <input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
+ </span>
+ <?php /* versteckte Sicherheitsabfrage als Bot-Schutz ENDE*/ ?>
+
+ <br />
+
+ <input type="submit" class="wpsg_button wpsg_registerButton" value="<?php echo __('Registrieren', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_register" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ <div class="wpsg_clear"></div>
+ </form>
+</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/settings_edit.phtml b/views/mods/mod_kundenverwaltung/settings_edit.phtml new file mode 100644 index 0000000..aa472e2 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/settings_edit.phtml @@ -0,0 +1,85 @@ +<?php
+
+ /**
+ * Template für die Einstellungen des Kundenverwaltungsdialoges
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_perpage', __('Kunden pro Seite (Backend)', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_perpage'), array('help' => 'wpsg_mod_kundenverwaltung_perpage')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutLogin', __('Login in Checkout integrieren', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutLogin')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegister', __('Registrierung im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegister')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand', __('Registrierungzwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_loginZwang', __('Loginzwang im Checkout (für Neukunden)', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_loginZwang'), array('help' => 'wpsg_mod_kundenverwaltung_loginZwang')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectlogin', __('Weiterleitung nach Login', 'wpsg'), array(
+ '0' => __('Auf Profilseite leiten', 'wpsg'),
+ '1' => __('Auf aktueller Seite bleiben', 'wpsg')
+), $this->get_option('wpsg_mod_kundenverwaltung_redirectlogin'), array('help' => 'wpsg_mod_kundenverwaltung_redirectlogin')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectLogout', __('Weiterleitung nach Logout', 'wpsg'), array(
+ '0' => __('Auf Profilseite leiten', 'wpsg'),
+ '1' => __('Auf aktueller Seite bleiben', 'wpsg')
+), $this->get_option('wpsg_mod_kundenverwaltung_redirectLogout'), array('help' => 'wpsg_mod_kundenverwaltung_redirectLogout')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_status', __('Status nach Registrierung', 'wpsg'), array('inaktiv', 'aktiv'), $this->get_option('wpsg_page_mod_kundenverwaltung_status'), array('help' => 'wpsg_mod_kundenverwaltung_status')); ?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""> </label>
+ </div>
+ <div class="wpsg_form_right">
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie alle Kunden auf Aktiv setzen möchten?', 'wpsg'); ?>')) return false;" style="float:left;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_kundenverwaltung&wpsg_mod_kundenverwaltung_setActiv=1&noheader=1"><?php echo __('Alle Kunden auf Aktiv setzen.', 'wpsg'); ?></a>
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie alle Kunden auf Inaktiv setzen möchten?', 'wpsg'); ?>')) return false;" style="float:right; margin-right:25px;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_kundenverwaltung&wpsg_mod_kundenverwaltung_setInactiv=1&noheader=1"><?php echo __('Alle Kunden auf Inaktiv setzen.', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_profil', __('Profilseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_profil')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_registrierung', __('Registrierungsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_registrierung')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung', __('Weiterleitung nach Registrierung', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_order', __('Bestellübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_order')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_onlylogin', __('Bestellungen nur für registrierte Kunden zulassen', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_onlylogin'), array('help' => 'wpsg_mod_kundenverwaltung_onlylogin')); ?>
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_wpuser', __('Wordpress User koppeln', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_wpuser'), array('help' => 'wpsg_mod_kundenverwaltung_wpuser_role')); ?>
+<div id="wpsg_mod_kundenverwaltung_wpuser_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_wpuser_role', __('Benutzerrolle', 'wpsg'), $this->view['arRoles'], $this->get_option('wpsg_mod_kundenverwaltung_wpuser_role')); ?>
+
+</div>
+
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_aweber', __('AWeber Integration', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber'), array('help' => 'wpsg_mod_kundenverwaltung_aweber')); ?>
+<div id="wpsg_mod_kundenverwaltung_aweber_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_formid', __('AWeber meta_web_form_id', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_formid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_listname', __('AWeber listname', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_listname')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_metaAdtracking', __('AWeber meta_adtracking', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_metaAdtracking')); ?>
+
+</div>
+
+<br />
+<div class="wpsg_hinweis">
+ <?php echo wpsg_translate(__('Die Einstellungen für die E-Mails (Betreff, Absender, CC) können in der <a href="#1#">E-Mail Konfiguration</a> durchgeführt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf'); ?>
+</div>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_kundenverwaltung_wpuser').bind('change', function() {
+
+ if (jQuery(this).attr("checked") == "checked") jQuery('#wpsg_mod_kundenverwaltung_wpuser_layer').show();
+ else jQuery('#wpsg_mod_kundenverwaltung_wpuser_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_kundenverwaltung_aweber').bind('change', function() {
+
+ if (jQuery(this).attr('checked') == 'checked') jQuery('#wpsg_mod_kundenverwaltung_aweber_layer').show();
+ else jQuery('#wpsg_mod_kundenverwaltung_aweber_layer').hide();
+
+ } ).change();
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/widget.phtml b/views/mods/mod_kundenverwaltung/widget.phtml new file mode 100644 index 0000000..71129d9 --- /dev/null +++ b/views/mods/mod_kundenverwaltung/widget.phtml @@ -0,0 +1,50 @@ +<?php
+
+ /**
+ * Template für das Login Widget
+ */
+
+?>
+<div class="wpsg_mod_kundenverwaltung_widget widget">
+
+
+ <?php if ($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn')) { ?>
+
+ <h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
+
+ <p><?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), $_SESSION['wpsg']['checkout']['vname'], $_SESSION['wpsg']['checkout']['name']); ?></p>
+ <ul class="menu" id="wpsg_mod_kundenverwaltung_seitenmenu">
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_PROFIL); ?>"><?php echo __('Profil bearbeiten', 'wpsg'); ?></a></li>
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_ORDER); ?>"><?php echo __('Bestellungen', 'wpsg'); ?></a></li>
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_LOGOUT); ?>"><?php echo __('Abmelden', 'wpsg'); ?></a></li>
+ </ul>
+ <br />
+
+ <div class="wpsg_clear"></div>
+
+ <?php } else { ?>
+
+ <form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_PROFIL); ?>">
+
+ <h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
+
+ <input type="text" value="<?php echo __('E-Mail', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_email" name="wpsg[mod_kundenverwaltung][email]" />
+ <input type="password" value="<?php echo __('Passwort', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_passwort" name="wpsg[mod_kundenverwaltung][password]" />
+
+ <br /><br />
+
+ <input type="submit" id="wpsg_mod_kundenverwaltung_widget_login" name="wpsg_mod_kundenverwaltung_login" value="<?php echo __('Anmelden', 'wpsg'); ?>" />
+
+ <input type="hidden" name="wpsg_referer" value="<?php echo $this->getCurrentURL(); ?>" />
+
+ <div class="wpsg_mod_kundenverwaltung_pwdlink">
+ <a href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>"><?php echo __('Passwort vergessen?', 'wpsg'); ?></a>
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+ <?php } ?>
+
+</div>
\ No newline at end of file |
