Index: /mods/wpsg_mod_statistics.class.php
===================================================================
--- /mods/wpsg_mod_statistics.class.php	(revision 6114)
+++ /mods/wpsg_mod_statistics.class.php	(revision 6115)
@@ -847,7 +847,7 @@
 			      C.`knr`,
 				  C.`email`,
-				  IF (OA.`id` > 0, OA.`tel`, C.`tel`) AS `tel`,	
-			      IF (OA.`id` > 0, OA.`name`, C.`name`) AS `name`,
-			      IF (OA.`id` > 0, OA.`vname`, C.`vname`) AS `vname`
+				  OA.`tel` AS `tel`,	
+			      OA.`name` AS `name`,
+			      OA.`vname` AS `vname`
   			      FROM
 				      `".WPSG_TBL_ORDERPRODUCT."` AS OP
Index: /views/produkttemplates/standard.phtml
===================================================================
--- /views/produkttemplates/standard.phtml	(revision 6114)
+++ /views/produkttemplates/standard.phtml	(revision 6115)
@@ -31,30 +31,16 @@
 					<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>	
 					<div class="wpsg_produkt_produktbilder">
-						<?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; ?>
+						<?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']); ?>" />
 							</a>
 						</div>
 						<?php } else { ?>
 						<div class="wpsg_pb_pic" style="display:none;">
-							<?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 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']); ?>" />
 							</a>
 						</div>
