summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2017-03-10 13:59:15 +0000
committerhartmut <noreply@maennchen1.de>2017-03-10 13:59:15 +0000
commitb1e0c46a7797401ee990d158259c277af35757c3 (patch)
tree5ac842623ac5af229e648223202c2f82af78d0d4
parent90f899dfd347a8099d126f4f73888662a28a38e4 (diff)
Korrektur
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6120 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/produkttemplates/standard.phtml34
1 files changed, 24 insertions, 10 deletions
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index af3c3e3..632f7e3 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -30,18 +30,32 @@ if (!function_exists('is_plugin_active'))
<?php /* Block für die Produktbilder START */ ?>
<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
<div class="wpsg_produkt_produktbilder">
- <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
- <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
- <?php if ($i == 1 && !wpsg_isSizedString($this->view['data']['varianten_image']) || $b == $this->view['data']['varianten_image']) { ?>
- <div class="wpsg_produkt_preview wpsg_pb_pic">
- <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
- <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ <?php
+ $pbw = $this->get_option('wpsg_mod_produktbilder_width');
+ $pbh = $this->get_option('wpsg_mod_produktbilder_height');
+ $pbm = $this->get_option('wpsg_mod_produktbilder_mode');
+ $pbArr = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['data']['id']));
+ ?>
+ <?php if (sizeof($pbArr)) { ?>
+ <?php $i = 0; foreach ($pbArr as $b) { $i ++; ?>
+ <?php if ($i == 1 && !wpsg_isSizedString($this->view['data']['varianten_image']) || $b['basename'] == $this->view['data']['varianten_image']) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <?php
+ $href = wp_get_attachment_image_src($b['post_id'], Array(800, 600));
+ $imgtag = wp_get_attachment_image($b['post_id'], Array($pbw, $pbh));
+ ?>
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>"
+ href="<?php echo $href[0]; ?>"> <?php echo $imgtag; ?>
</a>
</div>
<?php } else { ?>
<div class="wpsg_pb_pic" style="display:none;">
- <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
- <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ <?php
+ $href = wp_get_attachment_image_src($b['post_id'], Array(800, 600));
+ $imgtag = wp_get_attachment_image($b['post_id'], Array($pbw, $pbh));
+ ?>
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $href[0]; ?>">
+ <?php echo $imgtag; ?>
</a>
</div>
<?php } ?>
@@ -197,8 +211,8 @@ if (!function_exists('is_plugin_active'))
<div class="wpsg_clear"></div>
<div class="wpsg_product_buttonarea">
- <div class="wpsg_product_buttons_add_basket">
- <?php if ($this->view['oProduct']->canOrder()) { ?>
+ <div class="wpsg_product_buttons_add_basket">
+ <?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>