Index: /changelog
===================================================================
--- /changelog	(revision 7691)
+++ /changelog	(revision 7692)
@@ -347,2 +347,3 @@
 - Bugfix: Korrektur Weiterleitung nach Bestellerstellung im Backend / Task #713
 - Bugfix: Option "Zahlungskosten bei 0 ausblenden" blendet die Kosten nun auch in der Zusammenfassung aus / Task #717
+- Bugfix: FÃŒllmengenanzeige in Varianten kontrolliert (Varianten addieren FÃŒllmenge) / Task #719
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7691)
+++ /controller/wpsg_ShopController.class.php	(revision 7692)
@@ -2065,6 +2065,5 @@
 		 * LÃ€dt die Daten eines Produktes
 		 */
-		public function loadProduktArray($produkt_id, $override = array(), $loadDisabled = false)
-		{
+		public function loadProduktArray($produkt_id, $override = array(), $loadDisabled = false) {
 		    
 		    //if (array_key_exists($produkt_id, $this->productCache)) return $this->productCache[$produkt_id];
@@ -2080,11 +2079,9 @@
 
 			// Ãbersetzung einbeziehen
-			if ($this->isOtherLang())
-			{
+			if ($this->isOtherLang()) {
 
 				$produkt_trans = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($produkt_id)."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
 
-				if ($produkt_trans['id'] > 0)
-				{
+				if ($produkt_trans['id'] > 0) {
 
 					$produkt['name'] = $produkt_trans['name'];
Index: /controller/wpsg_SystemController.class.php
===================================================================
--- /controller/wpsg_SystemController.class.php	(revision 7691)
+++ /controller/wpsg_SystemController.class.php	(revision 7692)
@@ -94,5 +94,5 @@
 							
 			$bValid = wpsg_checkInput($value, $sanitize_type, $sanitize_params);
-
+			
 			if (!$bValid) {
 				 
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 7691)
+++ /lib/functions.inc.php	(revision 7692)
@@ -695,6 +695,9 @@
 			case WPSG_SANITIZE_ARRAY_TEXTFIELD:
 				
-				if (!is_array($val)) $bReturn = false;
-				else {
+				if (!is_array($val)) {
+					
+					$bReturn = false;
+					
+				} else {
 					
 					$bReturn = true;
Index: /mods/wpsg_mod_fuellmenge.class.php
===================================================================
--- /mods/wpsg_mod_fuellmenge.class.php	(revision 7691)
+++ /mods/wpsg_mod_fuellmenge.class.php	(revision 7692)
@@ -51,22 +51,26 @@
 		} // public function settings_edit()
 		
-		public function settings_save() 
-		{
+		public function settings_save() {
 			
 		    $this->shop->update_option('wpsg_mod_fuellmenge_einheit', $_REQUEST['wpsg_mod_fuellmenge_einheit'], false, false, WPSG_SANITIZE_TEXTFIELD);
 		    $this->shop->update_option('wpsg_mod_fuellmenge_bezug', $_REQUEST['wpsg_mod_fuellmenge_bezug'], false, false, WPSG_SANITIZE_FLOAT);
 		    $this->shop->update_option('wpsg_mod_fuellmenge_showAjaxDialog', $_REQUEST['wpsg_mod_fuellmenge_showAjaxDialog'], false, false, WPSG_SANITIZE_CHECKBOX);
-			if ($this->shop->hasMod('wpsg_mod_fuellmenge') == '1')
-			{
-				
-			    $this->shop->update_option('wpsg_mod_fuellmenge_showProductindex_fmenge', $_REQUEST['wpsg_mod_fuellmenge_showProductindex_fmenge'], false, false, WPSG_SANITIZE_CHECKBOX);
-			    $this->shop->update_option('wpsg_mod_fuellmenge_showProductindex_grundpreis', $_REQUEST['wpsg_mod_fuellmenge_showProductindex_grundpreis'], false, false, WPSG_SANITIZE_FLOAT);
-				
-			}
 			$this->shop->update_option('wpsg_mod_fuellmenge_showBasketProduct', $_REQUEST['wpsg_mod_fuellmenge_showBasketProduct'], false, false, WPSG_SANITIZE_CHECKBOX);
-			$this->shop->update_option('wpsg_mod_fuellmenge_showProductindexBackend_fmenge', $_REQUEST['wpsg_mod_fuellmenge_showProductindexBackend_fmenge'], false, false, WPSG_SANITIZE_CHECKBOX);
 			$this->shop->update_option('wpsg_mod_fuellmenge_showOverviewProduct', $_REQUEST['wpsg_mod_fuellmenge_showOverviewProduct'], false, false, WPSG_SANITIZE_CHECKBOX);
-			$this->shop->update_option('wpsg_mod:fuellmenge_showRequestPageProduct', $_REQUEST['wpsg_mod_fuellmenge_showRequestPageProduct'], false, false, WPSG_SANITIZE_CHECKBOX);
-			
+			
+			if ($this->shop->hasMod('wpsg_mod_productindex')) {
+				
+				$this->shop->update_option('wpsg_mod_fuellmenge_showProductindexBackend_fmenge', $_REQUEST['wpsg_mod_fuellmenge_showProductindexBackend_fmenge'], false, false, WPSG_SANITIZE_CHECKBOX);
+				$this->shop->update_option('wpsg_mod_fuellmenge_showProductindex_fmenge', $_REQUEST['wpsg_mod_fuellmenge_showProductindex_fmenge'], false, false, WPSG_SANITIZE_CHECKBOX);
+				$this->shop->update_option('wpsg_mod_fuellmenge_showProductindex_grundpreis', $_REQUEST['wpsg_mod_fuellmenge_showProductindex_grundpreis'], false, false, WPSG_SANITIZE_FLOAT);
+				
+			}
+			
+			if ($this->shop->hasMod('wpsg_mod_request')) { 
+			
+				$this->shop->update_option('wpsg_mod_fuellmenge_showRequestPageProduct', $_REQUEST['wpsg_mod_fuellmenge_showRequestPageProduct'], false, false, WPSG_SANITIZE_CHECKBOX,);
+				
+			}
+						
 		} // public function settings_save()
 		
@@ -93,7 +97,6 @@
 			
 		} //public function overview_row(&$p, $i)
-		
-		public function basket_toArray(&$produkt, $backend = false, $noMwSt = false)
-		{
+				
+		public function basket_toArray(&$produkt, $backend = false, $noMwSt = false) {
 		
 			$produkt['fuellmenge_one'] = $this->getFuellmenge($produkt['id']);
@@ -102,7 +105,6 @@
 		} //public function basket_toArray(&$produkt, $backend = false; $noMwSt = false)
 		
-		public function basket_toArray_preshippayment(&$basket, &$arBasket)
-		{
-		
+		public function basket_toArray_preshippayment(&$basket, &$arBasket) {
+		 
 			if ($basket->loadFromSession)
 			{
@@ -131,6 +133,5 @@
 		} // public function basket_toArray_final(&$basket, &$arBasket)
 		
-		public function getFuellmenge($product_key)
-		{
+		public function getFuellmenge($product_key) {
 		
 			$product_data_db = $this->shop->cache->loadProduct($this->shop->getProduktId($product_key));
@@ -222,20 +223,16 @@
 			
 		} // public function produkt_edit_sidebar(&$produkt_data)
-		 		
-		/*
-		public function loadProduktArray(&$produkt) {
-			
-			if (!isset($produkt['fmenge'])) $produkt['fmenge'] = 0; else $produkt['fmenge'] = wpsg_tf($produkt['fmenge']);
-			
-			$arValues = $this->calculateValues($produkt['preis'], $produkt['fmenge'], $produkt['id']);
-			die("=".$produkt['id']);
-			$produkt['fmenge'] = $arValues['fmenge'];			
-			$produkt['feinheit'] = $arValues['feinheit'];
-			$produkt['referencevalue'] = $arValues['feinheit'];
-			$produkt['referenceunit'] = $arValues['referenceunit'];
-			$produkt['fmenge_preis'] = $arValues['fmenge_preis'];
-			
-		} // public function renderProdukt_data(&$view)
-		*/
+		 		 
+		public function loadProduktArray(&$arProductData) {
+			
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && $this->shop->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', [$arProductData['product_key']])) {
+				
+				$variInfo = $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$arProductData['product_key']]);
+				
+				$arProductData['fmenge'] = $variInfo['fmenge'];
+					
+			}
+			
+		}
 		
 		/** Modulfunktionen */
