summaryrefslogtreecommitdiff
path: root/views/mailtemplates/html/order.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mailtemplates/html/order.phtml')
-rw-r--r--views/mailtemplates/html/order.phtml17
1 files changed, 11 insertions, 6 deletions
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 } ?>