diff options
| author | hartmut <noreply@maennchen1.de> | 2017-09-06 09:24:14 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2017-09-06 09:24:14 +0000 |
| commit | d8343a3f9d80fb5a397234cee15f63fcb8c47764 (patch) | |
| tree | b898ef9cfe467694e2288078e63b9e91ce13628d /views/warenkorb/overview.phtml | |
| parent | 023850374d0c1647768f72657339acc864cd20c8 (diff) | |
Korrektur Produktbilder->ImageHandler
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6454 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/warenkorb/overview.phtml')
| -rw-r--r-- | views/warenkorb/overview.phtml | 29 |
1 files changed, 9 insertions, 20 deletions
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 @@ <?php $this->view['$bPicture'] = false; ?>
- <?php if ($this->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'])));
+ <?php if ($this->get_option('wpsg_imagehandler_basketimage') == '1') {
?>
<div class="productimage">
- <?php if (wpsg_isSizedString($arImages[0]['guid'])) { ?>
<?php
+
if (isset($product_data['product_key'])) {
- $arr = $this->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 "<img src=".$url." alt='' />";
+ if ($attachmentID > 0) $this->view['$bPicture'] = true;
+
?>
- <?php } ?>
</div>
<?php } ?>
|
