Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 6071)
+++ /lib/wpsg_basket.class.php	(revision 6073)
@@ -1108,4 +1108,7 @@
 				{
 					
+					$this->arCheckout['email'] = strtolower($this->arCheckout['email']);
+					$this->arCheckout['email2'] = strtolower($this->arCheckout['email2']);
+					
 					if ($this->arCheckout['email'] != wpsg_getStr($this->arCheckout['email2']))
 					{
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6071)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6073)
@@ -283,4 +283,6 @@
 					{
 						
+						$arCheckout['email'] = strtolower($arCheckout['email']);
+						
 						$user = get_user_by('login', $arCheckout['email']);
 						
@@ -341,4 +343,5 @@
 					$kunde_mail = $this->db->fetchOne("SELECT K.`email` FROM `".WPSG_TBL_KU."` AS K WHERE K.`id` = '".wpsg_q($arCheckout['id'])."'");
 
+					$arCheckout['email'] = strtolower($arCheckout['email']);
 					if ($kunde_mail != $arCheckout['email'])
 					{
@@ -502,4 +505,5 @@
 				
 				$_SESSION['wpsg']['errorFields'] = array();
+				$_REQUEST['wpsg']['mod_kundenverwaltung']['email'] = strtolower($_REQUEST['wpsg']['mod_kundenverwaltung']['email']);
 				
 				if (trim($_REQUEST['wpsg']['mod_kundenverwaltung']['password']) == '' || trim($_REQUEST['wpsg']['mod_kundenverwaltung']['email']) == '')
@@ -739,7 +743,10 @@
 					}
 					
+					$kunde_data['email'] = strtolower($kunde_data['email']);
+						
 					$kunde_id = $this->db->ImportQuery(WPSG_TBL_KU, $kunde_data);
 					$knr = $this->shop->buildKNR($kunde_id);
 
+					$this->shop->cache->clearKundenCache($kunde_id);
 					$this->shop->callMods('customer_created', array(&$kunde_id, &$pwd));
 					
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 6071)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 6073)
@@ -173,5 +173,5 @@
 			
 			// VerfÃŒgbare Produkttemplates
-			$this->shop->view['arTemplates'] = $this->shop->loadProduktTemplates();
+			$this->shop->view['arTemplates'] = $this->shop->loadProduktTemplates(true);
 			
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktartikel/settings_edit.phtml');
@@ -198,5 +198,8 @@
 			
 			$this->shop->update_option('wpsg_mod_produktartikel_showui', $_REQUEST['wpsg_mod_produktartikel_showui']);
-			$this->shop->update_option('wpsg_mod_produktartikel_postthumbnail', $_REQUEST['wpsg_mod_produktartikel_postthumbnail']);
+
+			if ($this->shop->hasMod('wpsg_mod_produktbilder')) {
+				$this->shop->update_option('wpsg_mod_produktartikel_postthumbnail', $_REQUEST['wpsg_mod_produktartikel_postthumbnail']);
+			}
 			
 			$pathkey_alt = $this->shop->get_option('wpsg_mod_produktartikel_pathkey');
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 6071)
+++ /mods/wpsg_mod_stock.class.php	(revision 6073)
@@ -647,5 +647,9 @@
 			//if ($product_data['stock_count'] == '1' && $stock > $product_data['stock']) return false;
 			if ($product_data['stock_count'] == '1' && 
-				(($this->shop->get_option('wpsg_mod_stock_allow') === '1') && ($stock > $product_data['stock']))) return false;
+				(($this->shop->get_option('wpsg_mod_stock_allow') === '1') && ($stock > $product_data['stock'])))
+			{
+				$this->db->unlockTables();
+				return false;
+			}
 				
 			/* Produktgruppe runterzÃ€hlen */
@@ -659,5 +663,9 @@
 					
 					//if ($pgroup['stock_aktiv'] == '1' && ($stock > $pgroup['stock_value'])) return false;
-					if (($this->shop->get_option('wpsg_mod_stock_allow') === '1') && ($stock > $pgroup['stock_value'])) return false;
+					if (($this->shop->get_option('wpsg_mod_stock_allow') === '1') && ($stock > $pgroup['stock_value']))
+					{
+						$this->db->unlockTables();
+						return false;
+					}
 						
 					$this->db->Query("
Index: /views/mods/mod_produktartikel/settings_edit.phtml
===================================================================
--- /views/mods/mod_produktartikel/settings_edit.phtml	(revision 6071)
+++ /views/mods/mod_produktartikel/settings_edit.phtml	(revision 6073)
@@ -21,9 +21,9 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_gtin', __('Darstellung der GTIN', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_gtin'), array('help' => 'wpsg_mod_produktartikel_gtin')); ?>
 
-
+<?php var_dump($this->get_option('wpsg_mod_produktartikel_hometemplate'));?>
 <?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
 <?php echo wpsg_drawForm_Text(__('Produkttemplate fÃŒr Ansicht auf Startseite', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
 <?php } else { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_hometemplate', __('Produkttemplate fÃŒr Ansicht auf Startseite', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_hometemplate')), array('help' => 'mod_produktartikel_hometemplate', 'noKeys' => true)); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_hometemplate', __('Produkttemplate fÃŒr Ansicht auf Startseite', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_hometemplate')), array('help' => 'mod_produktartikel_hometemplate', 'noKeys1' => true)); ?>
 <?php } ?>
 
@@ -31,5 +31,5 @@
 <?php echo wpsg_drawForm_Text(__('Produkttemplate fÃŒr List Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
 <?php } else { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_listtemplate', __('Produkttemplate fÃŒr List Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_listtemplate')), array('help' => 'mod_produktartikel_listtemplate', 'noKeys' => true)); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_listtemplate', __('Produkttemplate fÃŒr List Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_listtemplate')), array('help' => 'mod_produktartikel_listtemplate', 'noKeys1' => true)); ?>
 <?php } ?>
 
@@ -37,5 +37,5 @@
 <?php echo wpsg_drawForm_Text(__('Produkttemplate fÃŒr Such Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
 <?php } else { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_searchtemplate', __('Produkttemplate fÃŒr Such Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_searchtemplate')), array('help' => 'mod_produktartikel_searchtemplate', 'noKeys' => true)); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_searchtemplate', __('Produkttemplate fÃŒr Such Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_searchtemplate')), array('help' => 'mod_produktartikel_searchtemplate', 'noKeys1' => true)); ?>
 <?php } ?>
  
