Index: /changelog
===================================================================
--- /changelog	(revision 7865)
+++ /changelog	(revision 7866)
@@ -428,4 +428,5 @@
 - Feature: Globale Bilder in globalen Variationen
 - Feature: Gutscheine/Coupons werden optional nur noch auf ausgewÃ€hlte Produkte/Produktgruppen angerechnet
+- Feature: Export/Import der Kategorie IDs beim Daten Export/Import
 - Bugfix: Anzeige von Name/Titel in den Passwort Vergessen Mails
 - Bugfix: KundenzusammenfÃŒgen funktioniert wieder
Index: /controller/wpsg_ProduktController.class.php
===================================================================
--- /controller/wpsg_ProduktController.class.php	(revision 7865)
+++ /controller/wpsg_ProduktController.class.php	(revision 7866)
@@ -270,4 +270,5 @@
 				}
 
+				// Produktvarianten
 				if (wpsg_ShopController::getShop()->hasMod('wpsg_mod_productvariants')) {
 
@@ -293,4 +294,6 @@
                                         foreach ($v3 as $k4 => $v4) {
 
+                                        	if ($k4 === 'images_global') continue;
+
                                             $addColum('PV_VARI_'.$k4);
 
@@ -318,4 +321,27 @@
 
                 }
+
+				// Kategorien
+				if (wpsg_ShopController::getShop()->hasMod('wpsg_mod_produktartikel')) {
+
+					$post_id = wpsg_ShopController::getShop()->callMod('wpsg_mod_produktartikel', 'getPostIdFromProductId', [$product_id]);
+
+					$arCat = \get_the_terms($post_id, $this->shop->get_option('wpsg_mod_produktartikel_pathkey_cat'));
+					$arCatID = [];
+
+					if (wpsg_isSizedArray($arCat)) {
+
+						foreach ($arCat as $cat) {
+
+							$arCatID[] = $cat->term_id;
+
+						}
+
+					}
+
+					$addColum('cat_id');
+					$arData[$k]['cat_id'] = implode(',', $arCatID);
+
+				}
 
 			}
@@ -536,4 +562,12 @@
                             $this->db->Query("DELETE FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($data['id'])."'");
 
+                            if ($this->shop->hasMod('wpsg_mod_produktartikel')) {
+
+                            	$post_id = $this->shop->callMod('wpsg_mod_produktartikel', 'getPostIdFromProductId', [$product_id]);
+
+                            	\wp_delete_post($post_id, true);
+
+                            }
+
                             // Attributwerte lÃ¶schen
                             if ($this->shop->hasMod('wpsg_mod_produktattribute')) {
@@ -543,4 +577,5 @@
                             }
 
+                            // Produktvarianten
                             if (wpsg_ShopController::getShop()->hasMod('wpsg_mod_productvariants')) {
 
@@ -790,6 +825,5 @@
 
                         // Attribute speichern
-                        foreach ($data as $k => $v)
-                        {
+                        foreach ($data as $k => $v) {
 
                             if (preg_match("/^ATT_(.*)/", $k))
@@ -810,4 +844,20 @@
 
                                 }
+
+                            }
+
+                        }
+
+                        if ($this->shop->hasMod('wpsg_mod_produktartikel') && isset($data['cat_id'])) {
+
+                            $arCatID = wpsg_explode(',', $data['cat_id']);
+
+                            $post_id = $this->shop->callMod('wpsg_mod_produktartikel', 'getPostIdFromProductId', [$product_id]);
+
+                            \wp_remove_object_terms($post_id, null, $this->shop->get_option('wpsg_mod_produktartikel_pathkey_cat'));
+
+                            if (wpsg_isSizedArray($arCatID)) {
+
+                            	\wp_set_post_terms($post_id, $arCatID, $this->shop->get_option('wpsg_mod_produktartikel_pathkey_cat'));
 
                             }
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 7865)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 7866)
@@ -1012,5 +1012,5 @@
          * Wird kein Post gefunden, so wird der Post angelegt und zugeordnet
          */
-        private function getPostIdFromProductId($product_id, $path = false, $comment_status = false, $menu_order = false, $update = false, $disabled = false) {
+        public function getPostIdFromProductId($product_id, $path = false, $comment_status = false, $menu_order = false, $update = false, $disabled = false) {
     
             global $current_user;
@@ -1025,5 +1025,5 @@
 					`post_type` = '".wpsg_q($this->shop->get_option('wpsg_mod_produktartikel_pathkey'))."'
 			");
-            
+
             // SÃ€ubern und sicherstellen, das es nur einen Post je Produkt gibt
 			$arPostDoubleIDs = $this->db->fetchAssocField("
@@ -1248,6 +1248,5 @@
          * Gibt einen Array mit Kategorien zurÃŒck
          */
-        public function getCategorySelectArray($ref = 0, $ebene = 0, &$arReturn = array())
-        {
+        public function getCategorySelectArray($ref = 0, $ebene = 0, &$arReturn = array()) {
     
             global $wpdb;
