Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6115)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6116)
@@ -223,6 +223,6 @@
 					{
 
-						$arDefaultKeyValues = $variant_id.':'.array_keys($variant_data['arVariation']);
-						$arDefaultKey[] = $arDefaultKeyValues[0];
+						$arDefaultKeyValues = $variant_id.':'.array_keys($variant_data['arVariation'])[0];
+						$arDefaultKey[] = $arDefaultKeyValues;
 
 					}
@@ -704,4 +704,38 @@
 		/* Modulfunktionen */
 		
+		/** 
+		 * Gibt den Bestand fÃŒr eine Variation zurÃŒck 
+		 * @var $product_key String 
+		 * Beispiel: pv_1|1:1
+		 * 
+		 * Wird vom Lagerbestandsmodul aufgerufen, sollte NUR mit einem VariantenschlÃŒssel aufgerufen werden
+		 */
+		public function getStockForVariation($product_key)
+		{
+			
+			$arVariInfo = $this->explodeProductKey($product_key);
+			$oProduct = wpsg_product::getInstance($arVariInfo['product_id']);
+			
+			if (!wpsg_isSizedArray($arVariInfo['arVari'])) return $oProduct->stock;
+			else
+			{
+				
+				$nStock = 0;
+				$variConf = $this->getVariants($arVariInfo['product_id'], true, true, true);
+				
+				foreach ($arVariInfo['arVari'] as $var_id => $vari_id)
+				{
+					
+					$nStock += $variConf[$var_id]['arVariation'][$vari_id]['stock'];
+					
+				}
+				
+				return $nStock;
+				
+			}
+			
+			
+		} // public function getStockForVariation($product_key)
+		 
         /**
          * Speichert die Varianten
@@ -899,5 +933,5 @@
 			$this->shop->view['wpsg_mod_productvariants']['product_id'] = $product_data['product_id'];
 			$this->shop->view['wpsg_mod_productvariants']['arVariants'] = $product_data['arVariant'];
-			$this->shop->view['wpsg_mod_productvariants']['product_variants'] = $this->explodeProductKey($product_data['product_key']);
+			$this->shop->view['wpsg_mod_productvariants']['product_variants'] = $this->explodeProductKey($product_data['product_key'])['arVari'];
 						
 			$this->shop->render(WPSG_PATH_VIEW.'mods/mod_productvariants/productTemplate.phtml');
@@ -906,9 +940,24 @@
 		
 		/**
-		 * Gibt einene SchlÃŒssel => Wert Array der Produktvarianten zurÃŒck
+		 * Gibt einene Array mit Informationen aus dem VariantenschlÃŒssel zurÃŒck
+		 * Besp: pv_1|1:1 
+		 * Array
+			(
+    			[product_id] => 1
+    			[arVari] => Array 
+		 		(
+            		[1] => 1
+        		)
+
+			)
 		 * Anhand des ProduktschlÃŒssels z.B. pv|4:6|1:8|6:11|5:10
 		 */
 		public function explodeProductKey($product_key)
 		{
+		
+			if (is_numeric($product_key)) return array(
+				'product_id' => $product_key,
+				'arVari' => array()
+			);
 			
 			$arKey = explode('|', $product_key);
@@ -923,5 +972,8 @@
 			}
 			
-			return $arReturn;
+			return array(
+				'product_id' => substr($arKey[0], 3),
+				'arVari' => $arReturn
+			);
 			
 		} // public function explodeProductKey($product_key)
@@ -930,5 +982,5 @@
 		{
 			
-			$arProductVariant = $this->explodeProductKey($product_key);
+			$arProductVariant = $this->explodeProductKey($product_key)['arVari'];
 
 			foreach ($arProductVariant as $variant_id => $variation_id)
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 6115)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 6116)
@@ -382,5 +382,6 @@
 				if ($this->shop->hasMod('wpsg_mod_produktbilder'))
 				{
-					
+
+					$arBilder = array();
 					$arTemp = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($produkt_id)); 
 
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 6115)
+++ /mods/wpsg_mod_stock.class.php	(revision 6116)
@@ -459,8 +459,8 @@
 					 				
 			}
-			else if ($this->shop->hasMod('wpsg_mod_varianten'))
-			{
-				
-				$arStock[] = $this->shop->callMod('wpsg_mod_varianten', 'getStockForVarianten', array($produkt_key)); 
+			else if ($this->shop->hasMod('wpsg_mod_productvariants'))
+			{
+				
+				$arStock[] = $this->shop->callMod('wpsg_mod_productvariants', 'getStockForVariation', array($produkt_key)); 
 				 				
 			}
