diff options
| author | hartmut <noreply@maennchen1.de> | 2017-09-11 12:54:43 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2017-09-11 12:54:43 +0000 |
| commit | fe729d467d24bd2025f845efc83bfdec4de131ae (patch) | |
| tree | 6a1d97f0a54838558df71863b479a269cdda576a /views/warenkorb/ajaxDialog.phtml | |
| parent | a48b279544268da05a2260ad3de97fd5f257fa9d (diff) | |
Korrektur Produktbilder->ImageHandler
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6491 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/warenkorb/ajaxDialog.phtml')
| -rw-r--r-- | views/warenkorb/ajaxDialog.phtml | 28 |
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>
|
