Index: /changelog
===================================================================
--- /changelog	(revision 7991)
+++ /changelog	(revision 7995)
@@ -509,2 +509,3 @@
 - Feature: Fehlerprotokoll kann aktiviert werden
 - Feature: Abos kÃ¶nnen jetzt auf 10 Jahre in der Zukunft gesetzt werden
+- Feature: Positionssnummer aus ProduktÃŒbersicht bearbeitbar
Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 7991)
+++ /controller/wpsg_OrderController.class.php	(revision 7995)
@@ -770,12 +770,9 @@
 		 * Nimmt Ajax Anfragen innerhalb der Bestellverwaltung entgegen
 		 */
-		public function ajaxAction()
-		{
-
-			if (isset($_REQUEST['mod']))
-			{
-
-				if (isset($_REQUEST['edit_id']))
-				{
+		public function ajaxAction() {
+
+			if (isset($_REQUEST['mod'])) {
+
+				if (isset($_REQUEST['edit_id'])) {
 
 					$this->shop->view['data'] = $this->db->fetchRow("
@@ -827,7 +824,28 @@
 				$this->shop->callMod($_REQUEST['mod'], 'order_ajax');
 
-			}
-			else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'saveInvoiceAdress'))
-			{
+			} else if (($_REQUEST['wpsg_action']??'') === 'inline_edit') {
+				
+				if (intval($_REQUEST['product_id']??0) <= 0) throw new \Exception(__('Parameterfehler', 'wpsg'));
+				if (!wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_TEXTFIELD)) throw new \Exception(__('Parameterfehler', 'wpsg'));
+								
+				$product_id = intval($_REQUEST['product_id']);
+				$value = sanitize_text_field($_REQUEST['value']);
+
+				if ($_REQUEST['field'] === 'pos') {
+					
+					if (!$this->shop->hasMod('wpsg_mod_produktartikel')) throw new \Exception(__('Modul "Produktartikel" nicht aktiviert.', 'wpsg'));
+					
+					$post_id = $this->shop->callMod('wpsg_mod_produktartikel', 'getPostIdFromProductId', [$product_id]);
+					
+					$this->db->UpdateQuery($this->shop->prefix.'posts', [
+						'menu_order' => $value
+					], " `id` = '".wpsg_q($post_id)."' ");
+					
+					echo $value;
+					exit;
+					
+				} else throw new \Exception(__('Feld nicht definiert.', 'wpsg'));
+								
+			} else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'saveInvoiceAdress')) {
 
 				parse_str($_REQUEST['form_data'], $form_data);
@@ -896,7 +914,5 @@
 				die("1");
 
-			}
-			else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_urlpay'))
-			{
+			} else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_urlpay')) {
 
 				$oOrder = wpsg_order::getInstance($_REQUEST['edit_id']);
@@ -919,7 +935,5 @@
 				);
 
-			}
-			else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_urlbuy'))
-			{
+			} else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_urlbuy')) {
 
 				$oOrder = wpsg_order::getInstance($_REQUEST['edit_id']);
@@ -942,7 +956,5 @@
 				);
 
-			}
-			else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_customermail'))
-			{
+			} else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_customermail')) {
 
 				$this->shop->basket->initFromDB($_REQUEST['edit_id']);
@@ -956,7 +968,5 @@
 				);
 
-			}
-			else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_adminmail'))
-			{
+			} else if (wpsg_isSizedString($_REQUEST['wpsg_action'], 'debug_adminmail')) {
 
 				$this->shop->basket->initFromDB($_REQUEST['edit_id']);
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7991)
+++ /controller/wpsg_ShopController.class.php	(revision 7995)
@@ -3321,4 +3321,10 @@
 			if (isset($_REQUEST['wpsg']['checkout']['land'])) $_SESSION['wpsg']['checkout']['land'] = $_REQUEST['wpsg']['checkout']['land'];
 
+			if (isset($_REQUEST['getRevocationForm'])) {
+				
+				wpsg_header::PDFPlugin(WPSG_PATH_UPLOADS.'wpsg_revocation/'.$this->get_option('wpsg_revocationform'));
+				
+			}
+			
 			if (!is_admin()) {
 
Index: /mods/wpsg_mod_legaltexts.class.php
===================================================================
--- /mods/wpsg_mod_legaltexts.class.php	(revision 7991)
+++ /mods/wpsg_mod_legaltexts.class.php	(revision 7995)
@@ -68,15 +68,11 @@
 		} // public function settings_save()
 		
-		public function be_ajax()
-		{
+		public function be_ajax() {
 
-			if ($_REQUEST['modul'] == 'wpsg_mod_legaltexts')
-			{
+			if ($_REQUEST['modul'] == 'wpsg_mod_legaltexts') {
 			
-				if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)
-				{
+				if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND) {
 										
-					if (class_exists("wphb"))
-					{
+					if (class_exists("wphb")) {
 
 						$wphb = new wphb();
@@ -84,32 +80,23 @@
 						$this->shop->view['wpsg_mod_legaltexts']['form'] = $wphb->showForm();
 						
-					}
-					else
-					{
+					} else {
 						
 						$this->shop->view['wpsg_mod_legaltexts']['form'] = false;
 						
 					}
-
 					
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_legaltexts/form_haendlerbund.phtml');
 					
-				}
-				else if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)
-				{
+				} else if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS) {
 					
-					if (class_exists("wpsg_protected_shops"))
-					{
+					if (class_exists("wpsg_protected_shops")) {
 						
 						$wpsg_ps = new wpsg_protected_shops();
 						
-						if (!isset($wpsg_ps->version) || $wpsg_ps->version == "" || version_compare($wpsg_ps->version, "1.5") < 0)
-						{
+						if (!isset($wpsg_ps->version) || $wpsg_ps->version == "" || version_compare($wpsg_ps->version, "1.5") < 0) {
 						
 							$this->shop->view['wpsg_mod_legaltexts']['form'] = '<span style="color:red;">'.__("Die von Ihnen verwendete Version des ProtectedShops Plugin ist nicht ausreichend. Sie benÃ¶tigen mindestens Version 1.6!", "wpsg").'</span>';
 						
-						}
-						else
-						{
+						} else {
 						
 							$this->shop->view['wpsg_mod_legaltexts']['form'] = $wpsg_ps->showForm();
@@ -117,7 +104,5 @@
 						}
 						
-					}
-					else
-					{
+					} else {
 						
 						$this->shop->view['wpsg_mod_legaltexts']['form'] = false;
@@ -127,10 +112,7 @@
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_legaltexts/form_protectedshops.phtml');
 					
-				}
-				else if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)
-				{
+				} else if ($_REQUEST['provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT) {
 					
-					if (class_exists("wpsg_itrecht"))
-					{
+					if (class_exists("wpsg_itrecht")) {
 						
 						$wpit = new wpsg_itrecht();
@@ -138,7 +120,5 @@
 						$this->shop->view['wpsg_mod_legaltexts']['form'] = $wpit->showForm();
 						
-					}
-					else
-					{
+					} else {
 						
 						$this->shop->view['wpsg_mod_legaltexts']['form'] = false;
@@ -148,6 +128,16 @@
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_legaltexts/form_itrecht.phtml');
 					
+				} else{
+					
+					throw new \wpsg\Exception(
+						wpsg_translate(
+							__(
+								'Es wurde bei der Ajax Anfrage der Provider ein ungÃŒltiger Provider (#1#) angegeben', 'wpsg'							
+							),
+							$_REQUEST['provider']
+						)
+					);
+					
 				}
-				else throw new \wpsg\Exception(__('Es wurde bei der Ajax Anfrage der Provider ein ungÃŒltiger Provider angegeben', 'wpsg'));
 							
 			}
Index: /views/mods/mod_legaltexts/settings_edit.phtml
===================================================================
--- /views/mods/mod_legaltexts/settings_edit.phtml	(revision 7991)
+++ /views/mods/mod_legaltexts/settings_edit.phtml	(revision 7995)
@@ -40,5 +40,5 @@
 </div> 
  
-<script type="text/javascript">/* <![CDATA[ */
+<script>
 
 	jQuery(document).ready(function() {
@@ -71,7 +71,9 @@
 			}
 			
-		} ).change();
+		} );
+		
+		document.querySelector('.wpsg_mod_legaltexts_provider:checked').dispatchEvent(new Event('change'));
 		
 	} );
 
-/* ]]> */</script>
+</script>
Index: /views/produkt/index.phtml
===================================================================
--- /views/produkt/index.phtml	(revision 7991)
+++ /views/produkt/index.phtml	(revision 7995)
@@ -265,5 +265,7 @@
 						<?php if ($this->hasMod('wpsg_mod_produktartikel')) { ?>
 						<td class="wpsg_pos" data-order="pos">
-							<?php echo $oProduct->getMenuOrder(); ?>
+                             
+                            <span data-product_id="<?php echo $oProduct->getId(); ?>" class="wpsg_ie_pos wpsg_ie_pos_<?php echo $oProduct->getId(); ?>"><?php echo $oProduct->getMenuOrder(); ?></span>
+                            
 						</td>
 						<?php } ?>
@@ -377,4 +379,23 @@
             </div>
 
+            <script>
+                
+                for (let el of document.getElementsByClassName('wpsg_ie_pos')) {
+                    
+                    jQuery(el).wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=inline_edit&noheader=1', { 
+                        submitdata: {
+                            field: 'pos',
+                            product_id: parseInt(el.getAttribute('data-product_id'))
+                        },
+                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+                    });
+
+                }
+                
+            </script>
+            
             <div class="clearer"></div>
 
