summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/admin/module.phtml2
-rw-r--r--views/mailtemplates/html/order.phtml17
-rw-r--r--views/mods/mod_request/requestpage.phtml113
-rw-r--r--views/produkttemplates/standard.phtml15
-rw-r--r--views/warenkorb/ajaxDialog.phtml28
5 files changed, 103 insertions, 72 deletions
diff --git a/views/admin/module.phtml b/views/admin/module.phtml
index 51b830e..2564940 100644
--- a/views/admin/module.phtml
+++ b/views/admin/module.phtml
@@ -131,7 +131,7 @@
<?php } ?>
- <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods']))))) { ?>
+ <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || 1))) { ?>
<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
<?php } ?>
diff --git a/views/mailtemplates/html/order.phtml b/views/mailtemplates/html/order.phtml
index 558dd3b..0b5bfbd 100644
--- a/views/mailtemplates/html/order.phtml
+++ b/views/mailtemplates/html/order.phtml
@@ -18,14 +18,19 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="padding:0px; ">
- <?php if ($this->hasMod('wpsg_mod_produktbilder') && wpsg_isSizedInt($this->get_option('wpsg_imagehandler_overviewimage'))) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($p['id']))); ?>
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_imagehandler_overviewimage'))) {
+
+ if (isset($p['product_key'])) {
+ $bild = $this->imagehandler->getAttachmentID($p['product_key']);
+ } else {
+ $arBilder = $this->imagehandler->getAttachmentIDs($this->getProduktId($p['id']));
+ $bild = $arBilder[0];
+ }
+ ?>
+ <?php if (wpsg_isSizedString($bild)) { ?>
<a style="width:50px; width:50px; margin-right:10px; float:left;" href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>">
- <?php if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']); ?>
-
- <?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(50, 50)); ?>
- <img src="<?php echo $href[0];?>" width="50" height="50" alt="" />
+ <?php echo wp_get_attachment_image($bild, Array(50, 50)); ?>
</a>
<?php } ?>
<?php } ?>
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 { ?>
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index 865634c..41bf714 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -10,9 +10,6 @@
// Damit keine Zubehörprodukte ausgegeben werden
//$this->noReleatedProducts = true;
- $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['data']['product_key']);
- $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
-
?>
<div class="wpsg_produkt_wrapper">
@@ -35,15 +32,20 @@
<div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
<?php /* Block für die Produktbilder START */ ?>
+ <?php
+ $arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']);
+ $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
+ ?>
+
<?php if (wpsg_isSizedArray($arAttachmentIDsAll)) { ?>
<div class="wpsg_productimages">
<div class="wpsg_produkt_produktbilder">
- <?php if (sizeof($arAttachmentIDsAll) > 1) { for ($i = 0; $i < sizeof($arAttachmentIDsAll); $i ++) { ?>
+ <?php if (sizeof($arAttachmentIDsAll) > 0) { for ($i = 0; $i < sizeof($arAttachmentIDsAll); $i ++) { ?>
<?php $att = wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false); ?>
<?php $att = wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(300, 300), false); ?>
- <a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentIDs[0]) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
+ <a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
<?php echo wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false, array()); ?>
</a>
<?php } } ?>
@@ -257,6 +259,9 @@
<div class="wpsg_clear"></div>
<?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
+ <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
+ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
+
<input class="wpsg_button wpsg_add_requestlist" id="wpsg_add_requestlist_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('Auf die Anfrageliste', 'wpsg'); ?>" name="wpsg[submit_request]" />
<?php } ?>
diff --git a/views/warenkorb/ajaxDialog.phtml b/views/warenkorb/ajaxDialog.phtml
index 4ac5c4f..02a2941 100644
--- a/views/warenkorb/ajaxDialog.phtml
+++ b/views/warenkorb/ajaxDialog.phtml
@@ -9,18 +9,23 @@
// $this->view['amount_basket'] // So oft befindet sich das hinzugefügte Produkt im Warenkorb
// $this->view['product_data'] // Array mit Produktdaten
// $this->view['product_index'] // Index des Produktes im Warenkorb
-
- $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['product_data']['product_id']));
- if (!wpsg_isSizedArray($arImages)) $arImages = array();
+
+ if (isset($_REQUEST['wpsg']['product_key'])) {
+ //$image = $this->imagehandler->getAttachmentID($this->view['product_data']['product_key']);
+ $image = $this->imagehandler->getAttachmentID($_REQUEST['wpsg']['product_key']);
+ } else {
+ $arImages = $this->imagehandler->getAttachmentIDs($this->view['product_data']['product_id']);
+ $image = $arImages[0];
+ }
$arBasket = $this->basket->toArray();
?>
<div class="product_add_layer">
- <?php if (wpsg_isSizedArray($arImages)) { ?>
+ <?php if (wpsg_isSizedString($image)) { ?>
<div class="wpsg_productimages">
- <?php echo wp_get_attachment_image($arImages[0]['post_id'], array(600, 600), false, array()); ?>
+ <?php echo wp_get_attachment_image($image, 'medium', false, array()); ?>
</div>
<?php } ?>
@@ -78,12 +83,13 @@
<div class="wpsg_ajaxdialog_productrow">
<h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
<a href="<?php echo $this->getProduktLink($rp_data['product_id']); ?>">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
- <?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
- <?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
+ $arImages = $this->imagehandler->getAttachmentIDs($rp_data['product_id']);
+ $image = $arImages[0];
+ ?>
+ <?php if (wpsg_isSizedString($image)) { ?>
+ <?php if (wpsg_isSizedString($image)) { ?>
+ <?php echo wp_get_attachment_image($image, 'medium', false, array()); ?>
<?php } ?>
<?php } ?>
</a>