Index: /controller/wpsg_ProduktController.class.php
===================================================================
--- /controller/wpsg_ProduktController.class.php	(revision 5842)
+++ /controller/wpsg_ProduktController.class.php	(revision 5845)
@@ -640,4 +640,20 @@
 			);
 			
+			$this->shop->view['partikel_select'] = array();
+			
+			$arArtikel = get_posts('numberposts=-1'); if (wpsg_isSizedArray($arArtikel)) {
+				
+				$this->shop->view['partikel_select']['article'] = array(__('Artikel', 'wpsg'), array());				
+				foreach ($arArtikel as $a) $this->shop->view['partikel_select']['article'][1][$a->ID] = $a->post_title;
+				
+			}
+			
+			$arPages = get_pages(); if (wpsg_isSizedArray($arPages)) { 
+			
+				$this->shop->view['partikel_select']['pages'] = array(__('Seiten', 'wpsg'), array());				
+				foreach ($arPages as $p) $this->shop->view['partikel_select']['pages'][1][$p->ID] = $p->post_title;
+			
+			}
+			
 			$this->shop->view['arSubAction'] = array(
 				'general' => array(
@@ -652,4 +668,5 @@
 			);
 			
+									
 			$this->shop->callMods('product_addedit_content', array(&$this->shop->view['arSubAction'], &$this->shop->view['data']));
 			
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5842)
+++ /controller/wpsg_ShopController.class.php	(revision 5845)
@@ -1232,57 +1232,68 @@
 		{
 			
-			$this->bShortcode = true;
-			
-			if (!$this->hasActiveLicence() && $this->getDemoDays() <= 0)
-			{
-
-				// Ihre <a title="Informationen ÃŒber das wpShopGermandy Wordpress Shop Plugin System" href="http://wpshopgermany.de">wpShopGermany</a> <a href="http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/" title="wpShopGermany Wordpress Shop Plugin System Lizenz erwerben">Lizenz</a> ist abgelaufen.<br />
-				return base64_decode('SWhyZSA8YSB0aXRsZT0iSW5mb3JtYXRpb25lbiDDvGJlciBkYXMgd3BTaG9wR2VybWFuZHkgV29yZHByZXNzIFNob3AgUGx1Z2luIFN5c3RlbSIgaHJlZj0iaHR0cDovL3dwc2hvcGdlcm1hbnkuZGUiPndwU2hvcEdlcm1hbnk8L2E+IDxhIGhyZWY9Imh0dHA6Ly9zaG9wLm1hZW5uY2hlbjEuZGUvcHJvZHVrdGUvd3BzaG9wZ2VybWFueS1saXplbnprZXkvIiB0aXRsZT0id3BTaG9wR2VybWFueSBXb3JkcHJlc3MgU2hvcCBQbHVnaW4gU3lzdGVtIExpemVueiBlcndlcmJlbiI+TGl6ZW56PC9hPiBpc3QgYWJnZWxhdWZlbi48YnIgLz4=');
-			
-			}
-			
-			if (isset($atts['template']))
-			{
-				
-				$template = $atts['template']; 
-				
-			}
-			else if (isset($atts['produktgruppe']))
-			{
-				
-				return $this->callMod('wpsg_mod_productgroups', 'shortcode', array($atts));
-				
-			}
-			else
-			{
-				
-				$template = false;
-				
-			}
-			
-			if ($atts['product'] === '-1')
-			{
-					
-				$arProductIDs = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` ORDER BY `id` ASC ");		
-				$content = '';
-				
-				foreach ($arProductIDs as $product_id)
-				{
-					
-					$content .= $this->renderProdukt($product_id, $template);
-					
-				}
-				
-				return $content;
-				
-			}
-			else
-			{
-			
-				return $this->renderProdukt($atts['product'], $template);
-					
-			}
-			
-			$this->bShortcode = false;
+			try
+			{
+			
+				$this->bShortcode = true;
+			
+				if (!$this->hasActiveLicence() && $this->getDemoDays() <= 0)
+				{
+	
+					// Ihre <a title="Informationen ÃŒber das wpShopGermandy Wordpress Shop Plugin System" href="http://wpshopgermany.de">wpShopGermany</a> <a href="http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/" title="wpShopGermany Wordpress Shop Plugin System Lizenz erwerben">Lizenz</a> ist abgelaufen.<br />
+					return base64_decode('SWhyZSA8YSB0aXRsZT0iSW5mb3JtYXRpb25lbiDDvGJlciBkYXMgd3BTaG9wR2VybWFuZHkgV29yZHByZXNzIFNob3AgUGx1Z2luIFN5c3RlbSIgaHJlZj0iaHR0cDovL3dwc2hvcGdlcm1hbnkuZGUiPndwU2hvcEdlcm1hbnk8L2E+IDxhIGhyZWY9Imh0dHA6Ly9zaG9wLm1hZW5uY2hlbjEuZGUvcHJvZHVrdGUvd3BzaG9wZ2VybWFueS1saXplbnprZXkvIiB0aXRsZT0id3BTaG9wR2VybWFueSBXb3JkcHJlc3MgU2hvcCBQbHVnaW4gU3lzdGVtIExpemVueiBlcndlcmJlbiI+TGl6ZW56PC9hPiBpc3QgYWJnZWxhdWZlbi48YnIgLz4=');
+				
+				}
+				
+				if (isset($atts['template']))
+				{
+					
+					$template = $atts['template']; 
+					
+				}
+				else if (isset($atts['produktgruppe']))
+				{
+					
+					return $this->callMod('wpsg_mod_productgroups', 'shortcode', array($atts));
+					
+				}
+				else
+				{
+					
+					$template = false;
+					
+				}
+				
+				if ($atts['product'] === '-1')
+				{
+						
+					$arProductIDs = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` ORDER BY `id` ASC ");		
+					$content = '';
+					
+					foreach ($arProductIDs as $product_id)
+					{
+						
+						$content .= $this->renderProdukt($product_id, $template);
+						
+					}
+					
+					return $content;
+					
+				}
+				else
+				{
+				
+					return $this->renderProdukt($atts['product'], $template);
+						
+				}
+				
+				$this->bShortcode = false;
+				
+			}
+			catch (Exception $e)
+			{
+				
+				return $e->getMessage();
+				
+			}
 			
 		} // public function shortcode($atts, $content = '')
@@ -1451,5 +1462,7 @@
 		
 			$produkt = $this->cache->loadProduct($produkt_id);
-									
+					
+			if (!wpsg_isSizedArray($produkt)) throw new \Exception('Produkt (ID:'.$produkt_id.') konnte nicht geladen werden.');
+			
 			foreach ($override as $k => $v) $produkt[$k] = $v;
 						
Index: /lib/install.php
===================================================================
--- /lib/install.php	(revision 5842)
+++ /lib/install.php	(revision 5845)
@@ -58,4 +58,27 @@
 	
 	dbDelta($sql);
+
+	/**
+	 * Adresstabelle
+	 */
+	
+	$sql = "CREATE TABLE ".WPSG_TBL_ADRESS." (
+		id mediumint(9) NOT NULL AUTO_INCREMENT,
+		cdate datetime NOT NULL,
+		title VARCHAR(50) NOT NULL,
+		name VARCHAR(255) NOT NULL,	   			
+   		vname VARCHAR(255) NOT NULL,
+   		firma VARCHAR(255) NOT NULL,
+   		fax VARCHAR(255) NOT NULL,
+   		strasse VARCHAR(255) NOT NULL,
+   		nr VARCHAR(100) NOT NULL,
+   		plz VARCHAR(255) NOT NULL,
+   		ort VARCHAR(255) NOT NULL,
+   		land VARCHAR(100) NOT NULL,
+   		tel VARCHAR(100) NOT NULL, 		
+   		PRIMARY KEY  (id)
+	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
+
+	dbDelta($sql);
  	
 	/**
@@ -65,21 +88,11 @@
    		id int(25) NOT NULL AUTO_INCREMENT,
    		knr VARCHAR(255) NOT NULL,
-   		paypal_payer_id VARCHAR(255) NOT NULL,
-   		title VARCHAR(50) NOT NULL,
-   		name VARCHAR(255) NOT NULL,	   			
-   		vname VARCHAR(255) NOT NULL,
-   		email VARCHAR(255) NOT NULL,
-   		firma VARCHAR(255) NOT NULL,   		
-   		fax VARCHAR(255) NOT NULL,
-   		strasse VARCHAR(255) NOT NULL,
-   		plz VARCHAR(255) NOT NULL,
-   		ort VARCHAR(255) NOT NULL,
-   		land VARCHAR(100) NOT NULL, 
-   		tel VARCHAR(100) NOT NULL,
+   		paypal_payer_id VARCHAR(255) NOT NULL,   		
    		geb DATE NOT NULL,
    		ustidnr VARCHAR(100) NOT NULL,   		
    		custom TEXT NOT NULL,
-   		PRIMARY KEY  (id),
-   		KEY land (land)
+   		adress_id INT(11) NOT NULL COMMENT 'Link zu WPSG_TBL_ADRESS (Kundenadresse)',
+   		KEY adress_id (adress_id),
+   		PRIMARY KEY  (id)
    	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
    	
@@ -111,14 +124,5 @@
    		mwst_shipping DOUBLE(10,4) NOT NULL,
    		type_shipping VARCHAR(255) NOT NULL,
-   		type_payment VARCHAR(255) NOT NULL,
-   		shipping_title VARCHAR(255) NOT NULL,
-   		shipping_vname VARCHAR(255) NOT NULL,
-		shipping_name VARCHAR(255) NOT NULL,				
-	  	shipping_strasse VARCHAR(255) NOT NULL,
-	  	shipping_hausnr VARCHAR(255) NOT NULL,
-	  	shipping_plz VARCHAR(255) NOT NULL,
-	  	shipping_ort VARCHAR(255) NOT NULL,
-	  	shipping_land VARCHAR(100) NOT NULL,
-	  	shipping_firma VARCHAR(255) NOT NULL,
+   		type_payment VARCHAR(255) NOT NULL,   		
 	  	bname VARCHAR(500) NOT NULL,
 		bblz VARCHAR(500) NOT NULL,
@@ -137,8 +141,11 @@
    		admincomment TEXT NOT NULL,
    		language VARCHAR(10) NOT NULL,
-   		PRIMARY KEY  (id),
+   		adress_id INT(11) NOT NULL COMMENT 'Link zu WPSG_TBL_ADRESS (Rechnungsadresse)',
+   		shipping_adress_id INT(11) NOT NULL COMMENT 'Link zu WPSG_TBL_ADRESS (Lieferanschrift)',
+   		KEY adress_id (adress_id),
+   		KEY shipping_adress_id (shipping_adress_id),
    		KEY k_id (k_id),
    		KEY gs_id (gs_id),
-   		KEY shipping_land (shipping_land)
+   		PRIMARY KEY  (id)
    	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
 	
Index: /model/wpsg_customer.class.php
===================================================================
--- /model/wpsg_customer.class.php	(revision 5842)
+++ /model/wpsg_customer.class.php	(revision 5845)
@@ -7,4 +7,6 @@
 	{
 		
+		private $adress_data;
+		
 		/**
 		 * LÃ€dt die Kundendaten aus der Datenbank
@@ -17,14 +19,10 @@
 			$this->data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_KU."` WHERE `id` = '".wpsg_q($customer_id)."' ");
 			
+			if (wpsg_isSizedInt($this->data['adress_id'])) $this->adress_data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ADRESS."` WHERE `id` = '".wpsg_q($this->data['adress_id'])."' ");
+			else $this->adress_data = false;
+			
 			return true;
 			
 		} // public function load($id)
-
-		public function getTitle()
-		{
-
-			return $this->title;
-
-		} // public function getTitle()
 
 		/**
@@ -36,5 +34,5 @@
 		{
 			
-			if (preg_match('/Frau/i', $this->title))
+			if (preg_match('/Frau/i', $this->getTitle()))
 			{
 				
@@ -50,4 +48,31 @@
 			
 		} // public function getGender()
+		
+		/**
+		 * Gibt die Anrede zurÃŒck
+		 */
+		public function getTitle()
+		{
+			
+			$title = "";
+			
+			if ($this->adress_data === false) $title = $this->data['title'];
+			else $title = $this->adress_data['title'];
+			
+			if ($title == "-1") return "";
+			else return $title;
+			
+		} // public function getTitle()
+		
+		/**
+		 * Gibt die Firma zurÃŒck
+		 */
+		public function getCompany()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['firma']);
+			else return $this->adress_data['firma']; 
+			
+		} // public function getCompany()
 		
 		/**
@@ -58,8 +83,9 @@
 		{
 			
-			return $this->vname;
+			if ($this->adress_data === false) return wpsg_getStr($this->data['vname']);
+			else return $this->adress_data['vname'];
 			
 		} // public function getFirstname()
-		
+		 
 		/**
 		 * Gibt den Namen des Kunden zurÃŒck
@@ -69,8 +95,144 @@
 		{
 			
-			return $this->name;
+			if ($this->adress_data === false) return wpsg_getStr($this->data['name']);
+			else return $this->adress_data['name'];
 			
 		} // public function getName()
-
+				
+		/**
+		 * Gibt die Telefonnummer zurÃŒck
+		 */
+		public function getPhone()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['tel']);
+			else return $this->adress_data['tel']; 
+			
+		} // public function getPhone()
+		
+		/**
+		 * Gibt die Fax Nummer zurÃŒck
+		 */
+		public function getFax()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['fax']);
+			else return $this->adress_data['fax']; 
+			
+		} // public function getFax()
+				
+		/**
+		 * @param $trimHnr Wenn true, dann wird versucht die Hausnummer abzutrennen (Wenn Hnr nicht separat erfasst)
+		 * @return String der Reine StraÃenname der Rechnungsadresse
+		 */
+		public function getStreetClear($trimHnr = false)
+		{
+			
+			if (wpsg_isSizedInt($this->shop->get_option('wpsg_showNr')) && $trimHnr === true)
+			{
+				
+				if ($this->adress_data === false) $street = wpsg_getStr($this->data['strasse']);
+				else $street = $this->adress_data['strasse'];
+				
+				return preg_replace('/\040+\d+$/', '', $street);
+				
+			}
+			else
+			{
+				
+				if ($this->adress_data === false) return wpsg_getStr($this->data['strasse']);
+				else return $this->adress_data['strasse'];
+				
+			}
+			
+		} // public function getStreetClear() 	
+		
+		/**
+		 * Gibt die StraÃe (inkl. Hausnummer) des Kunden zurÃŒck
+		 * @return String StraÃe des Kunden
+		 */
+		public function getStreet()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['strasse']);
+			else return rtrim($this->adress_data['strasse'].' '.$this->adress_data['nr']);
+						
+		} // public function getStreet()
+		
+		/**
+		 * Gibt die Hausnummer des Kunden zurÃŒck
+		 * @return String Hausnummer des Kunden
+		 */
+		public function getStreetNr()
+		{
+			
+			if (wpsg_isSizedInt($this->shop->get_option('wpsg_showNr')))
+			{
+				
+				//return $this->nr
+				
+			}
+			
+			return preg_replace('/(.*)\040/', '', $this->strasse);
+			
+		} // public function getStreetNr()
+		
+		/**
+		 * Gibt die Postleitzahl des Kunden zurÃŒck
+		 * @return String Postleitzahl des Kunden
+		 */
+		public function getZip()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['plz']);
+			else return $this->adress_data['plz'];
+			
+		} // public function getZip()
+		
+		/**
+		 * Gibt den Order des Kunden zurÃŒck
+		 * @return String Wohnort des Kunden
+		 */
+		public function getCity()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['ort']);
+			else return $this->adress_data['ort'];
+			
+		} // public function getCity()
+				
+		/**
+		 * Gibt die ID des Landes zurÃŒck
+		 * @return \Integer ID des Landes
+		 */
+		public function getCountryID()
+		{
+			
+			if ($this->adress_data === false) return wpsg_getStr($this->data['land']);
+			else return $this->adress_data['land']; 
+			
+		} // public function getCountryID()
+		
+		/**
+		 * Gibt das KÃŒrzel des Landes zurÃŒck
+		 * In der Regel sollte es dem ISO Code entsprechen
+		 */
+		public function getCountryKuerzel()
+		{
+			
+			return $this->db->fetchOne("SELECT `kuerzel` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getCountryID())."' ");
+			
+		} // public function getCountryKuerzel()
+		
+		/**
+		 * Gibt den Namen des Landes zurÃŒck
+		 */
+		public function getCountryName()
+		{
+			 
+			return $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getCountryID())."' ");
+			
+		} // public function getCountryName()
+ 		
 		/**
 		 * Darstellung des Kunden
@@ -82,75 +244,8 @@
 
 		} // public function getLabel()
-
-		/**
-		 * Gibt die Firma zurÃŒck
-		 */
-		public function getCompany()
-		{
-
-			$company = $this->firma;
-
-			return $company;
-
-		} // public function getCompany()
 
 		/** Gibt die Kundennummer zurÃŒck */
 		public function getNr() { return $this->knr; } // public function getNr()
-
-		/**
-		 * Versucht die Hausnummer von der StraÃe abzutrennen und nur die StraÃe zurÃŒckzugeben
-		 * @return String der Reine StraÃenname der Rechnungsadresse
-		 */
-		public function getStreetClear()
-		{
-			
-			return preg_replace('/\040+\d+$/', '', $this->strasse);
-			
-		} // public function getStreetClear() 	
-		
-		/**
-		 * Gibt die StraÃe des Kunden zurÃŒck
-		 * @return String StraÃe des Kunden
-		 */
-		public function getStreet()
-		{
-			
-			return $this->strasse;
-			
-		} // public function getStreet()
-		
-		/**
-		 * Gibt die Hausnummer des Kunden zurÃŒck
-		 * @return String Hausnummer des Kunden
-		 */
-		public function getStreetNr()
-		{
-			
-			return preg_replace('/(.*)\040/', '', $this->strasse);
-			
-		} // public function getStreetNr()
-		
-		/**
-		 * Gibt die Postleitzahl des Kunden zurÃŒck
-		 * @return String Postleitzahl des Kunden
-		 */
-		public function getZip()
-		{
-			
-			return $this->plz;
-			
-		} // public function getZip()
-		
-		/**
-		 * Gibt den Order des Kunden zurÃŒck
-		 * @return String Wohnort des Kunden
-		 */
-		public function getCity()
-		{
-			
-			return $this->ort;
-			
-		} // public function getCity()
-		
+    
 		/**
 		 * Gibt das Geburtsdatum zurÃŒck
@@ -175,25 +270,5 @@
 			
 		} // public function getBirthdate()
-
-		/**
-		 * Gibt die Telefonnummer zurÃŒck
-		 */
-		public function getPhone()
-		{
-			
-			return $this->tel;
-			
-		} // public function getPhone()
-		
-		/**
-		 * Gibt die Fax Nummer zurÃŒck
-		 */
-		public function getFax()
-		{
-			
-			return $this->fax;
-			
-		} // public function getFax()
-		
+ 
 		/**
 		 * Gibt die EMail des Kunden zurÃŒck 
@@ -247,37 +322,5 @@
 
 		} // public function getOrderCount()
-
-		/**
-		 * Gibt die ID des Landes zurÃŒck
-		 * @return \Integer ID des Landes
-		 */
-		public function getCountryID()
-		{
-			
-			return $this->land;
-			
-		} // public function getCountryID()
-		
-		/**
-		 * Gibt das KÃŒrzel des Landes zurÃŒck
-		 * In der Regel sollte es dem ISO Code entsprechen
-		 */
-		public function getCountryKuerzel()
-		{
-			
-			return $this->db->fetchOne("SELECT `kuerzel` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getCountryID())."' ");
-			
-		} // public function getCountryKuerzel()
-		
-		/**
-		 * Gibt den Namen des Landes zurÃŒck
-		 */
-		public function getCountryName()
-		{
-			
-			return $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getCountryID())."' ");
-			
-		} // public function getCountryName()
-
+ 
 		/* Statische Funktionen */
 
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 5842)
+++ /model/wpsg_order.class.php	(revision 5845)
@@ -7,7 +7,7 @@
 	{
 
+		/** @var bool wpsg_customer */
 		var $customer = false; // Kundenobjekt
-		var $bShippingAdress = false;
-
+		
 		/* Klassenvariablen */
 		var $_innerEu = null;
@@ -25,6 +25,5 @@
 			@$this->data = &$this->shop->cache->loadOrder($order_id);
 			@$this->customer = &$this->shop->cache->loadCustomerObject($this->data['k_id']);			
-			$this->bShippingAdress = $this->shop->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array($this->data['k_id'], $order_id));
-			
+						
 			if ($this->data['id'] != $order_id) $this->shop->throwErrorCode('100_1');
 
@@ -380,134 +379,5 @@
 
 		} // public function getProductKeys()
-
-		public function getInvoiceTitle()
-		{
-			
-			$invoice_title = $this->customer->getTitle();
-
-			if ($invoice_title == '-1') return '';
-			else return $invoice_title;
-			
-		}
-		
-		/**
-		 * Gibt das Geschlecht des RechnungsempfÃ€ngers zurÃŒck
-		 * @return String Geschlecht des RechnungsempfÃ€ngers
-		 */
-		public function getInvoiceGender()
-		{
-			
-			return $this->customer->getGender();
-			
-		} // public function getInvoiceGender()
-		
-		/**
-		 * Gibt den Vornamen des RechnungsempfÃ€ngers zurÃŒck
-		 * @return String Vorname des RechnungsempfÃ€ngers
-		 */
-		public function getInvoiceFirstName()
-		{
-			
-			return $this->customer->getFirstName();
-			
-		} // public function getInvoiceFirstName()
-		
-		/**
-		 * Gibt den Namen des RechnungsempfÃ€ngers zurÃŒck
-		 * @return String Name des RechnungsempfÃ€ngers
-		 */
-		public function getInvoiceName()
-		{
-			
-			return $this->customer->getName();
-			
-		} // public function getInvoiceName()
-				
-		/**
-		 * Gibt die StraÃe der Rechnungsadresse zurÃŒck
-		 * @return String StraÃe der Rechnungsanschrift
-		 */
-		public function getInvoiceStreet()
-		{
-			
-			return $this->customer->getStreet();
-			
-		} // public function getInvoiceStreet()
-		
-		/**
-		 * Versucht die Hausnummer von der StraÃe abzutrennen und nur die StraÃe zurÃŒckzugeben
-		 * @return String der Reine StraÃenname der Rechnungsadresse
-		 */
-		public function getInvoiceStreetClear()
-		{
-			
-			return $this->customer->getStreetClear();
-			
-		} // public function getInvoiceStreetClear()
-		
-		/**
-		 * Gibt die StraÃennummer der Rechnungsadresse zurÃŒck
-		 * @return String Hausnummer der Rechnungsanschrift
-		 */
-		public function getInvoiceStreetNr()
-		{
-			
-			return $this->customer->getStreetNr();
-			
-		} // public function getInvoiceStreetNr()
-		
-		/**
-		 * Gibt die Postleitzahl der Rechnungsadresse zurÃŒck
-		 * @return String PLZ der Rechnungsadresse
-		 */
-		public function getInvoiceZip()
-		{
-			
-			return $this->customer->getZip();
-			
-		} // public function getInvoiceZip()
-		
-		/**
-		 * Gibt den Ort der Rechnungsadresse zurÃŒck
-		 * @return String Ort der Rechnungsadresse
-		 */
-		public function getInvoiceCity()
-		{
-			
-			return $this->customer->getCity();
-			 
-		} // public function getInvoiceCity()
-		
-		/**
-		 * Gibt die ID des Landes zurÃŒck, an die die Rechnung ging
-		 * @return \Integer ID des Landes fÃŒr die Rechnung
-		 */
-		public function getInvoiceCountry()
-		{
-				
-			return $this->customer->getCountryID();
-			
-		} // public function getInvoiceCountry()
-		
-		/**
-		 * Gibt das KÃŒrzel des Rechnungslandes zurÃŒck
-		 */
-		public function getInvoiceCountryKuerzel()
-		{
-				
-			return $this->customer->getCountryKuerzel();
-				
-		} // public function getInvoiceCountryKuerzel()
-		
-		/**
-		 * Gibt den Namen des Landes der Rechnungsadresse zurÃŒck
-		 */
-		public function getInvoiceCountryName()
-		{
-			
-			return $this->customer->getCountryName();
-			
-		} // public function getInvoiceCountryName()
-
+ 
 		/**
 		 * Gibt die Bezeichnung des Status der Bestellung zurÃŒck
@@ -523,17 +393,236 @@
 		} // public function getStateLabel()
 
-		/**
-		 * Gibt die Anrede der Versandadresse zurÃŒck
-		 */
-		public function getShippingTitle()
-		{
-			
-			$shipping_title = $this->shipping_title;
-
-			if ($shipping_title == '-1') return '';
-			else return $shipping_title;
-			
-		} // public function getShippingTitle() {
-
+		/* Rechnungsadresse */
+		
+		/**
+		 * Gibt das Geschlecht des RechnungsempfÃ€ngers zurÃŒck
+		 * @return String Geschlecht des RechnungsempfÃ€ngers
+		 */
+		public function getInvoiceGender()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getGender();
+			else 
+			{
+				
+				if (preg_match('/Frau/i', $this->getInvoiceTitle()))
+				{
+					
+					return 'f';
+					
+				}
+				else
+				{
+					
+					return 'm';
+					
+				}
+				
+			}
+			
+		} // public function getInvoiceGender()
+
+		/**
+		 * Gibt die Firma des RechnungsempfÃ€ngers zurÃŒck
+		 */
+		public function getInvoiceCompany()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getCompany();
+			else return $this->adress_data['firma'];
+			
+		} // public function getInvoiceCompany()
+		
+		/**
+		 * Gibt die Anrede zurÃŒck
+		 */
+		public function getInvoiceTitle()
+		{
+			 
+			if ($this->adress_data === false) $title = $this->data['title'];
+			else $title = $this->adress_data['title'];
+			
+			if ($title == "-1") return "";
+			else return $title;
+			
+		} // public function getTitle()
+		
+		/**
+		 * Gibt den Vornamen des RechnungsempfÃ€ngers zurÃŒck
+		 * @return String Vorname des RechnungsempfÃ€ngers
+		 */
+		public function getInvoiceFirstName()
+		{
+			 
+			if ($this->adress_data === false) return $this->customer->getFirstName();
+			else return $this->adress_data['vname']; 
+			
+		} // public function getInvoiceFirstName()
+		
+		/**
+		 * Gibt den Namen des RechnungsempfÃ€ngers zurÃŒck
+		 * @return String Name des RechnungsempfÃ€ngers
+		 */
+		public function getInvoiceName()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getName();
+			else return $this->adress_data['name'];
+			
+		} // public function getInvoiceName()
+
+		/**
+		 * Gibt die Fax Nummer des RechnungsempfÃ€ngers zurÃŒck
+		 */
+		public function getInvoiceFax()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getFax();
+			else return $this->adress_data['fax'];
+			
+		} // public function getInvoiceFax()
+		
+		/**
+		 * Gibt die Fax Nummer des RechnungsempfÃ€ngers zurÃŒck
+		 */
+		public function getInvoicePhone()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getPhone();
+			else return $this->adress_data['tel'];
+			
+		} // public function getInvoicePhone()
+		
+		/**
+		 * Gibt die StraÃe der Rechnungsadresse zurÃŒck (Mit Hausnummer)
+		 * @return String StraÃe der Rechnungsanschrift
+		 */
+		public function getInvoiceStreet()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getStreet();
+			else return trim($this->adress_data['strasse'].' '.$this->adress_data['nr']);
+			
+		} // public function getInvoiceStreet()
+		
+		/**
+		 * @param $trimHnr Wenn true, dann wird versucht die Hausnummer abzutrennen (Wenn Hnr nicht separat erfasst)
+		 * @return String der Reine StraÃenname der Rechnungsadresse
+		 */
+		public function getInvoiceStreetClear($trimHnr = false)
+		{
+		
+			if ($this->adress_data === false)
+			{
+				
+				return $this->customer->getStreetClear($trimHnr);
+				
+			}
+			else 
+			{
+				
+				if (wpsg_isSizedInt($this->shop->get_option('wpsg_showNr')) && $trimHnr === true)
+				{
+					 
+					return preg_replace('/\040+\d+$/', '', $this->adress_data['strasse']);
+					
+				}
+				else
+				{
+					 				
+					return $this->adress_data['strasse'];
+					
+				}
+				
+			} 
+			
+		} // public function getInvoiceStreetClear()
+		
+		/**
+		 * Gibt die StraÃennummer der Rechnungsadresse zurÃŒck
+		 * @return String Hausnummer der Rechnungsanschrift
+		 */
+		public function getInvoiceStreetNr()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getStreetNr();
+			else return $this->adress_data['nr'];			
+			 			
+		} // public function getInvoiceStreetNr()
+		
+		/**
+		 * Gibt die Postleitzahl der Rechnungsadresse zurÃŒck
+		 * @return String PLZ der Rechnungsadresse
+		 */
+		public function getInvoiceZip()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getZip();
+			else return $this->adress_data['plz'];
+			
+		} // public function getInvoiceZip()
+		
+		/**
+		 * Gibt den Ort der Rechnungsadresse zurÃŒck
+		 * @return String Ort der Rechnungsadresse
+		 */
+		public function getInvoiceCity()
+		{
+			
+			if ($this->adress_data === false) return $this->customer->getCity();
+			else return $this->adress_data['ort'];
+						 
+		} // public function getInvoiceCity()
+		
+		/**
+		 * Gibt die ID des Landes zurÃŒck, an die die Rechnung ging
+		 * @return \Integer ID des Landes fÃŒr die Rechnung
+		 */
+		public function getInvoiceCountryID()
+		{
+				
+			if ($this->adress_data === false) return $this->customer->getCountryID();
+			else return $this->adress_data['land'];
+						
+		} // public function getInvoiceCountry()
+		
+		/**
+		 * Gibt das LÃ€nderobjekt fÃŒr die Rechnung zurÃŒck
+		 */
+		public function getInvoiceCountry()
+		{
+						
+			return wpsg_country::getInstance($this->getInvoiceCountryID());
+						
+		} // public function getInvoiceCountry()
+		
+		/**
+		 * Gibt das KÃŒrzel des Rechnungslandes zurÃŒck
+		 */
+		public function getInvoiceCountryKuerzel()
+		{
+				
+			$invoiceCountry = $this->getInvoiceCountry();
+			
+			if (!is_object($invoiceCountry)) return __('Nicht definiert.', 'wpsg');
+			else return $this->getInvoiceCountry()->getShorttext();
+				
+		} // public function getInvoiceCountryKuerzel()
+		
+		/**
+		 * Gibt den Namen des Landes der Rechnungsadresse zurÃŒck
+		 */
+		public function getInvoiceCountryName()
+		{
+			
+			$invoiceCountry = $this->getInvoiceCountry();
+			
+			if (!is_object($invoiceCountry)) return __('Nicht definiert.', 'wpsg');
+			else return $this->getInvoiceCountry()->getName(); 
+			
+		} // public function getInvoiceCountryName()
+		
+		/* Lieferadresse */
+		
 		/**
 		 * Gibt das Geschlecht des EmpfÃ€ngers der Bestellung zurÃŒck
@@ -543,8 +632,8 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				if (preg_match('/Frau/i', $this->shipping_title))
+			if ($this->hasShippingAdress()) 
+			{
+				
+				if (preg_match('/Frau/i', $this->getShippingTitle()))
 				{
 					
@@ -568,4 +657,26 @@
 			
 		} // public function getShippingGender()
+		
+		/** 
+		 * Gibt die Firma der Lieferadresse zurÃŒck 
+		 */
+		public function getShippingCompany()
+		{
+			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['firma'];
+			else return $this->getInvoiceCompany(); 
+			
+		}
+		
+		/** 
+		 * Anrede der Lieferadresse
+		 */
+		public function getShippingTitle()
+		{
+			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['title'];
+			else return $this->getInvoiceTitle();
+			
+		}
 		
 		/**
@@ -576,16 +687,6 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->shipping_vname;
-				
-			}
-			else
-			{
-				
-				return $this->getInvoiceFirstName();
-				
-			}
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['vname'];
+			else return $this->getInvoiceFirstName(); 
 			
 		} // public function getShippingFirstName()
@@ -598,18 +699,20 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->shipping_name;
-				
-			}
-			else
-			{
-				
-				return $this->getInvoiceName();
-				
-			}
-						
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['name'];
+			else return $this->getInvoiceName(); 
+			 						
 		} // public function getShippingName()
+		
+		/**
+		 * Gibt die komplette StraÃe des EmpfÃ€ngers der Bestellung zurÃŒck (Inklusive Hausnummer)
+		 * @return string komplette StraÃe des EmpfÃ€ngers
+		 */
+		public function getShippingStreet()
+		{
+			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['strasse'].' '.$this->shipping_adress_data['nr'];
+			else return $this->getInvoiceStreet(); 
+			 			
+		} // public function getShippingStreet()
 		
 		/**
@@ -617,43 +720,27 @@
 		 * @return string reiner StraÃenname des EmpfÃ€ngers
 		 */
-		public function getShippingStreetClear()
-		{
-			
-			if ($this->bShippingAdress === true)
-			{
-				
-			 	return preg_replace('/\040+\d+$/', '', $this->shipping_strasse);
-				
-			}
-			else
-			{
-				
-				return $this->getInvoiceStreetClear();
-				
-			}
-			
+		public function getShippingStreetClear($trimHnr = false)
+		{
+			
+			if ($this->hasShippingAdress())
+			{
+				
+				if (wpsg_isSizedInt($this->shop->get_option('wpsg_showNr')) && $trimHnr === true)
+				{
+					 
+					return preg_replace('/\040+\d+$/', '', wpsg_getStr($this->shipping_adress_data['strasse']));
+					
+				}
+				else
+				{
+				
+					return $this->shipping_adress_data['strasse']; 
+					
+				}
+				
+			}
+			else return $this->getInvoiceStreetClear($trimHnr); 
+			 			
 		} // public function getShippingStreetClear()
-		
-		/**
-		 * Gibt die komplette StraÃe des EmpfÃ€ngers der Bestellung zurÃŒck (Inklusive Hausnummer)
-		 * @return string komplette StraÃe des EmpfÃ€ngers
-		 */
-		public function getShippingStreet()
-		{
-			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->shipping_strasse;
-				
-			}
-			else
-			{
-				
-				return $this->getInvoiceStreet();
-				
-			}
-			
-		} // public function getShippingStreet()
 		
 		/**
@@ -664,17 +751,7 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return intval(preg_replace('/(.*)\040/', '', $this->shipping_strasse));
-				
-			}
-			else 
-			{
-				
-				return $this->getInvoiceStreetNr();
-				
-			}
-			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['nr'];
+			else return $this->getInvoiceStreetNr(); 
+			 
 		} // public function getShippingStreetNr()
 		
@@ -686,21 +763,9 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->shipping_plz;
-								
-			}
-			else
-			{
-				
-				return $this->getInvoiceZip();
-				
-			}
-			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['plz'];
+			else return $this->getInvoiceZip(); 
+			 
 		} // public function getShippingZip()
-
-		public function getNr() { return $this->onr; }
-
+		
 		/**
 		 * Gibt den Wohnort des EmpfÃ€ngers zurÃŒck
@@ -710,24 +775,9 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->shipping_ort;
-				
-			}
-			else
-			{
-				
-				return $this->getInvoiceCity();
-				
-			}
-			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['ort'];
+			else return $this->getInvoiceCity(); 
+			 
 		} // public function getShippingCity()
-
-		public function getInvoiceCountryID()
-		{
-
-		}
-
+						
 		/**
 		 * Gibt das Lieferland der Bestellung zurÃŒck
@@ -737,19 +787,20 @@
 		{
 			
-			if ($this->bShippingAdress)
-			{
-				
-				return $this->shipping_land;
-				
-			}
-			else 
-			{
-				
-				return $this->getInvoiceCountry();
-				
-			}
-			
+			if ($this->hasShippingAdress()) return $this->shipping_adress_data['land'];
+			else return $this->getInvoiceCountryID(); 
+			 
 		} // public function getShippingCountryID()
-				
+
+		/**
+		 * Gibt das Lieferland als Objekt zurÃŒck
+		 * @return wpsg_country
+		 */
+		public function getShippingCountry()
+		{
+			
+			return wpsg_country::getInstance($this->getShippingCountryID());
+			
+		} // public function getShippingCountry()
+		
 		/**
 		 * Gibt das Kuerzel des Lieferlandes zurÃŒck
@@ -758,37 +809,24 @@
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-				
-				return $this->db->fetchOne("SELECT `kuerzel` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getShippingCountryID())."' ");
-				
-			}
-			else
-			{
-			 
-				return $this->getInvoiceCountryKuerzel();
-				
-			}
+			return $this->getShippingCountry()->getShorttext(); 
 			
 		} // public function getShippingCountryKuerzel()
 		
+		/** 
+		 * Gibt den Namen des Lieferlandes zurÃŒck
+		 */
 		public function getShippingCountryName()
 		{
 			
-			if ($this->bShippingAdress === true)
-			{
-			
-				return $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->getShippingCountryID())."' ");
-			
-			}
-			else
-			{
-			
-				return $this->getInvoiceCountryName();
-			
-			}
+			return $this->getShippingCountry()->getName();
 			
 		}
 		
+		/**
+		 * Gibt die Bestellnummer zurÃŒck
+		 * @return string|null
+		 */
+		public function getNr() { return $this->onr; }
+  
 		/**
 		 * Gibt die ID der Versandzone zurÃŒck, in die geliefert wird
@@ -853,5 +891,5 @@
 		{
 
-			return $this->bShippingAdress;
+			return wpsg_isSizedInt($this->data['shipping_adress_id']);
 
 		} // public function hasShippingAdress()
Index: /views/produkt/addedit.phtml
===================================================================
--- /views/produkt/addedit.phtml	(revision 5842)
+++ /views/produkt/addedit.phtml	(revision 5845)
@@ -44,5 +44,10 @@
 			
 			<br />
-				
+			
+			<?php if (wpsg_getStr($_REQUEST['action'], 'add')) { ?>
+				<div class="info"><?php echo __('Nach dem erstmaligen Speichern kÃ¶nnen weitere Einstellungen vorgenommen werden.', 'wpsg'); ?></div>
+				<br />
+			<?php } ?>
+			
 			<?php if (wpsg_isSizedString($_REQUEST['edit_id'])) { ?>
 			<input type="hidden" name="edit_id" value="<?php echo $_REQUEST['edit_id']; ?>" />
@@ -53,7 +58,7 @@
 			<?php } ?>
 			
-			<input type="submit" value="<?php echo __('Speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+			<input type="submit" value="<?php echo __('Speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />			
 			<input type="submit" value="<?php echo __('Speichern / zur Ãbersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
-				
+						
 		</div>
 		
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 5842)
+++ /wpshopgermany.php	(revision 5845)
@@ -30,4 +30,5 @@
 	
 	// Tabellen
+	define('WPSG_TBL_ADRESS', $prefix.'wpsg_adress');
 	define('WPSG_TBL_META', $prefix.'wpsg_meta');
 	define('WPSG_TBL_PRODUCTS', $prefix.'wpsg_products');
