Index: admin/includes/extra/modules/add_db_fields/category_keywords.php
===================================================================
--- admin/includes/extra/modules/add_db_fields/category_keywords.php	(nonexistent)
+++ admin/includes/extra/modules/add_db_fields/category_keywords.php	(revision 2)
@@ -0,0 +1,10 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+if(defined('MODULE_CATEGORY_KEYWORDS_STATUS') && MODULE_CATEGORY_KEYWORDS_STATUS == 'True'){   
+ $add_categories_description_fields[]='categories_keywords';
+}
+?>
\ No newline at end of file
Index: admin/includes/extra/modules/new_category/category_keywords.php
===================================================================
--- admin/includes/extra/modules/new_category/category_keywords.php	(nonexistent)
+++ admin/includes/extra/modules/new_category/category_keywords.php	(revision 2)
@@ -0,0 +1,25 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+   
+if(defined('MODULE_CATEGORY_KEYWORDS_STATUS') && MODULE_CATEGORY_KEYWORDS_STATUS == 'True'){   
+  ?>    
+  <div style="clear:both;"></div>
+    <div style="padding:5px;clear:both;">
+      <?php   
+        for ($i = 0; $i < sizeof($languages); $i++) {  
+          $categories_desc_fields = $catfunc->get_categories_desc_fields($cInfo->categories_id, $languages[$i]['id']);
+          $lng_image = xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] .'/admin/images/'. $languages[$i]['image'], $languages[$i]['name']);
+          ?>                                
+          <div class="main" style="vertical-align:top; padding: 3px; line-height:20px;">                    
+            <?php echo $lng_image . '&nbsp;' . TEXT_CATEGORY_KEYWORDS; ?> <br />
+            <?php echo xtc_draw_input_field('categories_keywords[' . $languages[$i]['id'] . ']',(isset($_POST['categories_keywords'][$languages[$i]['id']]) ? stripslashes($_POST['categories_keywords'][$languages[$i]['id']]) : $categories_desc_fields['categories_keywords']),'style="width:100%"'); ?>
+          </div>
+        <?php } ?>                              
+    </div>
+  <?php
+}    
+?>
\ No newline at end of file
Index: admin/includes/modules/system/category_keywords.php
===================================================================
--- admin/includes/modules/system/category_keywords.php	(nonexistent)
+++ admin/includes/modules/system/category_keywords.php	(revision 2)
@@ -0,0 +1,78 @@
+<?php
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn [www.webknecht.net]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+
+defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
+
+if (!class_exists('category_keywords')) {
+    class category_keywords
+    {             
+        var $code, $title, $description, $enabled;
+
+        function __construct() 
+        {
+            $this->code = 'category_keywords';
+            $this->enabled = ((MODULE_CATEGORY_KEYWORDS_STATUS == 'True') ? true : false);
+            $this->title =  MODULE_CATEGORY_KEYWORDS_TEXT_TITLE;
+            $this->description = MODULE_CATEGORY_KEYWORDS_TEXT_INFO;
+            $this->sort_order = MODULE_CATEGORY_KEYWORDS_SORT_ORDER;                  
+        }
+
+        function process($file) 
+        {
+            //...
+        }
+
+        function display() 
+        {
+            return array('text' => '<br>' . MODULE_CATEGORY_KEYWORDS_TEXT_DESCRIPTION  .
+                    '<br>' . '<br>' . xtc_button(BUTTON_REVIEW_APPROVE) . '&nbsp;' .
+                    xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module='.$this->code))
+                    );
+        }
+
+        function check() 
+        {    
+            if(!isset($this->_check)) {
+              $check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_CATEGORY_KEYWORDS_STATUS'");
+              $this->_check = xtc_db_num_rows($check_query);
+            }
+            return $this->_check;
+        }
+ 
+        function install() 
+        {                                                                                                                                                                                          
+            xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value,  configuration_group_id, sort_order, set_function, date_added) values ('MODULE_CATEGORY_KEYWORDS_STATUS', 'True',  '6', '1', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
+            xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value,  configuration_group_id, sort_order, set_function, date_added) values ('MODULE_CATEGORY_KEYWORDS_SHOW', 'True',  '6', '2', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
+            xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value,  configuration_group_id, sort_order, set_function, date_added) values ('MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES', 'True',  '6', '3', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
+            
+            $this->install_db(); 
+        }
+
+        function remove()
+        {                
+            xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_CATEGORY_KEYWORDS_%'");
+            $this->uninstall_db();
+        }
+
+        function keys() 
+        {
+            return array('MODULE_CATEGORY_KEYWORDS_STATUS', 'MODULE_CATEGORY_KEYWORDS_SHOW', 'MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES');
+        }
+        
+        function install_db() 
+        {  
+            $this->uninstall_db(); 
+            xtc_db_query("ALTER TABLE " . TABLE_CATEGORIES_DESCRIPTION . " ADD categories_keywords VARCHAR( 255 ) NOT NULL AFTER categories_description");
+        }
+        
+        function uninstall_db() 
+        {      
+            xtc_db_query("ALTER TABLE " . TABLE_CATEGORIES_DESCRIPTION . " DROP categories_keywords");
+        }
+    }
+}
+?>
\ No newline at end of file
Index: includes/extra/default/listing_sql/category_keywords.php
===================================================================
--- includes/extra/default/listing_sql/category_keywords.php	(nonexistent)
+++ includes/extra/default/listing_sql/category_keywords.php	(revision 2)
@@ -0,0 +1,112 @@
+<?php
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn [www.webknecht.net]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+          
+if(defined('MODULE_CATEGORY_KEYWORDS_STATUS') 
+    && MODULE_CATEGORY_KEYWORDS_STATUS == 'True' 
+    && (basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT || basename($PHP_SELF) == 'autocomplete.php')
+    && $categories_id == false // adv. search: subcategories not selected
+    && sizeof($search_keywords) > 0
+    ) {   
+      $sql_categories_keywords = '';
+      $where_str_cat = " ( ";
+
+      for ($i = 0, $n = sizeof($search_keywords); $i < $n; $i ++) {      
+          switch ($search_keywords[$i]) {
+            case '(' :
+            case ')' :
+            case 'and' :
+            case 'or' :
+              $where_str .= " ".$search_keywords[$i]." ";
+              break;
+            default :
+              $ent_keyword = encode_htmlentities($search_keywords[$i]);
+              $ent_keyword = $ent_keyword != $search_keywords[$i] ? xtc_db_input($ent_keyword) : false;
+              $keyword = xtc_db_input($search_keywords[$i]);
+              $where_str_cat .= " ( ";
+              $where_str_cat .= "cd.categories_keywords LIKE ('%".$keyword."%') ";
+              $where_str_cat .= $ent_keyword ? "OR cd.categories_keywords LIKE ('%".$ent_keyword."%') " : '';
+              
+              if (MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES == 'True') {
+                 $where_str_cat .= "OR cd.categories_name LIKE ('%".$keyword."%') ";
+                 $where_str_cat .= $ent_keyword ? "OR cd.categories_name LIKE ('%".$ent_keyword."%') " : '';
+                 $where_str_cat .= "OR cd.categories_heading_title LIKE ('%".$keyword."%') ";
+                 $where_str_cat .= $ent_keyword ? "OR cd.categories_heading_title LIKE ('%".$ent_keyword."%') " : '';
+              }
+                      
+              $where_str_cat .= " ) OR ";        
+            break;
+          }
+      } 
+      if($where_str_cat != " ( "){
+        $where_str_cat = substr($where_str_cat, 0, strlen($where_str_cat)-3);
+        $where_str_cat .= " ) ";
+        $listing_sql_categories = "Select * from ".TABLE_CATEGORIES." c LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd on c.categories_id = cd.categories_id where $where_str_cat AND cd.language_id = '".(int)$_SESSION['languages_id']."'";
+        $categories_query = xtc_db_query($listing_sql_categories);
+        $categories_keyword_content = array();
+        while ($categories = xtc_db_fetch_array($categories_query)) {
+           if(!in_array($categories['categories_id'], $arr_categories_affected)){
+              $arr_categories_affected[]=$categories['categories_id'];
+           }
+           if(MODULE_CATEGORY_KEYWORDS_SHOW == 'True') {
+             $cPath_new = xtc_category_link($categories['categories_id'],$categories['categories_name']);
+             $image = '';
+             if ($categories['categories_image'] != '') {
+                $image = DIR_WS_IMAGES.'categories/'.$categories['categories_image'];
+                if(!file_exists($image)){
+                   $image = DIR_WS_IMAGES.'categories/noimage.gif';
+                }
+                $image = $image;
+             }     
+             $categories_keyword_content[] = array ('CATEGORIES_NAME' => $categories['categories_name'],
+             'CATEGORIES_HEADING_TITLE' => $categories['categories_heading_title'],
+             'CATEGORIES_IMAGE' => (($image != '') ? DIR_WS_BASE . $image : ''),
+             'CATEGORIES_LINK' => xtc_href_link(FILENAME_DEFAULT, $cPath_new),
+             'CATEGORIES_DESCRIPTION' => $categories['categories_description']);
+           } 
+        }  
+
+        if(count($arr_categories_affected)>0){
+           $str_categories = ",".join($arr_categories_affected, ",").",";
+           $sql_categories_keywords = " (INSTR('$str_categories', concat(',',p2c.categories_id,',')))";
+        }     
+      }
+      if($sql_categories_keywords){  
+        $listing_sql_keywords = "SELECT p.products_id
+                                        FROM ".TABLE_PRODUCTS." p
+                                        JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
+        if($pfrom_check != '' || $pto_check != '') {
+            $listing_sql_keywords .= "LEFT OUTER JOIN ".TABLE_SPECIALS." AS s ON (p.products_id = s.products_id) ".SPECIALS_CONDITIONS_S." ";  
+        }                
+        if($NeedTax) {
+          $listing_sql_keywords .= " LEFT OUTER JOIN ".TABLE_TAX_RATES." tr ON (p.products_tax_class_id = tr.tax_class_id) 
+                         LEFT OUTER JOIN ".TABLE_ZONES_TO_GEO_ZONES." gz ON (tr.tax_zone_id = gz.geo_zone_id) ";
+        }                            
+        $listing_sql_keywords .= "WHERE p.products_status = '1'
+                                        ".PRODUCTS_CONDITIONS_P."
+                                        AND $sql_categories_keywords $pfrom_check $pto_check";
+        if($manu_check!="") {
+            $listing_sql_keywords .= " AND p.manufacturers_id = '".$manufacturers_id."' ";         
+        }                      
+        if($NeedTax) {
+          $listing_sql_keywords .= " AND (gz.zone_country_id IS NULL OR gz.zone_country_id = '0' OR gz.zone_country_id = '".(int) $_SESSION['customer_country_id']."') 
+                         AND (gz.zone_id is null OR gz.zone_id = '0' OR gz.zone_id = '".(int) $_SESSION['customer_zone_id']."')";
+        } 
+                                    
+        $keywords_query = xtc_db_query($listing_sql_keywords);
+        $arr_included_products=array();
+        while ($products_from_keywords = xtc_db_fetch_array($keywords_query)) {
+           $arr_included_products[] = "'" . $products_from_keywords['products_id'] . "'";                  
+        }     
+        if(count($arr_included_products>0)){
+           $listing_sql = str_replace("WHERE p.products_id IN (", "WHERE p.products_id IN (".join($arr_included_products, ",") . ",", $listing_sql);  
+ 
+        }
+        
+      }
+}     
+ 
+?>
\ No newline at end of file
Index: includes/extra/define_add_select/category_keywords.php
===================================================================
--- includes/extra/define_add_select/category_keywords.php	(nonexistent)
+++ includes/extra/define_add_select/category_keywords.php	(revision 2)
@@ -0,0 +1,10 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+if(defined('MODULE_CATEGORY_KEYWORDS_STATUS') && MODULE_CATEGORY_KEYWORDS_STATUS == 'True'){   
+ $add_categories_description_fields[]='categories_keywords';
+}
+?>
\ No newline at end of file
Index: includes/extra/modules/categories_listing/categories_smarty/category_keywords.php
===================================================================
--- includes/extra/modules/categories_listing/categories_smarty/category_keywords.php	(nonexistent)
+++ includes/extra/modules/categories_listing/categories_smarty/category_keywords.php	(revision 2)
@@ -0,0 +1,18 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords f�r modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+   
+  if(defined('MODULE_CATEGORY_KEYWORDS_STATUS') 
+      && MODULE_CATEGORY_KEYWORDS_STATUS == 'True' 
+      && MODULE_CATEGORY_KEYWORDS_SHOW == 'True' 
+      && basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT
+      && count($categories_keyword_content) > 0 
+      ) {  
+          $categorie_smarty->assign('categories_content', $categories_keyword_content);
+          $categorie_smarty->assign('KEYWORD_RESULT', true);
+  }
+   
+?>
\ No newline at end of file
Index: lang/english/extra/admin/category_keywords.php
===================================================================
--- lang/english/extra/admin/category_keywords.php	(nonexistent)
+++ lang/english/extra/admin/category_keywords.php	(revision 2)
@@ -0,0 +1,20 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords für modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+   
+define('MODULE_CATEGORY_KEYWORDS_TEXT_TITLE', 'Kategorie-Keywords');
+define('MODULE_CATEGORY_KEYWORDS_TEXT_DESCRIPTION', '<strong>Shopsuche: Erg&auml;nzung von Kategorie-Keywords</strong><br />Ist der Suchbegriff Bestandteil von Kategorie-Keywords werden zus&auml;tzlich zum regul&auml;ren Suchergebnis alle Artikel der betreffenden Kategorie gelistet. Optional werden ausserdem  die erfassten Kategorien oberhalb des Suchergebnisses platziert. <br />Bei bereits gew&auml;hlter Kategorie in der erweiterten Suche erfolgt kein Abgleich der Kategorie-Keywords.');
+define('MODULE_CATEGORY_KEYWORDS_TEXT_INFO', MODULE_CATEGORY_KEYWORDS_TEXT_DESCRIPTION);
+
+define('MODULE_CATEGORY_KEYWORDS_STATUS_TITLE', 'Modul aktivieren?');
+define('MODULE_CATEGORY_KEYWORDS_STATUS_DESC', '');
+define('MODULE_CATEGORY_KEYWORDS_SHOW_TITLE', 'Kategorie-Listing anzeigen?');
+define('MODULE_CATEGORY_KEYWORDS_SHOW_DESC', 'Listing der erfassten Kategorien &uuml;ber dem Suchergebnis');
+define('MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES_TITLE', 'Kategorienamen als Keyword verwenden');
+define('MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES_DESC', '');
+
+define('TEXT_CATEGORY_KEYWORDS', 'Keywords f&uuml;r die Suche (kommagetrennt):');
+?>
\ No newline at end of file
Index: lang/german/extra/admin/category_keywords.php
===================================================================
--- lang/german/extra/admin/category_keywords.php	(nonexistent)
+++ lang/german/extra/admin/category_keywords.php	(revision 2)
@@ -0,0 +1,22 @@
+<?php   
+/* -----------------------------------------------------------------------------------------
+   Modul Kategorie-Keywords für modified eCommerce Shopsoftware 2.0.6.0     
+   Autor: Daniel Lonn, Agentur Webknecht [webknecht.net | modified-multishop.de]
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+   
+define('MODULE_CATEGORY_KEYWORDS_TEXT_TITLE', 'Kategorie-Keywords');
+define('MODULE_CATEGORY_KEYWORDS_TEXT_DESCRIPTION', '<strong>Shopsuche: Erg&auml;nzung von Kategorie-Keywords</strong><br />Ist der Suchbegriff Bestandteil von Kategorie-Keywords werden zus&auml;tzlich zum regul&auml;ren Suchergebnis alle Artikel der betreffenden Kategorie gelistet. Optional werden ausserdem  die erfassten Kategorien oberhalb des Suchergebnisses platziert. <br />Bei bereits gew&auml;hlter Kategorie in der erweiterten Suche erfolgt kein Abgleich der Kategorie-Keywords.');
+define('MODULE_CATEGORY_KEYWORDS_TEXT_INFO', MODULE_CATEGORY_KEYWORDS_TEXT_DESCRIPTION);
+
+define('MODULE_CATEGORY_KEYWORDS_STATUS_TITLE', 'Modul aktivieren?');
+define('MODULE_CATEGORY_KEYWORDS_STATUS_DESC', '');
+define('MODULE_CATEGORY_KEYWORDS_SHOW_TITLE', 'Kategorie-Listing anzeigen?');
+define('MODULE_CATEGORY_KEYWORDS_SHOW_DESC', 'Listing der erfassten Kategorien &uuml;ber dem Suchergebnis');
+define('MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES_TITLE', 'Kategorienamen als Keyword verwenden');
+define('MODULE_CATEGORY_KEYWORDS_INCLUDE_CATEGORIES_DESC', '');
+
+define('TEXT_CATEGORY_KEYWORDS', 'Keywords f&uuml;r die Suche (kommagetrennt):');
+
+
+?>
\ No newline at end of file
