Index: /lib/wpsg_calculation.class.php
===================================================================
--- /lib/wpsg_calculation.class.php	(revision 7721)
+++ /lib/wpsg_calculation.class.php	(revision 7723)
@@ -1525,5 +1525,7 @@
 
 		public function getSum($bruttonetto = WPSG_NETTO) {
-			
+
+		    if ($this->getProductCount() <= 0) return 0;
+
 			$arCalculation = $this->getCalculationArray();
 			
@@ -1549,8 +1551,50 @@
             
         }
+
+        /**
+         * @param int $product_index
+         */
+        public function getOrderProduct($product_index) {
+
+            foreach ($this->getCalculationArray()['product'] as $p) {
+
+                if (intval($p['product_index']) === $product_index) {
+
+                    return \wpsg_order_product::getInstance($p['order_product_id']);
+
+                }
+
+            }
+
+            return null;
+
+        }
                 
         /* Static */
-	
+
+        /**
+         * @param int $order_id
+         * @param bool $no_cache
+         * @return wpsg_calculation
+         */
+        public static function getOrderCalculation($order_id, $no_cache = false) {
+
+            $cache_key = __FUNCTION__.implode('|', \func_get_args());
+
+            if (!isset(self::$functionscache[$cache_key]) || $no_cache) {
+
+                $oCalculation = new wpsg_calculation();
+                $oCalculation->fromDB($order_id);
+
+                self::$functionscache[$cache_key] = $oCalculation;
+
+            }
+
+            return self::$functionscache[$cache_key];
+
+        }
+
 		/**
+         * @param bool $no_cache
          * @return wpsg_calculation
 		 */
Index: /model/wpsg_order_product.class.php
===================================================================
--- /model/wpsg_order_product.class.php	(revision 7721)
+++ /model/wpsg_order_product.class.php	(revision 7723)
@@ -56,9 +56,10 @@
 		} // public function getOneAmount($brutto_netto = WPSG_BRUTTO)
 		
-		public function getAmount($brutto_netto = WPSG_BRUTTO)
-		{
-			
-			if ($brutto_netto == WPSG_BRUTTO) return wpsg_tf($this->price_brutto * $this->menge);
-			else return wpsg_tf($this->price_netto * $this->menge);
+		public function getAmount($brutto_netto = WPSG_BRUTTO) {
+
+		    return intval($this->menge);
+
+			//if ($brutto_netto == WPSG_BRUTTO) return wpsg_tf($this->price_brutto * $this->menge);
+			//else return wpsg_tf($this->price_netto * $this->menge);
 			
 		} // public function getAmount()
@@ -133,4 +134,10 @@
         }
 
+        public function getPriceSum($tax_view = WPSG_NETTO) {
+
+            return $this->getPrice($tax_view) * $this->getAmount();
+
+        }
+
 		public function getProductKey()
 		{
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7721)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7723)
@@ -672,7 +672,6 @@
 								
 					$pwd_hash = $this->hashString($_REQUEST['wpsg']['mod_kundenverwaltung']['password']);
-					
-					// Versuchen den Kunden zu laden
-					$kunde_id = $this->db->fetchOne("
+
+					$strQuery = "
 						SELECT
 							K.`id`
@@ -684,5 +683,8 @@
 							K.`deleted` != '1' AND
 							K.`status` != '0' AND K.`status` != '-1'
-					");
+					";
+
+					// Versuchen den Kunden zu laden
+					$kunde_id = $this->db->fetchOne($strQuery);
 										
 					if ($kunde_id > 0) 
@@ -1125,5 +1127,5 @@
 						
 					$this->shop->view['data'] = array_merge($_SESSION['wpsg']['checkout'], $kunde);
-					$this->shop->view['error'] = $_SESSION['wpsg']['errorFields'];					
+					$this->shop->view['error'] = wpsg_getArray($_SESSION['wpsg']['errorFields']);
 					$this->shop->view['pflicht'] = $this->shop->loadPflichtFeldDaten();
 					$this->shop->view['custom_values'] = @unserialize($kunde['custom']);
@@ -1282,5 +1284,5 @@
 						$arProdukt = $this->db->fetchAssoc("
 							SELECT
-								(OP.`price` * OP.`menge`) AS `price`, OP.`p_id`,
+								OP.`price` AS `price`, OP.`p_id`,
 								OP.`menge`,
 								OP.`productkey`,
@@ -1299,5 +1301,5 @@
 						foreach ($arProdukt as $k2 => $v2)
 						{
-							
+
 							$produkt = $this->shop->loadProduktArray($v2['p_id']);
 							
