Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7357)
+++ /controller/wpsg_ShopController.class.php	(revision 7358)
@@ -4556,6 +4556,16 @@
 			if (!wpsg_isSizedArray($this->arShipping)) $this->arShipping = array();
 
-			$this->callMods('checkShippingAvailable', array(&$this->arShipping, &$this->view['basket']));
-
+			$this->callMods('checkShippingAvailable', array(&$this->arShipping));
+
+			if (isset($_SESSION['wpsg']['checkout']['shipping'])) {
+					
+				if (!array_key_exists($_SESSION['wpsg']['checkout']['shipping'], $this->arShipping)) {
+					
+					$_SESSION['wpsg']['checkout']['shipping'] = array_keys($this->arShipping)[0];
+					
+				}
+								
+			}
+			
 		} // public function checkShippingAvailable()
 
Index: /lib/wpsg_calculation.class.php
===================================================================
--- /lib/wpsg_calculation.class.php	(revision 7357)
+++ /lib/wpsg_calculation.class.php	(revision 7358)
@@ -906,5 +906,5 @@
 			
 			$ses = (isset($_SESSION['wpsg'])?$_SESSION['wpsg']:[]);
-			
+			 
 			$oDefaultCountry = $this->shop->getDefaultCountry();			
 			$this->addCountry($oDefaultCountry->id, $oDefaultCountry->mwst, $oDefaultCountry->mwst_a, $oDefaultCountry->mwst_b, $oDefaultCountry->mwst_c, $oDefaultCountry->mwst_d,true);
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 7357)
+++ /mods/wpsg_mod_basic.class.php	(revision 7358)
@@ -602,5 +602,5 @@
 		 * 
 		 */
-		public function checkShippingAvailable(&$arShipping, &$arBasket) { }
+		public function checkShippingAvailable(&$arShipping) { }
 
 		/**
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 7357)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 7358)
@@ -641,47 +641,4 @@
 
     } // public function addShipping(&$arShipping) 
-
-    public function checkShippingAvailable(&$arShipping, &$arBasket)
-    {
-
-        return;
-        
-        if (!array_key_exists($this->id, $arShipping)) return;
-
-        $bPDF = false; $bOther = false;
-
-        foreach ((array)$arBasket['produkte'] as $p)
-        {
-
-            if ($this->isPDFProdukt($p['id']))
-            {
-
-                $bPDF = true;
-
-            }
-            else
-            {
-
-                $bOther = true;
-
-            }
-
-        }
-
-        if (!$bPDF || $bOther)
-        {
-
-            unset($arShipping[$this->id]);
-
-        }
-        else
-        {
-
-            // Wenn Downloadprodukt dann alle anderen entfernen
-            foreach ($arShipping as $k => $v) { if ($k != $this->id) { unset($arShipping[$k]); } }
-
-        }
-
-    } // public function checkShippingAvailable(&$arShipping, &$arBasket)
 
     /**
Index: /mods/wpsg_mod_downloadprodukte.class.php
===================================================================
--- /mods/wpsg_mod_downloadprodukte.class.php	(revision 7357)
+++ /mods/wpsg_mod_downloadprodukte.class.php	(revision 7358)
@@ -356,51 +356,5 @@
 			
 		} // public function basket_toArray(&$produkt, $backend = false, $noMwSt = false) 
-		
-		public function checkShippingAvailable(&$arShipping, &$arBasket) 
-		{ 
-			
-		    return;
-		    
-			if (!wpsg_isSizedArray($arShipping) || !array_key_exists($this->id, $arShipping)) return;
-			
-			$bPDF = false; $bOther = false;
-			
-			foreach ((array)$arBasket['produkte'] as $p)
-			{
-
-				$produkt_id = $this->shop->getProduktID($p['id']);
-				
-				if ($this->getProdFiles($produkt_id) === false)
-				{
-					
-					$bOther = true;
-					
-				}
-				else
-				{
-					
-					$bPDF = true;
-					
-				}
-				 
-				
-			} 
-			
-			if (!$bPDF || $bOther)
-			{
-				
-				unset($arShipping[$this->id]);
-				
-			}
-			else
-			{
-				
-				// Wenn Downloadprodukt dann alle anderen entfernen
-				foreach ($arShipping as $k => $v) { if ($k != $this->id) { unset($arShipping[$k]); } }
-			  
-			}
-			
-		} // public function checkShippingAvailable(&$arShipping, &$arBasket)
-		
+				
 		/**
 		 * Ã€ndert den Status der Bestllung und sendet eine Mail mit dem Downloadlink(s) an den Kunde
Index: /mods/wpsg_mod_freeshipping.class.php
===================================================================
--- /mods/wpsg_mod_freeshipping.class.php	(revision 7357)
+++ /mods/wpsg_mod_freeshipping.class.php	(revision 7358)
@@ -70,26 +70,27 @@
 		} // public function addShipping(&$arShipping)
 		
-		public function checkShippingAvailable(&$arShipping, &$arBasket) 
+		public function checkShippingAvailable(&$arShipping) 
 		{
-
-			if (!wpsg_isSizedArray($this->shop->arShipping)) return;
 			
-			// Ist die Versandart ÃŒberhaupt drin ?
-			if (!array_key_exists($this->id, $this->shop->arShipping)) return;
-				
-			if ($arBasket['sum']['preis_brutto'] <= $this->shop->get_option('wpsg_mod_freeshipping_minvalue')) {
-				 
+			if (!wpsg_isSizedArray($this->shop->arShipping) || !array_key_exists($this->id, $this->shop->arShipping)) return;
+						
+			$oCalculation = \wpsg\wpsg_calculation::getSessionCalculation();
+			$arCalculation = $oCalculation->getCalculationArray();
+			
+			if ($this->shop->getBackendTaxview() === WPSG_NETTO) $sum = $arCalculation['sum']['productsum_netto'];
+			else $sum = $arCalculation['sum']['productsum_brutto'];
+			  				
+			if ($sum < wpsg_tf($this->shop->get_option('wpsg_mod_freeshipping_minvalue'))) {
+								
 				unset($arShipping[$this->id]);
 			
-			}
-			else 
-			{
+			} else {
 				
 				// Alle anderen Versandarten entfernen
 				foreach ($arShipping as $k => $v) { if ($k != $this->id && $k != '130') unset($arShipping[$k]); }
-						
-			}
+				
+			} 
 			
-		} // public function checkShippingAvailable(&$arShipping, &$arBasket)
+		} // public function checkShippingAvailable(&$arShipping)
  	
 	} // class wpsg_mod_freeshipping extends wpsg_mod_basic
Index: /system/intern/mods/wpsg_mod_videodownload.class.php
===================================================================
--- /system/intern/mods/wpsg_mod_videodownload.class.php	(revision 7357)
+++ /system/intern/mods/wpsg_mod_videodownload.class.php	(revision 7358)
@@ -381,5 +381,5 @@
 		} // public function addShipping(&$arShipping)
 		
-		public function checkShippingAvailable(&$arShipping, &$arBasket) 
+		public function checkShippingAvailable(&$arShipping) 
 		{ 
 			
@@ -414,5 +414,5 @@
 			}
 			
-		} // public function checkShippingAvailable(&$arShipping, &$arBasket)
+		} // public function checkShippingAvailable(&$arShipping)
 		
 		public function calcShipping(&$arBasket, $shipping_key) { 
Index: /views/warenkorb/basket.phtml
===================================================================
--- /views/warenkorb/basket.phtml	(revision 7357)
+++ /views/warenkorb/basket.phtml	(revision 7358)
@@ -233,8 +233,8 @@
 				</div>
 				<div class="value">
-					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { 
+					<?php if ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') && isset($this->view['basket']['arCalculation']['shipping'][0]['tax_key'])) { 
 						
 						$shipping_tax_key = $this->view['basket']['arCalculation']['shipping'][0]['tax_key'];
-						
+ 						
 						if ($shipping_tax_key === '0') {
 							
@@ -252,9 +252,13 @@
 					<?php 
 						
-						echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency'));
-						
-						if (strpos($this->view['basket']['arCalculation']['shipping'][0]['set'], '%') !== false) {
-							
-							echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($this->view['basket']['arCalculation']['shipping'][0]['set']), '%').')</span>';
+						if (isset($this->view['basket']['arCalculation']['shipping'][0]['tax_key'])) {
+						
+							echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency'));
+							
+							if (strpos($this->view['basket']['arCalculation']['shipping'][0]['set'], '%') !== false) {
+								
+								echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($this->view['basket']['arCalculation']['shipping'][0]['set']), '%').')</span>';
+								
+							}
 							
 						}
@@ -283,5 +287,5 @@
 					</div>
 					<div class="value">
-						<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') {
+						<?php if ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') && isset($this->view['basket']['arCalculation']['payment'][0]['tax_key'])) {
 							
 							$payment_tax_key = $this->view['basket']['arCalculation']['payment'][0]['tax_key'];
@@ -302,9 +306,13 @@
 						<?php 
 							
-							echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); 
-						
-							if (strpos($this->view['basket']['arCalculation']['payment'][0]['set'], '%') !== false) {
-								
-								echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($this->view['basket']['arCalculation']['payment'][0]['set']), '%').')</span>';
+							if (isset($this->view['basket']['arCalculation']['payment'][0]['tax_key'])) {
+							
+								echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); 
+							
+								if (strpos($this->view['basket']['arCalculation']['payment'][0]['set'], '%') !== false) {
+									
+									echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($this->view['basket']['arCalculation']['payment'][0]['set']), '%').')</span>';
+									
+								}
 								
 							}
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 7357)
+++ /wpshopgermany.php	(revision 7358)
@@ -255,3 +255,3 @@
 	$GLOBALS['wpsg_sc']->callMods('load', array());
 	
-	remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
+	//remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
