Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6488)
+++ /controller/wpsg_ShopController.class.php	(revision 6491)
@@ -1200,4 +1200,5 @@
 			$html .= '<input type="hidden" name="myReferer" value="'.htmlspecialchars($myReferer).'" />';
 			$html .= '<input type="hidden" name="wpsg[produkt_id]" value="'.$this->getProduktId($produkt_id).'" />';
+			$html .= '<input type="hidden" name="wpsg[product_key]" value="'.$this->view['data']['product_key'].'" />';
 			$html .= '</div>';
 			$html .= '</form>';
Index: /model/wpsg_product.class.php
===================================================================
--- /model/wpsg_product.class.php	(revision 6488)
+++ /model/wpsg_product.class.php	(revision 6491)
@@ -321,6 +321,7 @@
 				$wpsg_mod_request_set = $this->getMeta('wpsg_mod_request_set');
 
-				if (!(!is_numeric($wpsg_mod_request_set) || in_array($wpsg_mod_request_set, array(wpsg_mod_request::TYP_NO, wpsg_mod_request::TYP_YESWITHBASKET)))) return false;
-
+				//if (!(!is_numeric($wpsg_mod_request_set) || in_array($wpsg_mod_request_set, array(wpsg_mod_request::TYP_YES, wpsg_mod_request::TYP_YESWITHBASKET)))) return false;
+				if (!(!is_numeric($wpsg_mod_request_set) || ($wpsg_mod_request_set == wpsg_mod_request::TYP_NO))) return false;
+				
 			}
 
Index: /mods/wpsg_mod_prepayment.class.php
===================================================================
--- /mods/wpsg_mod_prepayment.class.php	(revision 6488)
+++ /mods/wpsg_mod_prepayment.class.php	(revision 6491)
@@ -227,5 +227,6 @@
 		{
 			
-			return $this->shop->replaceUniversalPlatzhalter($this->shop->get_option('wpsg_mod_prepayment_subject'), $order_id);
+			$ret = $this->shop->replaceUniversalPlatzhalter($this->shop->get_option('wpsg_mod_prepayment_subject'), $order_id);
+			return str_replace(' ', '', $ret);
 			
 		} // private function get_subject($order_id)
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6488)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6491)
@@ -970,89 +970,4 @@
 
         /**
-		 * DEPRECATED!
-         * Gibt die Bilder als Array fÃŒr die Variation zurÃŒck
-         * Beachtet die Reihenfolge die im Backend ÃŒber Drag&Drop definiert ist
-         * @param int $var_id Key der Variante
-         * @param int $vari_id Key der Variation
-         */
-        public function getVariImages($product_id, $var_id, $vari_id)
-        {
-
-        	$_REQUEST['var_id'] = $var_id;
-        	$_REQUEST['vari_id'] = $vari_id;
-
-        	//$vp_data = $this->loadVarianten($product_id);
-        	$vp_data = $this->getVariants($product_id, true, true, true);
-        	
-        	$arProductBilder = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($product_id));
-
-        	$arReturn = array();
-
-        	if (!isset($vp_data[$var_id])) return $arProductBilder;
-        	//if (!wpsg_isSizedArray($vp_data[$var_id]['vari'][$vari_id]['picOrder']) && !wpsg_isSizedArray($vp_data[$var_id]['picOrder'])) return $arProductBilder;
-        	if (!wpsg_isSizedArray($vp_data[$var_id]['arVariation'][$vari_id]['picOrder'])) return $arProductBilder;
-
-        	// Sortierung
-        	// Bilder in Reihenfolge von picOrder
-        	if (isset($vp_data[$var_id]['typ']) && ($vp_data[$var_id]['typ'] == 'checkbox') && wpsg_isSizedArray($vp_data[$var_id]['picOrder'])) $arReturn = $vp_data[$var_id]['picOrder'];
-        	else if (wpsg_isSizedArray($vp_data[$var_id]['arVariation'][$vari_id]['picOrder'])) $arReturn = $vp_data[$var_id]['arVariation'][$vari_id]['picOrder'];
-
-        	/*
-        	// PrÃŒfen ob die Bilder noch in Produktbilder Array drin sind
-        	foreach ($arReturn as $k => $v)
-        	{
-
-        		if (!in_array($v, $arProductBilder)) unset($arReturn[$k]);
-        		else unset($arProductBilder[array_search($v, $arProductBilder)]);
-
-        	}
-        	*/
-
-        	$arProductBilderSort = Array();
-        	foreach ($arProductBilder as $v) {
-        		$k = array_search($v['basenameori'], $arReturn);
-        		if ($k !== false)
-        			$arProductBilderSort[$k] = $v;
-
-        	}
-        	ksort($arProductBilderSort);
-
-        	// Bilder aus dem ProduktArray noch hinzufÃŒgen, die eventuell nicht im sortierten Array enthalten sind
-        	foreach ($arProductBilder as $k => $v)
-        	{
-
-        		//$arReturn[] = $v['basenameori'];
-        		$k = array_search($v['basenameori'], $arReturn);
-        		if ($k === false)
-        			$arProductBilderSort[] = $v;
-
-        	}
-        	//$arReturn = array_unique($arReturn);
-
-        	$arImageSelect = array();
-
-        	// Sind die Bilder in der Variante ausgewÃ€hlt?
-        	if (!is_admin())
-        	{
-
-        		//if ($vp_data[$var_id]['typ'] == 'checkbox' && wpsg_isSizedString($vp_data[$var_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['pic']);
-        		if ($vp_data[$var_id]['type'] == '3' && wpsg_isSizedString($vp_data[$var_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['pic']);
-        		else if (wpsg_isSizedString($vp_data[$var_id]['arVariation'][$vari_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['arVariation'][$vari_id]['pic']);
-
-        		foreach ($arReturn as $k => $v)
-        		{
-
-        			if (!in_array($v, $arImageSelect)) unset($arReturn[$k]);
-
-        		}
-
-        	}
-
-        	//return $arReturn;
-        	return $arProductBilderSort;
-
-        } // public function getVariImages($product_id, $var_id, $vari_id)
-
-        /**
          * Gibt den Namen der Variante zurÃŒck
          */
@@ -1152,130 +1067,4 @@
 			
 			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/produkt.phtml', false);
-			
-			/*
-			$produkt_id = $this->shop->getProduktId($product_key);
-			$produkt_data = $this->shop->cache->loadProduct($produkt_id);
-			$tax_value = $this->shop->getCalcTaxValue($produkt_data['mwst_key']);
-
-			if ($this->shop->isOtherLang())
-			{
-
-				$produkt_trans_id = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($produkt_id)."' AND `lang_locale` = '".wpsg_q($this->shop->getCurrentLanguageCode())."'");
-
-				if (wpsg_isSizedInt($produkt_trans_id)) $produkt_id = $produkt_trans_id;
-
-			}
-
-			//public function getVariants($product_id = false, $global = true, $onlyActive = false, $loadVariationen = false)
-			$vp_data = $this->getVariants($produkt_id, true, true, true);
-			
-			if ($this->isVariantsProductKey($product_key)) {
-				$arVar = $this->explodeProductKey($product_key);
-				foreach ($arVar['arVari'] as $v => $vv) {
-					$vp_data[$v]['arVariation'][$vv]['sel'] = 1;
-
-				}
-
-			}
-
-			if (is_array($vp_data) && sizeof($vp_data) > 0)
-			{
-
-				$arpb = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array(&$produkt_id));
-
-				//$this->shop->view['data']['vp_data'] = $vp_data;
-				$this->shop->view['wpsg_mod_productvariants']['set'] = $this->getSetVariArray($product_key);
-
-				// Rabattpreise vorkalkulieren
-				//$this->shop->callMod('wpsg_mod_discount', 'addDiscountToVari', array(&$produkt_id, &$this->shop->view['data']['vp_data']));
-
-				$arPossibleImages = array();
-
-				// Bilddaten ergÃ€nzen
-				foreach ($vp_data as $k1 => &$v1) {
-					foreach ($v1['arVariation'] as $k2 => &$v2) {
-						$arpic = explode(',', $v2['pic']);
-						$v2['showpic'] = '';
-						if (wpsg_isSizedArray($v2['picOrder'])) {
-							// Bilder umsortiert, Reihenfolge checken
-							$k = 5000;
-							foreach ($arpic as $ap)
-								foreach ($v2['picOrder'] as $kp => $vp) {
-									if ($ap == $vp)
-										if ($kp < $k) $k = $kp;
-
-								}
-							$v2['showpic'] = $v2['picOrder'][$k];
-						}
-						else
-						{
-							$max = sizeof($arpic);
-							if (isset($arpic[$max - 1]))
-								$v2['showpic'] = $arpic[$max - 1];		// 1 wegen Komma am Anfang
-						}
-						$found = -1;
-						$v2['guid'] = '';
-						$v2['post_id'] = 0;
-						foreach ($arpb as $k3 => $v3) {
-							if ($v2['showpic'] === $v3['basenameori']) $found = $k3;
-						}
-						if ($found != -1) {
-							$v2['guid'] = $arpb[$found]['guid'];
-							$v2['post_id'] = $arpb[$found]['post_id'];
-						}
-
-					}
-				}
-
-				unset($v1);
-				unset($v2);
-
-				$this->shop->view['data']['vp_data'] = $vp_data;
-
-				foreach ($this->shop->view['data']['vp_data'] as $k => $v)
-				{
-
-					if ($v['typ'] == "checkbox")	// 0 = checkbox
-					{
-
-						if (get_option("wpsg_vp_showpic") == "1" && wpsg_isSizedString($v['pic']))
-						{
-
-							//$this->shop->view['data']['vp_data'][$k]['showpic'] = $this->getImageSelectImage($produkt_id, $k, $k2, $product_key);
-
-						}
-
-						// Preis an Ausgabe im Frontend anpassen
-						//if ($this->shop->getFrontendTaxview() == WPSG_NETTO && $this->shop->getBackendTaxview() == WPSG_BRUTTO) $this->shop->view['data']['vp_data'][$k]['preis'] = wpsg_calculatePreis($v['preis'], WPSG_NETTO, $tax_value);
-						//else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO && $this->shop->getBackendTaxview() == WPSG_NETTO) $this->shop->view['data']['vp_data'][$k]['preis'] = wpsg_calculatePreis($v['preis'], WPSG_BRUTTO, $tax_value);
-
-					}
-					else
-					{
-
-						foreach ($v['arVariation'] as $k2 => $v2)
-						{
-
-							if (get_option("wpsg_vp_showpic") == "1" && wpsg_isSizedString($v2['pic']))
-							{
-
-								//$this->shop->view['data']['vp_data'][$k]['vari'][$k2]['showpic'] = $this->getImageSelectImage($produkt_id, $k, $k2, $product_key);
-
-							}
-
-							// Preis an Ausgabe im Frontend anpassen
-							if ($this->shop->getFrontendTaxview() == WPSG_NETTO && $this->shop->getBackendTaxview() == WPSG_BRUTTO) $this->shop->view['data']['vp_data'][$k]['arVariation'][$k2]['price'] = wpsg_calculatePreis($v2['price'], WPSG_NETTO, $tax_value);
-							else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO && $this->shop->getBackendTaxview() == WPSG_NETTO) $this->shop->view['data']['vp_data'][$k]['arVariation'][$k2]['price'] = wpsg_calculatePreis($v2['price'], WPSG_BRUTTO, $tax_value);
-
-						}
-
-					}
-
-				}
-
-				return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/produkt.phtml', false);
-
-			}			
-			*/ 
 
 		} // public function renderTemplate($produkt_id)
@@ -1293,5 +1082,5 @@
 
 			)
-		 * Anhand des ProduktschlÃŒssels z.B. pv|4:6|1:8|6:11|5:10
+		 * Anhand des ProduktschlÃŒssels z.B. pv_1|4:6|1:8|6:11|5:10
 		 */
 		public function explodeProductKey($product_key)
@@ -1607,78 +1396,4 @@
 
 		} // private function admin_inlineEditAction()
-
-		/**
-		 * Gibt die MÃ¶glichken Bilder einer Variantenkombination zurÃŒck
-		 */
-		public function getKombiVariImages($var_key, $var_id = false)
-		{
-
-			if (!$this->shop->hasMod('wpsg_mod_produktbilder')) return false;
-
-			$arVarSelected = $this->getSetVariArray($var_key);
-			$product_id = $this->shop->getProduktID($var_key);
-			//$arVari = $this->loadVarianten($product_id);
-			$arVari = $this->getVariants($product_id, true, true, true);
-			
-			$arTemp = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($product_id));
-
-			if (!$this->isVariantsProductKey($var_key)) return $arTemp;
-
-			$arBilder = array();
-			foreach ($arTemp as $bild) {
-				$arBilder[] = $bild['basenameori'];
-			}
-
-			/*
-			// Schauen ob ein Bild nach dem Dateinamen dabei ist
-			foreach ($arBilder as $bild)
-			{
-				$image = false;
-				$filename = preg_replace("/\.([^\.]*)/", "", $bild);
-				if ($filename == "vp_".str_replace(":", "-", $var_key)) $image = $bild;
-
-				if ($image !== false) return array($image);
-			}
-			*/
-			foreach ($arVari as $var_key => $var)
-			{
-				if (array_key_exists($var_key, $arVarSelected))
-				{
-					if ($var_id === $var_key) continue;
-					if ($var['typ'] == "checkbox")
-					{
-						if ($arVarSelected[$var_key] == "1")
-						{
-							$arBilder = array_intersect($arBilder, explode(",", $var['pic']));
-						}
-						else
-						{
-							$arBilder = array_diff($arBilder, explode(",", $var['pic']));
-						}
-					}
-					else
-					{
-						$pics = wpsg_getStr($var['arVariation'][$arVarSelected[$var_key]]['pic']);
-						$arBilder = array_intersect($arBilder, explode(",", wpsg_getStr($var['arVariation'][$arVarSelected[$var_key]]['pic'])));
-					}
-				}
-			}
-			//$arBilder = $this->checkPics($arBilder, $product_id);
-
-			if (wpsg_isSizedArray($arBilder))
-			{
-				$arBilder = array_values($arBilder);
-				foreach ($arTemp as $k => $bild) {
-					if ($arBilder[0] != $bild['basenameori']) unset($arTemp[$k]);
-				}
-				//return $arBilder;
-				$arTemp = array_values($arTemp);
-				return $arTemp;
-			}
-			else
-			{
-				return array();
-			}
-		}
 
 		/**
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 6488)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 6491)
@@ -504,4 +504,5 @@
 				if (isset($arBilder) && (sizeof($arBilder) > 0)) $this->shop->view['data']['bilder'] = $arBilder;
 
+				/*
 				if ($this->shop->get_option('wpsg_mod_produktartikel_facebook') == '1')
 				{
@@ -512,4 +513,5 @@
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktartikel/header_google.phtml');
 				}
+				*/
 
 			}
Index: /mods/wpsg_mod_request.class.php
===================================================================
--- /mods/wpsg_mod_request.class.php	(revision 6488)
+++ /mods/wpsg_mod_request.class.php	(revision 6491)
@@ -831,5 +831,8 @@
 		{
 			
-			$product_id = $this->shop->getProduktId($product_key);
+			$p_key = $product_key;
+			$p_key = $_REQUEST['wpsg']['product_key'];
+			
+			$product_id = $this->shop->getProduktId($p_key);
 			$oProduct = wpsg_product::getInstance($product_id);
 			 
@@ -842,6 +845,7 @@
 			foreach ($_SESSION['wpsg']['wpsg_mod_request']['products'] as $ses_key => $ses_product)
 			{
-												
-				if ($ses_product['product_key'] == $product_key && $product_id == $ses_product['product_id'] && !wpsg_isSizedInt($oProduct->basket_multiple))
+									
+				$temp = $oProduct->basket_multiple;
+				if ($ses_product['product_key'] == $product_key && $product_id == $ses_product['product_id'] && !wpsg_isSizedInt($temp))
 				{
 			
@@ -859,5 +863,5 @@
 				$_SESSION['wpsg']['wpsg_mod_request']['products'][] = array(
 					'product_id' => $product_id,
-					'product_key' => $product_key,					
+					'product_key' => $p_key,					
 					'referer' => $_REQUEST['myReferer'],
 					'amount' => $amount	
Index: /views/admin/module.phtml
===================================================================
--- /views/admin/module.phtml	(revision 6488)
+++ /views/admin/module.phtml	(revision 6491)
@@ -132,5 +132,5 @@
 		<?php } ?>
 		
-		<?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods']))))) { ?>
+		<?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || 1))) { ?>
 			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
 			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
Index: /views/mailtemplates/html/order.phtml
===================================================================
--- /views/mailtemplates/html/order.phtml	(revision 6488)
+++ /views/mailtemplates/html/order.phtml	(revision 6491)
@@ -19,12 +19,17 @@
 					<tr>
 						<td style="padding:0px; ">
-							<?php if ($this->hasMod('wpsg_mod_produktbilder') && wpsg_isSizedInt($this->get_option('wpsg_imagehandler_overviewimage'))) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($p['id']))); ?>
-							<?php if (wpsg_isSizedArray($arBilder)) { ?>  				
+							<?php if (wpsg_isSizedInt($this->get_option('wpsg_imagehandler_overviewimage'))) {
+
+								if (isset($p['product_key'])) {
+									$bild = $this->imagehandler->getAttachmentID($p['product_key']);
+								} else {
+									$arBilder = $this->imagehandler->getAttachmentIDs($this->getProduktId($p['id']));
+									$bild = $arBilder[0];
+								}
+							?>
+							<?php if (wpsg_isSizedString($bild)) { ?>  				
 							<a style="width:50px; width:50px; margin-right:10px; float:left;" href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>">
 								
-								<?php if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']);	?>
-	
-								<?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(50, 50)); ?>
-								<img src="<?php echo $href[0];?>" width="50" height="50" alt="" />
+								<?php echo wp_get_attachment_image($bild, Array(50, 50)); ?>
 							</a>
 							<?php } ?>
Index: /views/mods/mod_request/requestpage.phtml
===================================================================
--- /views/mods/mod_request/requestpage.phtml	(revision 6488)
+++ /views/mods/mod_request/requestpage.phtml	(revision 6491)
@@ -19,7 +19,7 @@
 
 			jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
-				
+			
 			jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
-				jQuery("#form-step2").validationEngine('detach');						
+				jQuery("#form-step2").validationEngine('detach');
 			});
 
@@ -30,5 +30,5 @@
 		jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
 		jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
-		jQuery("#form-step2").validate( { 
+		jQuery("#form-step2").validate( {
 			ignore: '',
 			errorClass: 'wpsg_error',
@@ -36,15 +36,15 @@
 			showErrors: function(errorMap, errorList) {
 
-				this.defaultShowErrors();	
+				this.defaultShowErrors();
 
 			}
-		} ); 
-
-		jQuery('#wpsg_requestbutton').bind('click', function() { 
+		} );
+
+		jQuery('#wpsg_requestbutton').bind('click', function() {
 
 			var bReturn = jQuery('#form-step2').validate().form();
 			if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
 			return bReturn;
-			  
+			
 		} );
 		
@@ -61,5 +61,5 @@
 		
 	} );
-		
+	
 /* ]]> */</script>
 <div class="wpsg_mod_request_requestpage">
@@ -84,5 +84,5 @@
 						<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
 						<?php } ?>
-						<th class="wpsg_cell_sumprice"><?php echo __('Gesamtpreis', 'wpsg'); ?></th>	
+						<th class="wpsg_cell_sumprice"><?php echo __('Gesamtpreis', 'wpsg'); ?></th>
 					</tr>
 				</thead>
@@ -101,15 +101,30 @@
 						
 							<?php /* Produktbild BEGIN */ ?>
-							<?php if ($this->hasMod('wpsg_mod_produktbilder') && $this->get_option('wpsg_mod_request_requestpageimage') == '1') { 
+							<?php if ($this->get_option('wpsg_mod_request_requestpageimage') == '1') {
 						
-								if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);						
-								else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($request_product['product_id'])); 
+								//if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);						
+								//else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($request_product['product_id'])); 
+
+								if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);
+								else {
+							
+									if (isset($request_product['product_data']['product_key'])) {
+										//$image = $this->imagehandler->getAttachmentID($this->view['product_data']['product_key']);
+										$image = $this->imagehandler->getAttachmentID($request_product['product_data']['product_key']);
+									} else {
+										$arImages = $this->imagehandler->getAttachmentIDs($request_product['product_data']['product_id']);
+										$image = $arImages[0];
+									}
+									
+								}
+								//if (wpsg_isSizedString($image)) echo wp_get_attachment_image($image, 'medium', false, array());
 								
 							?>
-							<?php if (wpsg_isSizedArray($arBilder)) { ?>
+							<?php if (wpsg_isSizedString($image)) { ?>
 							<div class="wpsg_basket_productimage">
-								<?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 echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>" />
+								<?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)); ?>
+								<?php echo wp_get_attachment_image($image, array(50, 50), false, array()); ?>
+								<?php //echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>
 							</div>
 							<?php } ?>
@@ -124,5 +139,5 @@
 					<tr class="wpsg_row_product2">
 						<td class="wpsg_cell_amount">
-							<input type="text" name="wpsg[amount][<?php echo $request_product['product_index']; ?>]" value="<?php echo wpsg_hspc($request_product['amount']); ?>" size="3" />
+							<input type="text" style="padding:0.3em;" name="wpsg[amount][<?php echo $request_product['product_index']; ?>]" value="<?php echo wpsg_hspc($request_product['amount']); ?>" size="3" />
 						</td>
 						<td class="wpsg_cell_price">
@@ -153,5 +168,5 @@
 						<td class="wpsg_cell_label"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
 						<td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>"><?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
-					</tr>										
+					</tr>
 					<?php } ?>
 					<?php /* Gewichtsanzeige im Produkt ENDE */ ?>
@@ -175,5 +190,5 @@
 								<?php foreach ((array)$possible_options as $option) { ?>
 								<option value="<?php echo wpsg_hspc($option) ?>" <?php echo (($option == wpsg_hspc(wpsg_getStr($request_product['pv'][$pv['id']])))?'selected="selected"':''); ?>><?php echo wpsg_hspc($option); ?></option>
-								<?php } ?>							
+								<?php } ?>
 							</select>
 							<?php } else if ($pv['typ'] === '2') { /* Text */ ?>
@@ -183,5 +198,5 @@
 							<input id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" type="checkbox" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="1" <?php echo ((wpsg_isSizedInt($request_product['pv'][$pv['id']]))?'checked="checked"':''); ?> class="<?php echo ((in_array("pv_".$pv['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" />							
 							<?php } ?>
-												
+							
 						</td>
 					</tr>
@@ -191,6 +206,6 @@
 					
 					<?php } ?>
-															
-				</tbody>			
+					
+				</tbody>
 				<tfoot>
 					<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
@@ -225,14 +240,14 @@
 				</tfoot>
 			</table>
-					
+			
 			<input type="submit" name="submit_requestpage_refresh" id="wpsg_requestbutton" class="wpsg_mod_request_button_refresh" value="<?php echo __('Anfrageliste aktualisieren', 'wpsg'); ?>" />
 		
 			<?php /* Anfang Bestellvariablen */ ?>
-			<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>			
+			<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
 			<h2><?php echo __('ZusÃ€tzliche Angaben', 'wpsg'); ?></h2>
 			<?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
-			<div class="wpsg_checkoutblock" id="wpsg_checkoutblock_<?php echo $ov['id']; ?>">				
+			<div class="wpsg_checkoutblock" id="wpsg_checkoutblock_<?php echo $ov['id']; ?>">
 				<?php if ($ov['typ'] === '1') { $possible_options = explode('|', $ov['auswahl']); /* Auswahl */ ?>
-				<label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?>&nbsp;<span class="wpsg_required">*</span><?php } ?></label>:
+				<label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?>&nbsp;<span class="wpsg_required">*</span><?php } ?>:</label>
 				<select name="wpsg[request][ov][<?php echo $ov['id']; ?>]" class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>">
 					<option value="-1"><?php echo __('Bitte auswÃ€hlen', 'wpsg'); ?></option>
@@ -248,14 +263,14 @@
 				<input type="checkbox" <?php echo ((wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']]))?'checked="checked"':''); ?> class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" value="1" />
 				<label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?></label> 
-				<?php } ?>		
-			</div>			
+				<?php } ?>
+			</div>
 			<?php } ?>
 			<?php } ?>
 			<?php /* Ende Bestellvariablen */ ?>
 		
-			<h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>			
-		 		
+			<h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
+		 	
 			<div class="wpsg_checkoutblock" id="wpsg_firma">
-				<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+				<label for="wpsg_firma" class="wpsg_checkout"><?php echo __("Firma", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -270,10 +285,10 @@
 					<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
 					<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo (($this->view['requestlist']['customer']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
-				<?php } ?>						
+				<?php } ?>
 				</select>
 			</div>
 			
 			<div class="wpsg_checkoutblock" id="wpsg_vorname">
-				<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?> 
+				<label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -289,5 +304,5 @@
 			
 			<div class="wpsg_checkoutblock" id="wpsg_email">
-				<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?> 
+				<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -297,5 +312,5 @@
 			<?php if (wpsg_isSizedInt($this->view['pflicht']['emailconfirm'])) { ?>
 			<div class="wpsg_checkoutblock" id="wpsg_email2">
-				<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?> 
+				<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -310,5 +325,5 @@
 				<input class="<?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[request][customer][geb]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['geb'])); ?>" />
 			</div>
-					
+			
 			<div class="wpsg_checkoutblock" id="wpsg_fax">
 				<label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
@@ -326,5 +341,5 @@
 		
 			<div class="wpsg_checkoutblock" id="wpsg_strasse">
-				<label for="strasse" class="wpsg_checkout"><?php echo __("StraÃe Nr.", "wpsg"); ?> 
+				<label for="strasse" class="wpsg_checkout"><?php echo __("StraÃe Nr.", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -333,5 +348,5 @@
 		
 			<div class="wpsg_checkoutblock" id="wpsg_postleitzahl">
-				<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?> 
+				<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -340,5 +355,5 @@
 			
 			<div class="wpsg_checkoutblock" id="wpsg_ort">
-				<label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?> 
+				<label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -347,7 +362,7 @@
 			
 			<div class="wpsg_checkoutblock" id="wpsg_land">
-				<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?> 
+				<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
-				</label>					
+				</label>
 				<select name="wpsg[request][customer][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
 					<option value="-1"><?php echo __('Bitte auswÃ€hlen', 'wpsg'); ?></option>
@@ -359,5 +374,5 @@
 			
 			<div class="wpsg_checkoutblock" id="wpsg_ustidnr">
-				<label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?> 
+				<label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
 				<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 				</label>
@@ -371,6 +386,6 @@
 				<label class="wpsg_cv wpsg_checkout" for="wpsg_cv_<?php echo $c_id; ?>">
 					<?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
-				</label>					
-				<?php if ($c['typ'] == '0') { // Textfeld ?>					
+				</label>
+				<?php if ($c['typ'] == '0') { // Textfeld ?>
 				<input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id])); ?>" />
 				<?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
@@ -383,7 +398,7 @@
 					</select>
 					<?php } else if ($c['typ'] == '2') { // Checkbox ?>
-					<input type="hidden" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="0" /> 
+					<input type="hidden" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="0" />
 					<input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="1" <?php echo ((wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]) == '1')?'checked="checked"':''); ?> />
-					<?php } ?>				
+					<?php } ?>
 				<?php } ?>
 			</div>
@@ -391,5 +406,5 @@
 			<?php } ?>
 			<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
-						
+			
 			<h2><?php echo __('Kommentar', 'wpsg'); ?></h2>
 			
@@ -403,7 +418,7 @@
 		
 			<input type="submit" name="submit_requestpage" class="wpsg_mod_request_button_submit" value="<?php echo __('Anfrage starten', 'wpsg'); ?>" />
-					
+			
 			<br />
-						 
+			
 		</form>
 	
Index: /views/produkttemplates/standard.phtml
===================================================================
--- /views/produkttemplates/standard.phtml	(revision 6488)
+++ /views/produkttemplates/standard.phtml	(revision 6491)
@@ -11,7 +11,4 @@
 	//$this->noReleatedProducts = true;
 
-	$arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['data']['product_key']);
-	$arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
-
 ?>
 
@@ -36,4 +33,9 @@
 
 		<?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']);
+		?>
+
 		<?php if (wpsg_isSizedArray($arAttachmentIDsAll)) { ?>
 		<div class="wpsg_productimages">
@@ -41,8 +43,8 @@
 			<div class="wpsg_produkt_produktbilder">
 
-				<?php if (sizeof($arAttachmentIDsAll) > 1) { for ($i = 0; $i < sizeof($arAttachmentIDsAll); $i ++) { ?>
+				<?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] != $arAttachmentIDs[0]) 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">
+					<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>
@@ -258,4 +260,7 @@
 
 		<?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
+			<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
+			<input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
+		
 			<input class="wpsg_button wpsg_add_requestlist" id="wpsg_add_requestlist_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('Auf die Anfrageliste', 'wpsg'); ?>" name="wpsg[submit_request]" />
 		<?php } ?>
Index: /views/warenkorb/ajaxDialog.phtml
===================================================================
--- /views/warenkorb/ajaxDialog.phtml	(revision 6488)
+++ /views/warenkorb/ajaxDialog.phtml	(revision 6491)
@@ -10,7 +10,12 @@
 	// $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();
@@ -19,7 +24,7 @@
 
 <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 } ?>
@@ -79,10 +84,11 @@
 					<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 } ?>
