Index: /changelog
===================================================================
--- /changelog	(revision 7891)
+++ /changelog	(revision 7892)
@@ -451,2 +451,6 @@
 - Bugfix: Korrektur PayPal
 - Bugfix: Anlegen von Bestellungen, Kundensuche
+
+#4.3.3
+- Bugfix: Gutscheine mit Betrag > Bestellwert
+- Change: Im Produkt im Backend werden jetzt alle Produktvariablen angezeigt nicht nur die beim bestellen gesetzen
Index: /mods/wpsg_mod_productvars.class.php
===================================================================
--- /mods/wpsg_mod_productvars.class.php	(revision 7891)
+++ /mods/wpsg_mod_productvars.class.php	(revision 7892)
@@ -362,5 +362,5 @@
 
 			if (!isset($this->shop->view['data'])) return;
-			$this->shop->view['wpsg_mod_productvars']['data'] = $this->getAllProductVarValues($this->shop->view['data']['id'], $p['product_index']);
+			$this->shop->view['wpsg_mod_productvars']['data'] = $this->getAllProductVarValues($this->shop->view['data']['id'], $p['product_index'], true);
 
 			if (wpsg_isSizedArray($this->shop->view['wpsg_mod_productvars']['data'])) {
@@ -368,4 +368,5 @@
 				$this->shop->view['wpsg_mod_productvars']['p'] = $p;
 				$this->shop->view['wpsg_mod_productvars']['i'] = $i;
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/order_view_row.phtml');
 
@@ -577,6 +578,5 @@
 				$arPVars = $this->getAllProductVarValues($order_id, $produkt['product_index']);
 	
-				if (wpsg_isSizedArray($arPVars))
-				{
+				if (wpsg_isSizedArray($arPVars)) {
 	
 					$this->shop->view['wpsg_mod_productvars']['data'] = $arPVars;
@@ -584,12 +584,9 @@
 					$this->shop->view['wpsg_mod_productvars']['p'] = $produkt;
 	
-					if ($this->shop->htmlMail === true)
-					{
+					if ($this->shop->htmlMail === true) {
 	
 						$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/mail_row_html.phtml');
 	
-					}
-					else
-					{
+					} else {
 	
 						$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/mail_row.phtml');
@@ -646,12 +643,10 @@
 				$produkt_id = $this->shop->basket->getProduktDBID($p['id']);
 	
-				if ($produkt_id > 0)
-				{
+				if ($produkt_id > 0) {
 	
 					$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
 					foreach ($pVarsSet as $k => $v) { if (trim($v) == '') { unset($pVarsSet[$k]); } }
 	
-					if (is_array($pVarsSet) && sizeof($pVarsSet) > 0)
-					{
+					if (is_array($pVarsSet) && sizeof($pVarsSet) > 0) {
 	
 						$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` IN (".wpsg_q(implode(',', $pVarsSet)).") ORDER BY `pos` ASC, `id` ASC");
@@ -673,4 +668,5 @@
 						$this->shop->view['wpsg_mod_productvars']['i'] = $i;
 						$this->shop->view['wpsg_mod_productvars']['p'] = $p;
+
 						$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/overview_row.phtml');
 	
@@ -754,17 +750,14 @@
 			$arPVarsDB = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."`");
 
-			foreach ($arPVarsDB as $k => $pv_db)
-			{
-
-				if ($bAll || array_key_exists($pv_db['id'], (array)$arPVars))
-				{
+			foreach ($arPVarsDB as $k => $pv_db) {
+
+				if ($bAll || array_key_exists($pv_db['id'], (array)$arPVars)) {
 
 					$value = "";
 
-					if (array_key_exists($pv_db['id'], $arPVars))
-					{
-
-						switch ($pv_db['typ'])
-						{
+					if (array_key_exists($pv_db['id'], $arPVars)) {
+
+						switch ($pv_db['typ']) {
+
 							case 3: // Checkbox
 
@@ -803,63 +796,4 @@
 
 			}
-
-			/*
-			if (is_array($arPVars))
-			{
-
-				foreach ($arPVars as $k => $v)
-				{
-
-					if ($k == $product_index)
-					{
-
-						foreach ($arPVars[$k] as $k2 => $v2)
-						{
-
-							$pvar_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($k2)."'");
-
-							if ($pvar_db['typ'] == 3) // Checkbox
-							{
-
-								$arReturn[$k2] = array('typ' => '3', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => (($v2 === '1')?__('Ja', 'wpsg'):__('Nein', 'wpsg')));
-								$arIDSet[] = $k2;
-
-							}
-							else if ($pvar_db['typ'] == 1) // Auswahl
-							{
-
-								if ($v2 != 'not_set' || $this->shop->get_option('wpsg_mod_productvars_showvariprice') === '1')
-								{
-
-									if ($v2 == 'not_set') $v2 = __('Nicht angegeben', 'wpsg');
-
-									$arReturn[$k2] = array('typ' => '1', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => $v2);
-									$arIDSet[] = $k2;
-
-								}
-
-							}
-							else if ($pvar_db['typ'] == 2) // Text
-							{
-
-								if (wpsg_isSizedString($v2) || $this->shop->get_option('wpsg_mod_productvars_showvariprice') === '1')
-								{
-
-									if (!wpsg_isSizedString($v2)) $v2 = __('Keine Angaben', 'wpsg');
-
-									$arReturn[$k2] = array('typ' => '2', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => $v2);
-									$arIDSet[] = $k2;
-
-								}
-
-							}
-
-						}
-
-					}
-
-				}
-
-			} */
 
 			return $arReturn;
