summaryrefslogtreecommitdiff
path: root/views/warenkorb
diff options
context:
space:
mode:
Diffstat (limited to 'views/warenkorb')
-rw-r--r--views/warenkorb/ajaxDialog.phtml28
1 files changed, 17 insertions, 11 deletions
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>