diff options
| author | thomas <noreply@maennchen1.de> | 2017-09-06 07:37:22 +0000 |
|---|---|---|
| committer | thomas <noreply@maennchen1.de> | 2017-09-06 07:37:22 +0000 |
| commit | d01df31126004b4a15bcf4f433de729c4c9701a3 (patch) | |
| tree | 4ec6985cc7f6a141ea4093e1cd61d27b72b26b18 | |
| parent | 167fa47eb940d6279d71647d6f35d61315a82c22 (diff) | |
- Produktbilderdarstellung
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6451 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/admin/presentation.phtml | 4 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/grid.phtml | 25 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/list.phtml | 23 |
3 files changed, 16 insertions, 36 deletions
diff --git a/views/admin/presentation.phtml b/views/admin/presentation.phtml index 0838259..5081683 100644 --- a/views/admin/presentation.phtml +++ b/views/admin/presentation.phtml @@ -31,8 +31,8 @@ '2' => __('Serverseitig + Javascript V2', 'wpsg')
), $this->get_option('wpsg_form_validation')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_imagehandler_basketimage', __('Produktbild im Warenkorb anzeigen', 'wpsg'), $this->shop->get_option('wpsg_imagehandler_basketimage')); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_imagehandler_overviewimage', __('Produktbild in Bestellzusammenfassung anzeigen', 'wpsg'), $this->shop->get_option('wpsg_imagehandler_overviewimage')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_imagehandler_basketimage', __('Produktbild im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_imagehandler_basketimage')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_imagehandler_overviewimage', __('Produktbild in Bestellzusammenfassung anzeigen', 'wpsg'), $this->get_option('wpsg_imagehandler_overviewimage')); ?>
<?php $this->callMods('admin_presentation'); ?>
diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml index a4dfc58..6a71fb5 100644 --- a/views/mods/mod_productindex/layouts/grid.phtml +++ b/views/mods/mod_productindex/layouts/grid.phtml @@ -97,21 +97,12 @@ <div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;">
<div class="wpsg_mod_productindex_product_inner">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
- <div class="wpsg_mod_productindex_pic">
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
- <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
- <?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
-
- <?php
- $href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
- $imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
- ?>
- <?php echo $imgtag; ?>
- </a>
- <?php } ?>
- </div>
- <?php } ?>
+
+ <?php $attachment_id = $this->imagehandler->getAttachmentID($p['product_key']); ?>
+ <?php echo wp_get_attachment_image($attachment_id, array(800, 600)); ?>
+
+
+
<div class="wpsg_mod_productindex_content">
<div class="wpsg_mod_productindex_title">
<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
@@ -289,6 +280,6 @@ } );
- } ); - + } );
+
/* ]]> */</script>
\ No newline at end of file diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml index c53e0ea..a1ddea2 100644 --- a/views/mods/mod_productindex/layouts/list.phtml +++ b/views/mods/mod_productindex/layouts/list.phtml @@ -90,21 +90,10 @@ <?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
<div class="wpsg_mod_productindex_product <?php echo (($i % 2 == 0)?'odd':'even'); ?> <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
- <div class="wpsg_mod_productindex_pic">
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
- <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
- <?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
-
- <?php
- $href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
- $imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
- ?>
- <?php echo $imgtag; ?>
- </a>
- <?php } ?>
- </div>
- <?php } ?>
+
+ <?php $attachment_id = $this->imagehandler->getAttachmentID($p['product_key']); ?>
+ <?php echo wp_get_attachment_image($attachment_id, array(800, 600)); ?>
+
<div class="wpsg_mod_productindex_content">
<div class="wpsg_mod_productindex_infos">
<div class="wpsg_mod_productindex_weight">
@@ -275,6 +264,6 @@ } );
- } ); - + } );
+
/* ]]> */</script>
\ No newline at end of file |
