Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6241)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6242)
@@ -245,7 +245,35 @@
 					$product_data['product_key'] = $strDefaultKey;
 					$product_data['id'] = $strDefaultKey;
-
+										
 				}
-
+				
+				$arProductKey = $this->explodeProductKey($product_data['product_key']);
+								
+				$arProductImagesPossible = array();
+				
+				// Gesetzte Variante wÃ€hlen und aufwerten
+				foreach ($product_data['arVariant'] as $var_id => $var_data)
+				{
+				
+					foreach ($var_data['arVariation'] as $vari_id => $vari_data)
+					{
+						
+						if ($arProductKey['arVari'][$var_id] == $vari_id)
+						{
+							
+							if (wpsg_isSizedArray($arProductImagesPossible)) $arProductImagesPossible = array_intersect($arProductImagesPossible, $vari_data['images']['pic']);
+							else if (wpsg_isSizedArray($vari_data['images']['pic'])) $arProductImagesPossible = $vari_data['images']['pic'];
+
+							$product_data['arVariant'][$var_id]['arVariation'][$vari_id]['set'] = true;
+							
+						}
+						else $product_data['arVariant'][$var_id]['arVariation'][$vari_id]['set'] = false;
+						
+					}
+					
+				} 
+				
+				if (wpsg_isSizedArray($arProductImagesPossible)) $product_data['image_show'] = array_shift($arProductImagesPossible);
+				
 				// Preise fÃŒr die Varianten berechnen 
 				if (!(isset($product_data['varPriceAdded']) && ($product_data['varPriceAdded'] = 1)))
@@ -273,4 +301,5 @@
 					
 				}
+				
 				// Preise fÃŒr das Frontend ermitteln
 				if ($this->shop->getFrontendTaxView() === WPSG_BRUTTO)
@@ -286,5 +315,5 @@
 
 				}
-
+				 
 			}
 			if ($product_data['preis_brutto'] == 161.00) {
@@ -302,5 +331,4 @@
             //foreach ($form_data['wpsg_mod_productvariants'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
             //$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);            
-<<<<<<< .mine
 
         	if (!wpsg_isSizedArray($form_data['wpsg_vp'])) return false;
@@ -308,18 +336,5 @@
         	foreach ($form_data['wpsg_vp'] as $var_id => $vari_id) $form_data['wpsg_vp'][$var_id] = $var_id.':'.$vari_id;
         	$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_vp']);
-||||||| .r6234
-
-        	if (!wpsg_isSizedArray($form_data['wpsg_vp'])) return false;
-        	
-        	foreach ($form_data['wpsg_vp'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
-        	$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);
-=======
-			
-        	if (!wpsg_isSizedArray($form_data['wpsg_mod_productvariants'])) return false;
-        				
-        	foreach ($form_data['wpsg_mod_productvariants'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
-        	$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);
->>>>>>> .r6240
-        	     
+         	     
         } // public function getProductKeyFromRequest($product_id, $form_data)
         
@@ -1072,4 +1087,6 @@
 		{
 			
+			die("Veraltet");
+			
 			if (!wpsg_isSizedArray($product_data['arVariant'])) return;
 			
@@ -1087,15 +1104,5 @@
 		public function renderTemplate($product_key)
 		{
-
-<<<<<<< .mine
-			// Siehe productTemplate V4
-			//die("Veralteter Aufruf");
-			
-||||||| .r6234
-=======
-			// Siehe productTemplate V4
-			die("Veralteter Aufruf");
-			
->>>>>>> .r6240
+			
 			$produkt_id = $this->shop->getProduktId($product_key);
 			$produkt_data = $this->shop->cache->loadProduct($produkt_id);
@@ -1134,4 +1141,6 @@
 				// Rabattpreise vorkalkulieren
 				//$this->shop->callMod('wpsg_mod_discount', 'addDiscountToVari', array(&$produkt_id, &$this->shop->view['data']['vp_data']));
+				
+				$arPossibleImages = array();
 				
 				// Bilddaten ergÃ€nzen
@@ -1167,6 +1176,8 @@
 							$v2['post_id'] = $arpb[$found]['post_id'];
 						}
+												
 					}
 				}
+								
 				unset($v1);
 				unset($v2);
@@ -1214,5 +1225,5 @@
 						
 				}
-		
+				 				
 				return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/produkt.phtml', false);
 				
@@ -1895,4 +1906,15 @@
 								VI.`pos` ASC 
 						", "variation_id");
+						
+						// Bilder deserialisieren
+						foreach ($arData[$k]['arVariation'] as $vari_id => $vari_data)
+						{
+							
+							$arData[$k]['arVariation'][$vari_id]['images'] = @unserialize($vari_data['images']);
+							
+							if (wpsg_isSizedString($arData[$k]['arVariation'][$vari_id]['images']['pic'])) $arData[$k]['arVariation'][$vari_id]['images']['pic'] = wpsg_trim(explode(',', $arData[$k]['arVariation'][$vari_id]['images']['pic']));
+							else $arData[$k]['arVariation'][$vari_id]['images']['pic'] = array();
+							
+						}
 
 					}
Index: /views/mods/mod_productvariants/productTemplate.phtml
===================================================================
--- /views/mods/mod_productvariants/productTemplate.phtml	(revision 6241)
+++ /views/mods/mod_productvariants/productTemplate.phtml	(revision 6242)
@@ -4,5 +4,7 @@
      * Integration der Variantenauswahl in die Produktverwaltung
      */
-   
+  
+    die("VERALTETES TEMPLATE");
+
 ?>
 
Index: /views/mods/mod_productvariants/produkt.phtml
===================================================================
--- /views/mods/mod_productvariants/produkt.phtml	(revision 6241)
+++ /views/mods/mod_productvariants/produkt.phtml	(revision 6242)
@@ -4,95 +4,150 @@
 	 * Template fÃŒr die Varianten wird vom Produkttemplate z.B. standard.phtml geladen
 	 */
- 
-<<<<<<< .mine
-	//die("Veraltet");
+  
+?>
 
-||||||| .r6234
-=======
-	die("Veraltet");
-
->>>>>>> .r6240
-?>
- 
-<script type="text/javascript">/* <![CDATA[ */
- 
-	wpsg_vp_vari[<?php echo $this->getProduktId($this->view['data']['id']); ?>] = new Array();
-	 
-/* ]]> */</script>
-
-<?php $vAktiv = false; if (is_array($this->view['data']['vp_data']) && sizeof($this->view['data']['vp_data']) > 0) { ?>
-
-	<?php $kk = -1; 
-		foreach ($this->view['data']['vp_data'] as $k => $var) { 
-		
-		$kk++;
-		//if ($var['active'] == "1") 
-		{ 
-
-			$vAktiv = true; ?>
-		
-			<div class="wpsg_vp_field wpsg_vp_field_<?php echo $this->getProduktId($this->view['data']['id']); ?>">
-				
-				<script type="text/javascript">/* <![CDATA[ */
-		
-					wpsg_vp_vari[<?php echo $this->getProduktId($this->view['data']['id']); ?>][<?php echo $k; ?>] = "<?php echo $var['typ']; ?>";			
-								
-				/* ]]> */</script>
-				
-				<?php if ($var['typ'] != 'radio') { ?>
-					<label class="wpsg_vp_field_label" for="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
-						<?php echo $var['name']; ?>
-					</label>
-				<?php } else { ?>
-					<span class="wpsg_vp_field"><?php echo $var['name']; ?></span>
-				<?php } ?>
-				
-				<div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
-				
-					<?php /* SELECT-Box START */ ?>
-					<?php if ($var['typ'] == "select") { ?>
-						<label>			 			
-							<select onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
-							<?php foreach ($var['arVariation'] as $kv => $vari) { $j = -1;
-								if ($vari['active'] == "1") { $j++; ?>
-									<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>
+<div class="wpsg_mod_productvariants_product_wrap" id="wpsg_mod_productvariants_product_wrap_<?php echo $GLOBALS['wpsg_produkt_index']; ?>" wpsg-productindex="<?php echo $GLOBALS['wpsg_produkt_index']; ?>"> 
+	<?php $vAktiv = false; if (is_array($this->view['data']['vp_data']) && sizeof($this->view['data']['vp_data']) > 0) { ?>
+	
+		<?php $kk = -1; 
+			foreach ($this->view['data']['vp_data'] as $k => $var) { 
+			
+			$kk++;
+			//if ($var['active'] == "1") 
+			{ 
+	
+				$vAktiv = true; ?>
+			
+				<div class="wpsg_vp_field wpsg_vp_field_<?php echo $this->getProduktId($this->view['data']['id']); ?>">
+					 
+					<?php if ($var['typ'] != 'radio') { ?>
+						<label class="wpsg_vp_field_label" for="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
+							<?php echo $var['name']; ?>
+						</label>
+					<?php } else { ?>
+						<span class="wpsg_vp_field"><?php echo $var['name']; ?></span>
+					<?php } ?>
+					
+					<div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
+					
+						<?php /* SELECT-Box START */ ?>
+						<?php if ($var['typ'] == "select") { ?>
+							<label>			 			
+								<select name="wpsg_vp[<?php echo $k; ?>]" class="wpsg_vp_update" id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
+								<?php foreach ($var['arVariation'] as $kv => $vari) { $j = -1;
+									if ($vari['active'] == "1") { $j++; ?>
+										<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>
+												
+											<?php /* Lagerbestand > 0 */ ?>
+											<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
 											
-										<?php /* Lagerbestand > 0 */ ?>
-										<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
-										
-											<option value="<?php echo $kv; ?>" <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'selected="selected"':''); ?>>						
-											<?php echo $vari['name']; ?>
+												<option value="<?php echo $kv; ?>" <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'selected="selected"':''); ?>>						
+												<?php echo $vari['name']; ?>
+													
+													<?php /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START */?>
+													<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>			
+														<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($vari['price']))) { ?>
+															(<?php echo wpsg_ff($vari['price'], $this->get_option('wpsg_currency')); ?>)
+														<?php } ?>
+													<?php }else{?>
+														<?php echo wpsg_translate(__('(Preise nur fÃŒr eingeloggte Benutzer)', 'wpsg')); ?>
+													<?php } ?>
+													<?php /* Abfrage ENDE */ ?>
+												</option>
 												
-												<?php /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START */?>
-												<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>			
+											<?php /* Lagerbestand der Variante=0 - wird angezeigt, ist aber nicht auswÃ€hlbar */ ?>
+											<?php } else { ?>
+												<option disabled="disabled" value="<?php echo $kv; ?>" <?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'selected="selected"':''); ?>>						
+													<?php echo $vari['name']; ?>
 													<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($vari['price']))) { ?>
 														(<?php echo wpsg_ff($vari['price'], $this->get_option('wpsg_currency')); ?>)
 													<?php } ?>
-												<?php }else{?>
-													<?php echo wpsg_translate(__('(Preise nur fÃŒr eingeloggte Benutzer)', 'wpsg')); ?>
-												<?php } ?>
-												<?php /* Abfrage ENDE */ ?>
-											</option>
-											
+												</option>
+											<?php } /* Lagerbestandsabfrage ENDE */ ?>
+												
+										<?php } ?>
+									<?php } ?>
+								<?php } ?>	
+								</select> 
+								<?php if ($this->get_option("wpsg_vp_showpic") == "1" && $this->hasMod('wpsg_mod_produktbilder')) { ?>
+									<span class="wpsg_vp_field_image">				
+										<?php foreach ($var['arVariation'] as $kv => $vari) { 
+											if ($vari['active'] == "1" && isset($vari['showpic'])) { ?>
+												<span class="wpsg_vp_image wpsg_vp_image_<?php echo $kv; ?>" style="display:<?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'block':'none'); ?>;">
+													
+													<?php 
+													/*
+													$img_src = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+														$this->getProduktId($this->view['data']['id']), 
+														$vari['showpic'],
+														$this->get_option("wpsg_vp_showpic_width"),
+														$this->get_option("wpsg_vp_showpic_height"), 
+														's'
+													));
+													*/
+													$pbw = $this->get_option("wpsg_vp_showpic_width");
+													$pbh = $this->get_option("wpsg_vp_showpic_height");
+													$img_src = $vari['guid'];
+													?><img src="<?php echo $img_src; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>" alt="" />
+																			
+												</span>
+											<?php } ?>
+										<?php } ?>
+									</span>
+								<?php } ?>		
+							</label>
+						<?php } /* SELECT-Box ENDE */ ?>
+						
+						<?php /* IMAGE START */ ?>
+						<?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
+							<div class="wpsg_mod_productvariants_imageselect wpsg_mod_productvariants_imageselect_<?php echo $k; ?>">
+							<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
+								<?php $kkv = -1; foreach ($var['arVariation'] as $kv => $vari) { $kkv++;
+									if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
+										<?php $img = $vari['guid']; ?>								
+										<?php if (wpsg_isSizedString($img)) { 
+											$pbw = $this->get_option('wpsg_vp_imageselect_width');
+											$pbh = $this->get_option('wpsg_vp_imageselect_height');
+										?>
+											<a data-wpsg-id="<?php echo $kv; ?>" class="image <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'akt':''); ?>" onclick="jQuery(this).parent().find('a').removeClass('akt'); jQuery(this).addClass('akt'); wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>); return false;" href="#">
+												<img src="<?php echo $img; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>"/>
+											</a>
+										<?php } ?>
+									<?php } ?>
+								<?php } ?>	
+							</div>
+						<?php } /* IMAGE ENDE */ ?>
+						
+						<?php /* Radio-Buttons START */ ?>
+						<?php if ($var['typ'] == "radio") { ?>			
+							<?php $j = 0; foreach ($var['arVariation'] as $kv => $vari) { if ($vari['active'] == "1") { $j ++; ?>
+								<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>					
+									<label>
+									
+										<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
+											<input <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$kk]) == $kv)?'checked="checked"':''); ?> 
+											id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" 
+											onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" 
+											type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" />&nbsp;<?php echo $vari['name']; ?>
 										<?php /* Lagerbestand der Variante=0 - wird angezeigt, ist aber nicht auswÃ€hlbar */ ?>
 										<?php } else { ?>
-											<option disabled="disabled" value="<?php echo $kv; ?>" <?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'selected="selected"':''); ?>>						
-												<?php echo $vari['name']; ?>
-												<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($vari['price']))) { ?>
-													(<?php echo wpsg_ff($vari['price'], $this->get_option('wpsg_currency')); ?>)
-												<?php } ?>
-											</option>
-										<?php } /* Lagerbestandsabfrage ENDE */ ?>
+											<input disabled="disabled" <?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'checked="checked"':''); ?> id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" />&nbsp;<?php echo $vari['name']; ?>
+										<?php } ?>
+										
+										<?php /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START */?>
+										<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>			
+								
+											<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($vari['price']))) { ?>
+												<span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['price'], $this->get_option('wpsg_currency')); ?>)</span>
+											<?php } ?>
 											
-									<?php } ?>
-								<?php } ?>
-							<?php } ?>	
-							</select> 
-							<?php if ($this->get_option("wpsg_vp_showpic") == "1" && $this->hasMod('wpsg_mod_produktbilder')) { ?>
-								<span class="wpsg_vp_field_image">				
-									<?php foreach ($var['arVariation'] as $kv => $vari) { 
-										if ($vari['active'] == "1" && isset($vari['showpic'])) { ?>
-											<span class="wpsg_vp_image wpsg_vp_image_<?php echo $kv; ?>" style="display:<?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'block':'none'); ?>;">
-												
+										<?php }else{?>
+												<?php echo wpsg_translate(__('(Preise nur fÃŒr eingeloggte Benutzer)', 'wpsg')); ?>
+										<?php } ?>
+										<?php /* Abfrage ENDE */ ?>
+											
+											<?php if ($this->get_option("wpsg_vp_showpic") == "1" && isset($vari['showpic']) && $vari['showpic'] != false) { ?>
+											<span class="wpsg_vp_field_image">
+											
 												<?php 
 												/*
@@ -105,98 +160,34 @@
 												));
 												*/
+												
 												$pbw = $this->get_option("wpsg_vp_showpic_width");
 												$pbh = $this->get_option("wpsg_vp_showpic_height");
 												$img_src = $vari['guid'];
 												?><img src="<?php echo $img_src; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>" alt="" />
-																		
+												
 											</span>
-										<?php } ?>
-									<?php } ?>
-								</span>
-							<?php } ?>		
-						</label>
-					<?php } /* SELECT-Box ENDE */ ?>
+											<?php } /* if image */ ?>		
+									</label>
+								<?php } /* If aktiv && stock */ ?>
+							<?php } } /* Foreach/Aktiv Radio ENDE */ ?>
+						<?php } /* Radio ENDE */ ?>
+	 
+						<div style="clear:both;"></div>
+	
+					</div>
+				</div>
+	
+			<?php } /* $var['active'] == "1" */ ?>
+		<?php } /* foreach ($this->view['data']['vp_data'] as $k => $var) */ ?>
+	<?php } /* $vAktiv = false; ENDE */ ?>
+	
+	<script type="text/javascript">/* <![CDATA[ */
+		
+		jQuery(document).ready(function() {
+		
+			jQuery('.wpsg_vp_update').off('change').on('change', wpsg_mod_productvariants_reload); 
 					
-					<?php /* IMAGE START */ ?>
-					<?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
-						<div class="wpsg_mod_productvariants_imageselect wpsg_mod_productvariants_imageselect_<?php echo $k; ?>">
-						<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
-							<?php $kkv = -1; foreach ($var['arVariation'] as $kv => $vari) { $kkv++;
-								if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
-									<?php $img = $vari['guid']; ?>								
-									<?php if (wpsg_isSizedString($img)) { 
-										$pbw = $this->get_option('wpsg_vp_imageselect_width');
-										$pbh = $this->get_option('wpsg_vp_imageselect_height');
-									?>
-										<a data-wpsg-id="<?php echo $kv; ?>" class="image <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'akt':''); ?>" onclick="jQuery(this).parent().find('a').removeClass('akt'); jQuery(this).addClass('akt'); wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>); return false;" href="#">
-											<img src="<?php echo $img; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>"/>
-										</a>
-									<?php } ?>
-								<?php } ?>
-							<?php } ?>	
-						</div>
-					<?php } /* IMAGE ENDE */ ?>
-					
-					<?php /* Radio-Buttons START */ ?>
-					<?php if ($var['typ'] == "radio") { ?>			
-						<?php $j = 0; foreach ($var['arVariation'] as $kv => $vari) { if ($vari['active'] == "1") { $j ++; ?>
-							<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>					
-								<label>
-								
-									<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
-										<input <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$kk]) == $kv)?'checked="checked"':''); ?> 
-										id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" 
-										onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" 
-										type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" />&nbsp;<?php echo $vari['name']; ?>
-									<?php /* Lagerbestand der Variante=0 - wird angezeigt, ist aber nicht auswÃ€hlbar */ ?>
-									<?php } else { ?>
-										<input disabled="disabled" <?php echo (($this->view['wpsg_mod_productvariants']['set'][$k] == $kv)?'checked="checked"':''); ?> id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" />&nbsp;<?php echo $vari['name']; ?>
-									<?php } ?>
-									
-									<?php /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START */?>
-									<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>			
-							
-										<?php if ($this->callMod('wpsg_mod_productvariants', 'showVariPrice', array($vari['price']))) { ?>
-											<span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['price'], $this->get_option('wpsg_currency')); ?>)</span>
-										<?php } ?>
-										
-									<?php }else{?>
-											<?php echo wpsg_translate(__('(Preise nur fÃŒr eingeloggte Benutzer)', 'wpsg')); ?>
-									<?php } ?>
-									<?php /* Abfrage ENDE */ ?>
-										
-										<?php if ($this->get_option("wpsg_vp_showpic") == "1" && isset($vari['showpic']) && $vari['showpic'] != false) { ?>
-										<span class="wpsg_vp_field_image">
-										
-											<?php 
-											/*
-											$img_src = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
-												$this->getProduktId($this->view['data']['id']), 
-												$vari['showpic'],
-												$this->get_option("wpsg_vp_showpic_width"),
-												$this->get_option("wpsg_vp_showpic_height"), 
-												's'
-											));
-											*/
-											
-											$pbw = $this->get_option("wpsg_vp_showpic_width");
-											$pbh = $this->get_option("wpsg_vp_showpic_height");
-											$img_src = $vari['guid'];
-											?><img src="<?php echo $img_src; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>" alt="" />
-											
-										</span>
-										<?php } /* if image */ ?>		
-								</label>
-							<?php } /* If aktiv && stock */ ?>
-						<?php } } /* Foreach/Aktiv Radio ENDE */ ?>
-                    <?php } /* Radio ENDE */ ?>
-
-
-				    <div style="clear:both;"></div>
-
-                </div>
-            </div>
-
-		<?php } /* $var['active'] == "1" */ ?>
-	<?php } /* foreach ($this->view['data']['vp_data'] as $k => $var) */ ?>
-<?php } /* $vAktiv = false; ENDE */ ?>
+		} );
+	
+	/* ]]> */</script>
+</div>
