Index: /mods/wpsg_mod_produktbilder.class.php
===================================================================
--- /mods/wpsg_mod_produktbilder.class.php	(revision 6249)
+++ /mods/wpsg_mod_produktbilder.class.php	(revision 6250)
@@ -324,5 +324,5 @@
 				
 				flush();
-				die();
+				die('1');
 				
 			}
@@ -684,30 +684,54 @@
 			
 			$data = $this->db->fetchAssoc("SELECT * FROM `".$wpdb->prefix."postmeta` WHERE `meta_key` = 'wpsg_produkt_id' AND `meta_value` = '".wpsg_q($produkt_id)."' ");
+			$postids = $this->db->fetchOne("SELECT `postids` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id`=".wpsg_q($produkt_id));
+			$arPostids = explode(',', $postids);
+			
 			$ud = wp_upload_dir(); 
 			
 			$i = 0;
 			
-			foreach ($data as $key => $val) 
-			{
-				
-				$p = wp_get_attachment_image_src($val['post_id'], $size);	// Array mit Full-Path, Width, Height
-				 
-				$guid = $p[0];
-				$arrf = pathinfo($guid);
-				
-				//$this->shop->view['ProduktBilder_MT'][$i]['pid'] = $val['post_id'];
-				//$this->shop->view['ProduktBilder_MT'][$i]['fname'] = $arrf['basename'];
-				//$this->shop->view['ProduktBilder_MT'][$i]['guid'] = $guid;
-				
-				$arFiles[$i]['guid'] = $guid;
-				$arFiles[$i]['post_id'] = $val['post_id'];
-				$arFiles[$i]['basename'] = $arrf['basename'];
-				$arFiles[$i]['url'] = $guid;
-				$arFiles[$i]['path'] = str_replace($ud['baseurl'], $ud['basedir'], $guid);				
-				
-				$i++;
-				
-			}
-			
+			if (wpsg_isSizedString($postids)) {
+				foreach ($arPostids as $postid) {
+					
+					for ($i = 0; $i < count($data); $i++) {
+						if ($data[$i]['post_id'] == $postid) {
+							$p = wp_get_attachment_image_src($data[$i]['post_id'], $size);	// Array mit Full-Path, Width, Height
+							$guid = $p[0];
+							$arrf = pathinfo($guid);
+
+							$arFiles[$i]['guid'] = $guid;
+							$arFiles[$i]['post_id'] = $data[$i]['post_id'];
+							$arFiles[$i]['basename'] = $arrf['basename'];
+							$arFiles[$i]['url'] = $guid;
+							$arFiles[$i]['path'] = str_replace($ud['baseurl'], $ud['basedir'], $guid);
+							
+						}
+					}
+				}
+				
+			} else {
+				
+				foreach ($data as $key => $val) 
+				{
+					
+					$p = wp_get_attachment_image_src($val['post_id'], $size);	// Array mit Full-Path, Width, Height
+					 
+					$guid = $p[0];
+					$arrf = pathinfo($guid);
+					
+					//$this->shop->view['ProduktBilder_MT'][$i]['pid'] = $val['post_id'];
+					//$this->shop->view['ProduktBilder_MT'][$i]['fname'] = $arrf['basename'];
+					//$this->shop->view['ProduktBilder_MT'][$i]['guid'] = $guid;
+					
+					$arFiles[$i]['guid'] = $guid;
+					$arFiles[$i]['post_id'] = $val['post_id'];
+					$arFiles[$i]['basename'] = $arrf['basename'];
+					$arFiles[$i]['url'] = $guid;
+					$arFiles[$i]['path'] = str_replace($ud['baseurl'], $ud['basedir'], $guid);				
+					
+					$i++;
+					
+				}
+			}
 			/*
 			wpsg_asort($arFiles);
Index: /views/mods/mod_downloadprodukte/produkt_edit_list.phtml
===================================================================
--- /views/mods/mod_downloadprodukte/produkt_edit_list.phtml	(revision 6249)
+++ /views/mods/mod_downloadprodukte/produkt_edit_list.phtml	(revision 6250)
Index: /views/mods/mod_productvars/produkt_addedit_sidebar.phtml
===================================================================
--- /views/mods/mod_productvars/produkt_addedit_sidebar.phtml	(revision 6249)
+++ /views/mods/mod_productvars/produkt_addedit_sidebar.phtml	(revision 6250)
Index: /views/mods/mod_produktbilder/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 6249)
+++ /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 6250)
@@ -72,4 +72,5 @@
 			<div class="wpsg_clear"></div>
 			<div><?php echo __("Bitte klicken Sie auf Mediathek um ein Bild hochzuladen. Um ein Bild zu lÃ¶schen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
+			<div><?php echo __("Die Reihenfolge kann mittels Drag&Drop verÃ€ndert werden.", "wpsg"); ?></div>
 			<div class="wpsg_clear"></div><br />
 		
@@ -99,4 +100,6 @@
 							success: function(data) {
 
+								//TODO die('1'); sendet: \n1
+								data = data.replace(/\n|\r/g, '');
 								if (data != '1') alert(data);
 								//wpsg_vp_ajaxloading_hide(); 
Index: /views/mods/mod_produktbilder/produkt_edit_list2.phtml
===================================================================
--- /views/mods/mod_produktbilder/produkt_edit_list2.phtml	(revision 6249)
+++ /views/mods/mod_produktbilder/produkt_edit_list2.phtml	(revision 6250)
@@ -26,3 +26,2 @@
     <p><?php echo __('Bisher keine Produktbilder hochgeladen.', 'wpsg'); ?></p>
   <?php } ?>
-    
Index: /views/produkt/addedit_general.phtml
===================================================================
--- /views/produkt/addedit_general.phtml	(revision 6249)
+++ /views/produkt/addedit_general.phtml	(revision 6250)
Index: /views/produkt/addedit_price.phtml
===================================================================
--- /views/produkt/addedit_price.phtml	(revision 6249)
+++ /views/produkt/addedit_price.phtml	(revision 6250)
Index: /views/produkttemplates/standard2.phtml
===================================================================
--- /views/produkttemplates/standard2.phtml	(revision 6249)
+++ /views/produkttemplates/standard2.phtml	(revision 6250)
@@ -209,3 +209,2 @@
 	
 </div>
-
