From fe729d467d24bd2025f845efc83bfdec4de131ae Mon Sep 17 00:00:00 2001 From: hartmut Date: Mon, 11 Sep 2017 12:54:43 +0000 Subject: Korrektur Produktbilder->ImageHandler git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6491 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/admin/module.phtml | 2 +- views/mailtemplates/html/order.phtml | 17 +++-- views/mods/mod_request/requestpage.phtml | 113 +++++++++++++++++-------------- views/produkttemplates/standard.phtml | 15 ++-- views/warenkorb/ajaxDialog.phtml | 28 +++++--- 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 @@ - arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods']))))) { ?> + arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || 1))) { ?> arAllModule[$_REQUEST['modul']]->inline === true) { ?>

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 @@ - + @@ -100,17 +100,32 @@ - + @@ -174,7 +189,7 @@ - + view['error']))?'wpsg_error':''); ?>" /> @@ -182,7 +197,7 @@ class="view['error']))?'wpsg_error':''); ?>" /> - + @@ -190,8 +205,8 @@ - - + + getFrontendTaxview() == WPSG_NETTO) { ?> @@ -224,16 +239,16 @@
- 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']))); ?> - + 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]; + } + ?> + - - - - + 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, ""); 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; - + } ); @@ -60,7 +60,7 @@ } ); } ); - + /* ]]> */
@@ -83,7 +83,7 @@ view['addColspan'])) { ?>
- hasMod('wpsg_mod_produktbilder') && $this->get_option('wpsg_mod_request_requestpageimage') == '1') { + 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 echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?> + + + +
@@ -123,7 +138,7 @@
- + get_option('wpsg_currency')); ?> @@ -152,7 +167,7 @@
: get_option('wpsg_mod_weight_unit')); ?>
- + - get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?> + get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>

view['orderVars'] as $ov_index => $ov) { ?> -
+
- : + view['requestlist']['ov'][$ov['id']]))?'checked="checked"':''); ?> class=" wpsg_checkout view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_" name="wpsg[request][ov][]" value="1" /> - -
+ +
-

- +

+
-
-
-