summaryrefslogtreecommitdiff
path: root/views/mods/mod_request/requestpage.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_request/requestpage.phtml')
-rw-r--r--views/mods/mod_request/requestpage.phtml113
1 files changed, 64 insertions, 49 deletions
diff --git a/views/mods/mod_request/requestpage.phtml b/views/mods/mod_request/requestpage.phtml
index af6396d..61b96db 100644
--- a/views/mods/mod_request/requestpage.phtml
+++ b/views/mods/mod_request/requestpage.phtml
@@ -18,9 +18,9 @@
{
jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
-
+
jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
- jQuery("#form-step2").validationEngine('detach');
+ jQuery("#form-step2").validationEngine('detach');
});
}
@@ -29,23 +29,23 @@
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( {
+ jQuery("#form-step2").validate( {
ignore: '',
errorClass: 'wpsg_error',
onsubmit: false,
showErrors: function(errorMap, errorList) {
- this.defaultShowErrors();
+ this.defaultShowErrors();
}
- } );
+ } );
- jQuery('#wpsg_requestbutton').bind('click', function() {
+ 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 } ?>
@@ -60,7 +60,7 @@
} );
} );
-
+
/* ]]> */</script>
<div class="wpsg_mod_request_requestpage">
@@ -83,7 +83,7 @@
<?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>
+ <th class="wpsg_cell_sumprice"><?php echo __('Gesamtpreis', 'wpsg'); ?></th>
</tr>
</thead>
<tbody>
@@ -100,17 +100,32 @@
<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') {
+ <?php if ($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_MT', array($request_product['product_id']));
+ //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_MT', array($request_product['product_id']));
+
+ if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);
+ else {
+
+ if (isset($request_product['product_data']['product_key'])) {
+ //$image = $this->imagehandler->getAttachmentID($this->view['product_data']['product_key']);
+ $image = $this->imagehandler->getAttachmentID($request_product['product_data']['product_key']);
+ } else {
+ $arImages = $this->imagehandler->getAttachmentIDs($request_product['product_data']['product_id']);
+ $image = $arImages[0];
+ }
+
+ }
+ //if (wpsg_isSizedString($image)) echo wp_get_attachment_image($image, 'medium', false, array());
?>
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <?php if (wpsg_isSizedString($image)) { ?>
<div class="wpsg_basket_productimage">
- <?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
- <?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
- <img src="<?php echo $href[0]; ?>" width="30" height="30" alt="<?php echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>" />
+ <?php //$href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
+ <?php //$imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
+ <?php echo wp_get_attachment_image($image, array(50, 50), false, array()); ?>
+ <?php //echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>
</div>
<?php } ?>
<?php } ?>
@@ -123,7 +138,7 @@
</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" />
+ <input type="text" style="padding:0.3em;" 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')); ?>
@@ -152,7 +167,7 @@
<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>
+ </tr>
<?php } ?>
<?php /* Gewichtsanzeige im Produkt ENDE */ ?>
@@ -174,7 +189,7 @@
<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 } ?>
+ <?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']])); ?>" class="<?php echo ((in_array("pv_".$pv['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" />
@@ -182,7 +197,7 @@
<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"':''); ?> class="<?php echo ((in_array("pv_".$pv['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" />
<?php } ?>
-
+
</td>
</tr>
<?php } ?>
@@ -190,8 +205,8 @@
<?php /* Produktvariablen ENDE */ ?>
<?php } ?>
-
- </tbody>
+
+ </tbody>
<tfoot>
<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
<tr class="wpsg_cell_total_price">
@@ -224,16 +239,16 @@
</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'])) { ?>
+ <?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']; ?>">
+ <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'])) { ?>&nbsp;<span class="wpsg_required">*</span><?php } ?></label>:
+ <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'])) { ?>&nbsp;<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) { ?>
@@ -247,16 +262,16 @@
<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 } ?>
+ </div>
<?php } ?>
<?php } ?>
<?php /* Ende Bestellvariablen */ ?>
- <h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
-
+ <h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
+
<div class="wpsg_checkoutblock" id="wpsg_firma">
- <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <label for="wpsg_firma" class="wpsg_checkout"><?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'])); ?>" />
@@ -269,12 +284,12 @@
<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['requestlist']['customer']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
- <?php } ?>
+ <?php } ?>
</select>
</div>
<div class="wpsg_checkoutblock" id="wpsg_vorname">
- <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
+ <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'])); ?>" />
@@ -288,7 +303,7 @@
</div>
<div class="wpsg_checkoutblock" id="wpsg_email">
- <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <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'])); ?>" />
@@ -296,7 +311,7 @@
<?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"); ?>
+ <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'])); ?>" />
@@ -309,7 +324,7 @@
</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 } ?>:
@@ -325,30 +340,30 @@
</div>
<div class="wpsg_checkoutblock" id="wpsg_strasse">
- <label for="strasse" class="wpsg_checkout"><?php echo __("Straße Nr.", "wpsg"); ?>
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Straße 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"); ?>
+ <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"); ?>
+ <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"); ?>
+ <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>
+ </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) { ?>
@@ -358,7 +373,7 @@
</div>
<div class="wpsg_checkoutblock" id="wpsg_ustidnr">
- <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <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'])); ?>" />
@@ -370,8 +385,8 @@
<div class="wpsg_checkoutblock">
<label class="wpsg_cv wpsg_checkout" 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 } ?>:
- </label>
- <?php if ($c['typ'] == '0') { // Textfeld ?>
+ </label>
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
<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 if ($c['show'] == '0') { ?>
@@ -382,15 +397,15 @@
<?php } ?>
</select>
<?php } else if ($c['typ'] == '2') { // Checkbox ?>
- <input type="hidden" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="0" />
+ <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 } ?>
+ <?php } ?>
<?php } ?>
</div>
<?php } } ?>
<?php } ?>
<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
-
+
<h2><?php echo __('Kommentar', 'wpsg'); ?></h2>
<div class="wpsg_spacer"></div>
@@ -402,9 +417,9 @@
<br />
<input type="submit" name="submit_requestpage" class="wpsg_mod_request_button_submit" value="<?php echo __('Anfrage starten', 'wpsg'); ?>" />
-
+
<br />
-
+
</form>
<?php } else { ?>