summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2017-11-16 07:02:55 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2017-11-16 07:02:55 +0000
commit1c6ce77be7218553141d767ade06ce18e80402f4 (patch)
treee79f7be377d2ec74bccc398bb83a5889ba323c6a
parenteae5ad3eb03f3f32894736a829b481c146c07ebc (diff)
- Kommentare für die Produktbilder im Standard Template
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6734 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/produkttemplates/standard.phtml20
1 files changed, 15 insertions, 5 deletions
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index 4f44012..cb8c292 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -34,8 +34,13 @@
<?php /* Block für die Produktbilder START */ ?>
<?php
- $arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']);
- $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
+
+ /* Das ist das primäre Anzeigebild des Produktes (AttachmentID) */
+ $arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']);
+
+ /* Array mit allen AttachmentIDs der Produktbilder */
+ $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
+
?>
<?php if (wpsg_isSizedArray($arAttachmentIDsAll)) { ?>
@@ -44,11 +49,16 @@
<div class="wpsg_produkt_produktbilder">
<?php if (sizeof($arAttachmentIDsAll) > 0) { for ($i = 0; $i < sizeof($arAttachmentIDsAll); $i ++) { ?>
- <?php $att = wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false); ?>
- <?php $att = wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(300, 300), false); ?>
- <a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
+
+ <?php /* URL für die Lightbox */ ?>
+ <?php $att = wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(800, 600), false); ?>
+
+ <a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
+
<?php echo wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false, array()); ?>
+
</a>
+
<?php } } ?>
</div>