diff options
Diffstat (limited to 'views/mods/mod_request')
| -rw-r--r-- | views/mods/mod_request/adminmail.phtml | 22 | ||||
| -rw-r--r-- | views/mods/mod_request/adminmail_html.phtml | 21 | ||||
| -rw-r--r-- | views/mods/mod_request/customermail.phtml | 16 | ||||
| -rw-r--r-- | views/mods/mod_request/customermail_html.phtml | 15 | ||||
| -rw-r--r-- | views/mods/mod_request/product_bottom.phtml | 43 | ||||
| -rw-r--r-- | views/mods/mod_request/produkt_edit_allgemein.phtml | 13 | ||||
| -rw-r--r-- | views/mods/mod_request/requestmail.phtml | 116 | ||||
| -rw-r--r-- | views/mods/mod_request/requestmail_html.phtml | 202 | ||||
| -rw-r--r-- | views/mods/mod_request/requestpage.phtml | 412 | ||||
| -rw-r--r-- | views/mods/mod_request/settings_edit.phtml | 23 |
10 files changed, 883 insertions, 0 deletions
diff --git a/views/mods/mod_request/adminmail.phtml b/views/mods/mod_request/adminmail.phtml new file mode 100644 index 0000000..c577018 --- /dev/null +++ b/views/mods/mod_request/adminmail.phtml @@ -0,0 +1,22 @@ +<?php
+
+ /**
+ * Text E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = false;
+ $time = time();
+
+?><?php echo __('Hallo Administrator,', 'wpsg'); ?>
+
+<?php echo wpsg_translate(__('Das Anfrageformular auf der Homepage wurde am #1# um #2# Uhr', 'wpsg'), date('d.m.Y', $time), date('H:i', $time)); ?>
+<?php echo __('mit folgenden Daten ausgefüllt:', 'wspg'); ?>
+
+<?php echo __('Produktdaten', 'wpsg'); ?>:
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail.phtml'); ?>
+
+<?php echo __('Weitere Informationen', 'wpsg'); ?>:
+
+<?php echo wpsg_pad_right(__('REMOTE IP', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left($_SERVER['REMOTE_ADDR'], 46); ?>
+<?php echo wpsg_pad_right(__('UserAgent', 'wpsg').':', 30); ?>
+<?php echo wpsg_getStr($_SERVER['HTTP_USER_AGENT']); ?>
\ No newline at end of file diff --git a/views/mods/mod_request/adminmail_html.phtml b/views/mods/mod_request/adminmail_html.phtml new file mode 100644 index 0000000..60de79f --- /dev/null +++ b/views/mods/mod_request/adminmail_html.phtml @@ -0,0 +1,21 @@ +<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<p><?php echo __('Hallo Administrator', 'wpsg'); ?>,</p>
+<p><?php echo wpsg_translate(__('Das Anfrageformular auf der Homepage wurde am #1# um #2# Uhr', 'wpsg'), date('d.m.Y', $time), date('H:i', $time)); ?></p>
+
+<h2><?php echo __('Produktdaten', 'wpsg'); ?>:</h2>
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail_html.phtml'); ?>
+
+<h2><?php echo __('Weitere Informationen', 'wpsg'); ?>:</h2>
+<p>
+ <strong><?php echo __('REMOTE IP', 'wpsg'); ?>:</strong> <?php echo wpsg_pad_left($_SERVER['REMOTE_ADDR'], 46); ?><br />
+ <strong><?php echo __('UserAgent', 'wpsg'); ?>:</strong> <?php echo wpsg_getStr($_SERVER['HTTP_USER_AGENT']); ?>
+</p>
\ No newline at end of file diff --git a/views/mods/mod_request/customermail.phtml b/views/mods/mod_request/customermail.phtml new file mode 100644 index 0000000..f75f6fc --- /dev/null +++ b/views/mods/mod_request/customermail.phtml @@ -0,0 +1,16 @@ +<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), wpsg_getStr($this->view['requestlist']['customer']['vname']), wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>,
+
+<?php echo wpsg_translate(__('Vielen Dank für Ihre Anfrage. Wir werden uns umgehend bei ihnen melden.', 'wpsg')); ?>
+
+<?php echo __('Produktdaten', 'wpsg'); ?>:
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail.phtml'); ?>
\ No newline at end of file diff --git a/views/mods/mod_request/customermail_html.phtml b/views/mods/mod_request/customermail_html.phtml new file mode 100644 index 0000000..388ad1a --- /dev/null +++ b/views/mods/mod_request/customermail_html.phtml @@ -0,0 +1,15 @@ +<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), wpsg_getStr($this->view['requestlist']['customer']['vname']), wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>,</p>
+<p><?php echo wpsg_translate(__('Vielen Dank für Ihre Anfrage. Wir werden uns umgehend bei ihnen melden.', 'wpsg')); ?></p>
+
+<h2><?php echo __('Produktdaten', 'wpsg'); ?>:</h2>
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail_html.phtml'); ?>
\ No newline at end of file diff --git a/views/mods/mod_request/product_bottom.phtml b/views/mods/mod_request/product_bottom.phtml new file mode 100644 index 0000000..314a8ac --- /dev/null +++ b/views/mods/mod_request/product_bottom.phtml @@ -0,0 +1,43 @@ +<?php
+
+ /**
+ * Integration des Anfragemoduls in die Produkttemplates
+ * Hier wird nicht der Button eingebunden sondern lediglich der JS Teil für die Anzeige im Fenster
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_request_afterinsert') == wpsg_mod_request::ACTION_SHOWREQUESTPAGELB) { ?>
+<script type="text/javascript">/* <![CDATA[ */ +
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_add_requestlist_<?php echo $this->view['wpsg_mod_request']['template_index']; ?>').bind('click', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>',
+ data:
+ {
+ wpsg_form_data: jQuery('#wpsg_produktform_<?php echo $this->getTemplateIndex(); ?>').serialize(),
+ 'wpsg[ajax]': '1',
+ 'wpsg[submit_request]': '1'
+ },
+ success: function(data)
+ {
+
+ if (jQuery('#wpsg_requestdiv').length <= 0) jQuery('body').append('<div id="wpsg_requestdiv" style="display:none;"></div>');
+
+ jQuery('#wpsg_requestdiv').html(data);
+
+ tb_show('<?php echo __('Ihre Anfrageliste', 'wpsg'); ?>', '#TB_inline?inlineId=wpsg_requestdiv&height=500');
+
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } ); + +/* ]]> */</script>
+<?php } ?>
\ No newline at end of file diff --git a/views/mods/mod_request/produkt_edit_allgemein.phtml b/views/mods/mod_request/produkt_edit_allgemein.phtml new file mode 100644 index 0000000..3d97432 --- /dev/null +++ b/views/mods/mod_request/produkt_edit_allgemein.phtml @@ -0,0 +1,13 @@ +<?php
+
+ /**
+ * Template für die Integration des Anfragemoduls in die Produktverwaltung
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_set', __('AnfrageProdukt', 'wpsg'), array(
+ wpsg_mod_request::TYP_NO => __('Nein', 'wpsg'),
+ wpsg_mod_request::TYP_YES => __('Ja, ohne Warenkorbfunktion', 'wpsg'),
+ wpsg_mod_request::TYP_YESWITHBASKET => __('Ja, mit zusätzlicher Warenkorbfunktion', 'wpsg')
+), $this->view['oProduct']->getMeta('wpsg_mod_request_set'), array('help' => 'wpsg_mod_request_set')); ?>
\ No newline at end of file diff --git a/views/mods/mod_request/requestmail.phtml b/views/mods/mod_request/requestmail.phtml new file mode 100644 index 0000000..fb98558 --- /dev/null +++ b/views/mods/mod_request/requestmail.phtml @@ -0,0 +1,116 @@ +<?php
+
+ /**
+ * Text E-Mail Template für die Daten der Anfrage
+ * wird von adminmail.phtml und customermail.phtml verwendet
+ */
+
+?><?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { $prod_col = 25; } else { $prod_col = 35; } ?>
+
+<?php echo wpsg_pad_right(__('Pos', 'wpsg'), 5); ?>
+<?php echo wpsg_pad_right(__('Produkt', 'wpsg'), $prod_col); ?>
+<?php echo wpsg_pad_left(__('Stückpreis', 'wpsg').' ', 15); ?>
+<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(__('MwSt.', 'wpsg').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Anzahl', 'wpsg'), 6); ?>
+<?php echo wpsg_pad_left(__('Summe', 'wpsg'), 15); ?>
+----------------------------------------------------------------------------
+<?php $i = 0; foreach ((array)$this->view['requestlist']['products'] as $product_index => $request_product) { $i ++; ?>
+<?php echo wpsg_pad_right($i.'.', 5); ?>
+<?php echo wpsg_pad_right(((wpsg_isSizedString($request_product['product_data']['detailname']))?$request_product['product_data']['detailname']:$request_product['product_data']['name']), $prod_col); ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')).' ', 15); ?>
+<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['product_data']['mwst_value'], '%').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_left($request_product['amount'], 6); ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')), 15); ?>
+<?php /* Variantenanzeige im Produkt BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo __('Variante', 'wpsg'); ?>: <?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?>
+<?php } ?>
+<?php /* Variantenanzeige im Produkt ENDE */ ?>
+<?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo __('Gewicht', 'wpsg'); ?>: <?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+<?php /* Produktvariablen BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['pv'])) { ?>
+<?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo wpsg_hspc($pv['name']); ?>: <?php if ($pv['typ'] === '3') { ?>
+<?php if (wpsg_isSizedInt($request_product['pv'][$pv['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+<?php } else { ?>
+<?php echo $request_product['pv'][$pv['id']]; ?>
+<?php } ?>
+<?php } ?>
+<?php } ?>
+<?php /* Produktvariablen ENDE */ ?>
+<?php } ?>
+
+<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+<?php echo wpsg_pad_right(wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+<?php echo wpsg_pad_right(wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+
+<?php echo wpsg_pad_right(__('Gesamtgewicht', 'wpsg').': ', 26 + $prod_col); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')), 15); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige ENDE */ ?>
+<?php /* Bestellvariablen BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+<?php echo __('Zusätzliche Angaben', 'wpsg'); ?>:
+
+<?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+<?php echo wpsg_pad_right(wpsg_hspc($ov['name']).': ', 30); ?><?php if ($ov['typ'] === '3') { ?>
+<?php if (wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left($this->view['requestlist']['ov'][$ov['id']], 46); ?>
+<?php } ?>
+<?php } ?>
+<?php } ?>
+<?php /* Bestellvariablen ENDE */ ?>
+
+
+<?php if (wpsg_isSizedString($this->view['requestlist']['customer']['comment'])) { ?>
+<?php echo __('Kommentar', 'wpsg'); ?>:
+<?php echo wpsg_getStr($this->view['requestlist']['customer']['comment']); ?>
+<?php }?>
+<?php echo __('Kontaktdaten', 'wpsg'); ?>:
+
+<?php echo wpsg_pad_right(__('Firma', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['firma']), 46); ?>
+<?php echo wpsg_pad_right(__('Anrede', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['title']), 46); ?>
+<?php echo wpsg_pad_right(__('Vorname', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['vname']), 46); ?>
+<?php echo wpsg_pad_right(__('Name', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['name']), 46); ?>
+<?php echo wpsg_pad_right(__('E-Mail', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['email']), 46); ?>
+<?php echo wpsg_pad_right(__('Fax', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['fax']), 46); ?>
+<?php echo wpsg_pad_right(__('Tel.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['tel']), 46); ?>
+<?php echo wpsg_pad_right(__('Strasse', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['strasse']), 46); ?>
+<?php echo wpsg_pad_right(__('PLZ', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['plz']), 46); ?>
+<?php echo wpsg_pad_right(__('Ort', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ort']), 46); ?>
+<?php echo wpsg_pad_right(__('UStIdNr.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ustidnr']), 46); ?>
+<?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+<?php echo wpsg_pad_right(__($c['name'], 'wpsg').': ', 30); ?><?php if ($c['typ'] == '2') { ?>
+<?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]), 46); ?>
+<?php } ?>
+<?php } } ?>
+<?php } ?>
+<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
\ No newline at end of file diff --git a/views/mods/mod_request/requestmail_html.phtml b/views/mods/mod_request/requestmail_html.phtml new file mode 100644 index 0000000..6fc20fa --- /dev/null +++ b/views/mods/mod_request/requestmail_html.phtml @@ -0,0 +1,202 @@ +<?php
+
+ /**
+ * HTML E-Mail Template für die Daten der Anfrage
+ * wird von adminmail_html.phtml und customermail_html.phtml verwendet
+ */
+
+?>
+<div class="baskettable_wrap">
+ <table class="baskettable" cellpadding="2" cellspacing="0" style="cell-padding:4px;">
+ <tr>
+ <td><?php echo __('Pos', 'wpsg'); ?></td>
+ <td><?php echo __('Produkt', 'wpsg'); ?></td>
+ <td><?php echo __('Stückpreis', 'wpsg'); ?></td>
+ <?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td><?php echo __('MwSt.', 'wpsg'); ?></td>
+ <?php } ?>
+ <td><?php echo __('Anzahl', 'wpsg'); ?></td>
+ <td class="col_sum"><?php echo __('Summe', 'wpsg'); ?></td>
+ </tr>
+ <?php $i = 0; foreach ((array)$this->view['requestlist']['products'] as $product_index => $request_product) { $i ++; ?>
+ <tr>
+ <td><?php echo $i; ?>.</td>
+ <td><?php echo ((wpsg_isSizedString($request_product['product_data']['detailname']))?$request_product['product_data']['detailname']:$request_product['product_data']['name']); ?></td>
+ <td><?php echo wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')); ?></td>
+ <?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td><?php echo wpsg_ff($request_product['product_data']['mwst_value'], '%'); ?></td>
+ <?php } ?>
+ <td><?php echo $request_product['amount']; ?></td>
+ <td class="col_sum"><?php echo wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+
+ <?php /* Variantenanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+ <tr>
+ <td colspan="2"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>"><?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Variantenanzeige im Produkt ENDE */ ?>
+
+ <?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+ <tr>
+ <td colspan="2"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>"><?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+
+ <?php /* Produktvariablen BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['pv'])) { ?>
+ <?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+ <tr>
+ <td colspan="2"><?php echo wpsg_hspc($pv['name']); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>">
+ <?php if ($pv['typ'] === '3') { ?>
+ <?php if (wpsg_isSizedInt($request_product['pv'][$pv['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc($request_product['pv'][$pv['id']]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktvariablen ENDE */ ?>
+
+ <?php } ?>
+ <tr><td colspan="<?php echo (5 + $this->view['addColspan']); ?>"> </td></tr>
+
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $tax['name']); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $tax['name']); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Gewichtsanzeige BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+ <tr><td colspan="<?php echo (5 + $this->view['addColspan']); ?>"> </td></tr>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtgewicht', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ </table>
+</div>
+
+<?php /* Bestellvariablen BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+<h2><?php echo __('Zusätzliche Angaben', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo wpsg_hspc($ov['name']); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1">
+ <?php if ($ov['typ'] === '3') { ?>
+ <?php if (wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc($this->view['requestlist']['ov'][$ov['id']]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } ?>
+<?php /* Bestellvariablen ENDE */ ?>
+
+<?php if (wpsg_isSizedString($this->view['requestlist']['customer']['comment'])) { ?>
+<h2><?php echo __('Kommentar', 'wpsg'); ?>:</h2>
+<p><?php echo wpsg_getStr($this->view['requestlist']['customer']['comment']); ?></p>
+<?php } ?>
+
+<h2><?php echo __('Kontaktdaten', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <?php
+
+ // Hilfsarray, damit ich nicht so viel schreiben muss
+ $arFields = array(
+ 'firma' => __('Firma', 'wpsg'),
+ 'title' => __('Anrede', 'wpsg'),
+ 'vname' => __('Vorname', 'wpsg'),
+ 'name' => __('Name', 'wpsg'),
+ 'email' => __('E-Mail', 'wpsg'),
+ 'fax' => __('Fax', 'wpsg'),
+ 'tel' => __('Tel.', 'wpsg'),
+ 'strasse' => __('Strasse', 'wpsg'),
+ 'plz' => __('PLZ', 'wpsg'),
+ 'ort' => __('Ort', 'wpsg'),
+ 'ustidnr' => __('UStIdNr.', 'wpsg')
+ );
+
+ ?>
+ <?php foreach ($arFields as $field_name => $label) { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo wpsg_hspc($label); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php
+
+ if ($field_name == "email")
+ {
+
+ echo '<a href="mailto:'.wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name])).'">'.wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name])).'</a>';
+
+ }
+ else
+ {
+
+ echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name]));
+
+ }
+
+ ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __($c['name'], 'wpsg'); ?></td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1">
+ <?php if ($c['typ'] == '2') { ?>
+ <?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+
+</table>
\ No newline at end of file diff --git a/views/mods/mod_request/requestpage.phtml b/views/mods/mod_request/requestpage.phtml new file mode 100644 index 0000000..1060635 --- /dev/null +++ b/views/mods/mod_request/requestpage.phtml @@ -0,0 +1,412 @@ +<?php
+
+ /**
+ * Template für die Anfrageseite
+ */
+
+
+ //wpsg_debug($this->view['requestlist']);
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
+
+ if (typeof jQuery.validationEngine == "object")
+ {
+
+ jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", 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_requestbutton').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 } ?>
+
+ jQuery('.wpsg_checkout input').bind('keyup', function(e) {
+
+ if(e.keyCode == 13)
+ {
+ jQuery('#wpsg_checkout2button').click();
+ }
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+<div class="wpsg_mod_request_requestpage">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php if (wpsg_isSizedArray($this->view['requestlist']['products'])) { ?>
+
+ <form id="wpsg_requestpage_form" name="wpsg_requestpage_form" method="post" action="<?php echo $this->callMod('wpsg_mod_request', 'getRequestPageUrl'); ?>">
+
+ <h2><?php echo __('Produkte auf Ihrer Anfrageliste', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <table>
+ <thead>
+ <tr>
+ <th class="wpsg_cell_action"> </th>
+ <th class="wpsg_cell_amount"><?php echo __('Anzahl', 'wpsg'); ?></th>
+ <th class="wpsg_cell_price"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+ <?php if (wpsg_isSizedInt($this->view['addColspan'])) { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_sumprice"><?php echo __('Gesamtpreis', 'wpsg'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <?php foreach ($this->view['requestlist']['products'] as $request_product) { ?>
+ <tr class="wpsg_row_product1">
+ <td class="wpsg_cell_action" rowspan="<?php echo (2 + $request_product['addRowspan']); ?>">
+
+ <a class="wpsg_requestpage_removelink" href="<?php echo $this->callMod('wpsg_mod_request', 'getRemoveLinkURL', array($request_product['product_index'])); ?>" title="<?php echo __('Produkt von Anfrageliste entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie das Produkt aus der Anfrageliste entfernen möchten?', 'wpsg'); ?>');">
+ <img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" />
+ </a>
+
+ </td>
+ <td class="wpsg_cell_name" colspan="<?php echo $this->view['addColspan'] + 3; ?>">
+
+ <?php /* Produktbild BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder') && $this->get_option('wpsg_mod_request_requestpageimage') == '1') {
+
+ if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);
+ else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($request_product['product_id']));
+
+ ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <div class="wpsg_basket_productimage">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($request_product['product_id'], array_shift($arBilder), 30, 30, 'c')); ?>" alt="<?php echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>" />
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktbild ENDE */ ?>
+
+ <?php if ($this->getProduktLink($request_product)) { ?><a href="<?php echo $this->getProduktLink($request_product); ?>"><?php } ?>
+ <?php echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>
+ <?php if ($this->getProduktLink($request_product)) { ?></a><?php } ?>
+ </td>
+ </tr>
+ <tr class="wpsg_row_product2">
+ <td class="wpsg_cell_amount">
+ <input type="text" name="wpsg[amount][<?php echo $request_product['product_index']; ?>]" value="<?php echo wpsg_hspc($request_product['amount']); ?>" size="3" />
+ </td>
+ <td class="wpsg_cell_price">
+ <?php echo wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ <?php if (wpsg_isSizedInt($this->view['addColspan'])) { ?>
+ <td class="wpsg_cell_mwst">
+ <?php echo wpsg_ff($request_product['product_data']['mwst_value'], '%'); ?>
+ </td>
+ <?php } ?>
+ <td class="wpsg_cell_sumprice">
+ <?php echo wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+
+ <?php /* Variantenanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+ <tr class="wpsg_row_product_varianten">
+ <td class="wpsg_cell_label"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>"><?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Variantenanzeige im Produkt ENDE */ ?>
+
+ <?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+ <tr class="wpsg_row_product_weight">
+ <td class="wpsg_cell_label"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>"><?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+
+
+ <?php /* Produktvariablen BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['product_data']['pv'])) { ?>
+ <?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+ <tr class="wpsg_row_product_pv">
+ <td class="wpsg_cell_label">
+ <label class="wpsg_checkout" for="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>">
+ <?php echo wpsg_hspc($pv['name']); ?>
+ <?php if (wpsg_isSizedInt($pv['pflicht'])) { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ </td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>">
+
+ <?php if ($pv['typ'] === '1') { $possible_options = explode('|', $pv['auswahl']); /* Auswahl */ ?>
+ <select id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$possible_options as $option) { ?>
+ <option value="<?php echo wpsg_hspc($option) ?>" <?php echo (($option == wpsg_hspc(wpsg_getStr($request_product['pv'][$pv['id']])))?'selected="selected"':''); ?>><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pv['typ'] === '2') { /* Text */ ?>
+ <input id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" type="text" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($request_product['pv'][$pv['id']])); ?>" />
+ <?php } else if ($pv['typ'] === '3') { /* Checkbox */ ?>
+ <input type="hidden" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="0" />
+ <input id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" type="checkbox" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="1" <?php echo ((wpsg_isSizedInt($request_product['pv'][$pv['id']]))?'checked="checked"':''); ?>/>
+ <?php } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktvariablen ENDE */ ?>
+
+ <?php } ?>
+
+ </tbody>
+ <tfoot>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_brutto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_brutto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Gewichtsanzeige BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+ <tr class="wpsg_cell_total_weight">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtgewicht', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ </tfoot>
+ </table>
+
+ <input type="submit" name="submit_requestpage_refresh" id="wpsg_requestbutton" class="wpsg_mod_request_button_refresh" value="<?php echo __('Anfrageliste aktualisieren', 'wpsg'); ?>" />
+
+ <?php /* Anfang Bestellvariablen */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+ <h2><?php echo __('Zusätzliche Angaben', 'wpsg'); ?></h2>
+ <?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_checkoutblock_<?php echo $ov['id']; ?>">
+ <?php if ($ov['typ'] === '1') { $possible_options = explode('|', $ov['auswahl']); /* Auswahl */ ?>
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?></label>:
+ <select name="wpsg[request][ov][<?php echo $ov['id']; ?>]" class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($possible_options as $option) { ?>
+ <option value="<?php echo wpsg_hspc($option) ?>" <?php echo (($option == wpsg_hspc(wpsg_getStr($this->view['requestlist']['ov'][$ov['id']])))?'selected="selected"':''); ?>><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($ov['typ'] === '2') { /* Textfeld */ ?>
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?>:</label>
+ <input type="text" class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['ov'][$ov['id']])); ?>" />
+ <?php } else if ($ov['typ'] === '3') { /* Checkbox */ ?>
+ <input type="hidden" value="0" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" />
+ <input type="checkbox" <?php echo ((wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']]))?'checked="checked"':''); ?> class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" value="1" />
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?></label>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Ende Bestellvariablen */ ?>
+
+ <h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
+
+ <div class="wpsg_checkoutblock" id="wpsg_firma">
+ <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[request][customer][firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['firma'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_anrede">
+ <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_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[request][customer][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 wpsg_hspc($t); ?>" <?php echo (($this->view['requestlist']['customer']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_vorname">
+ <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[request][customer][vname]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['vname'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_name">
+ <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[request][customer][name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_email">
+ <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="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email" name="wpsg[request][customer][email]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email'])); ?>" />
+ </div>
+
+ <?php if (wpsg_isSizedInt($this->view['pflicht']['emailconfirm'])) { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_email2">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email2" name="wpsg[request][customer][email2]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email2'])); ?>" />
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_checkoutblock" id="wpsg_geburtsdatum">
+ <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum',"wpsg"); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?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[request][customer][geb]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['geb'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_fax">
+ <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="<?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="fax" name="wpsg[request][customer][fax]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['fax'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_telefon">
+ <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="<?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="tel" name="wpsg[request][customer][tel]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['tel'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_strasse">
+ <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[request][customer][strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['strasse'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_postleitzahl">
+ <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="<?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[request][customer][plz]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['plz'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_ort">
+ <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[request][customer][ort]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ort'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_land">
+ <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[request][customer][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> 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['countries'] as $oCountry) { ?>
+ <option value="<?php echo wpsg_hspc($oCountry->id); ?>" <?php echo (($oCountry->id == $this->view['requestlist']['customer']['land'])?'selected="selected"':((!wpsg_isSizedInt($this->view['requestlist']['customer']['land']) && $this->get_option('wpsg_defaultland') == $oCountry->id)?'selected="selected"':'')); ?>><?php echo wpsg_hspc($oCountry->getName()); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_ustidnr">
+ <label for="wpsg_ustidnr" class="wpshopgermany_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[request][customer][ustidnr]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ustidnr'])); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv wpsg_checkout" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id])); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <select id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][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 == wpsg_getStr($this->view['requestlist']['customer']['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[request][customer][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[request][customer][custom][<?php echo $c_id; ?>]" value="1" <?php echo ((wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]) == '1')?'checked="checked"':''); ?> />
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+
+ <h2><?php echo __('Kommentar', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner wpsg_commentblock">
+ <textarea name="wpsg[request][customer][comment]" id="wpsg_request_comment"><?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['comment'])); ?></textarea>
+ </div>
+
+ <br />
+
+ <input type="submit" name="submit_requestpage" class="wpsg_mod_request_button_submit" value="<?php echo __('Anfrage starten', 'wpsg'); ?>" />
+
+ <br />
+
+ </form>
+
+ <?php } else { ?>
+ <p class="wpsg_mod_request_requestpage_noentrys"><?php echo __('Es befinden sich keine Produkte auf der Anfrageliste.', 'wpsg'); ?>
+ <?php } ?>
+
+</div>
\ No newline at end of file diff --git a/views/mods/mod_request/settings_edit.phtml b/views/mods/mod_request/settings_edit.phtml new file mode 100644 index 0000000..174cbf1 --- /dev/null +++ b/views/mods/mod_request/settings_edit.phtml @@ -0,0 +1,23 @@ +<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "AnfrageProdukte"
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_page', __('Anfrageseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_page'), array ('help' => 'wpsg_mod_request_page')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_redirect', __('Weiterleitung nach Anfrage', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_redirect'), array ('help' => 'wpsg_mod_request_redirect')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_afterinsert', __('Nach neuem Produkt auf Merkliste', 'wpsg'), array(
+ wpsg_mod_request::ACTION_STAYONPAGE => __('Auf Seite bleiben', 'wpsg'),
+ wpsg_mod_request::ACTION_GOTOREQUESTPAGE => __('Zur Anfrageseite leiten', 'wpsg'),
+ wpsg_mod_request::ACTION_SHOWREQUESTPAGELB => __('Anfrageseite im Fenster anzeigen', 'wpsg')
+), $this->get_option('wpsg_mod_request_afterinsert'), array ('help' => 'wpsg_mod_request_afterinsert')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_customerdata', __('Zusätzliche Kundendaten mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_customerdata'), array('help' => 'wpsg_mod_request_customerdata')); ?>
+<?php if ($this->hasMod('wpsg_mod_ordervars')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_ordervars', __('Bestellvariablen mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_ordervars'), array('help' => 'wpsg_mod_request_ordersvar')); ?>
+<?php } ?>
+<?php if ($this->hasMod('wpsg_mod_productvars')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_productvars', __('Produktvariablen mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_productvars'), array('help' => 'wpsg_mod_request_productvars')); ?>
+<?php } ?>
\ No newline at end of file |
