From d8343a3f9d80fb5a397234cee15f63fcb8c47764 Mon Sep 17 00:00:00 2001 From: hartmut Date: Wed, 6 Sep 2017 09:24:14 +0000 Subject: Korrektur Produktbilder->ImageHandler git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6454 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/warenkorb/overview.phtml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'views/warenkorb/overview.phtml') diff --git a/views/warenkorb/overview.phtml b/views/warenkorb/overview.phtml index ef87d99..932adfb 100644 --- a/views/warenkorb/overview.phtml +++ b/views/warenkorb/overview.phtml @@ -122,35 +122,24 @@ view['$bPicture'] = false; ?> - get_option('wpsg_imagehandler_basketimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) { - - if (wpsg_isSizedString($product_data['varianten_image'])) $arImages = array($product_data['varianten_image']); - else $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktID($product_data['id']))); + get_option('wpsg_imagehandler_basketimage') == '1') { ?>
- callMod('wpsg_mod_productvariants', 'getKombiVariImages', array($product_data['product_key'])); - if (wpsg_isSizedArray($arr)) - { - $ais = wp_get_attachment_image_src($arr[0]['post_id'], 'thumbnail'); - $url = $ais[0]; - } - else - { - $url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($product_data['productkey'], 'thumbnail')); - } - } else { - $url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($product_data['productkey'], 'thumbnail')); + $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($product_data['product_key']); + $attachmentID = $this->imagehandler->getAttachmentID($product_data['product_key']); + + echo wp_get_attachment_image($attachmentID, 'medium'); + } - if (wpsg_isSizedString($url)) $this->view['$bPicture'] = true; - echo ""; + if ($attachmentID > 0) $this->view['$bPicture'] = true; + ?> -
-- cgit v1.2.3