#1 (permalink)  
Alt 27.04.2010, 11:11
Benutzerbild von OlafWeber
Erfahrener Benutzer
 
Registriert seit: 24.05.2004
Ort: Thüringen
Beiträge: 250
Standard Suche auch nach Kategorie

Wie kann man einstellen, dass die Suche auch auf die Kategorienamen zugreift?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 27.04.2010, 18:01
Pax Pax ist offline
Benutzer
 
Registriert seit: 25.09.2009
Beiträge: 48
Cool

Hi,

in dem Du auf die erweiterte Suche klickst...

mfg
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 27.04.2010, 18:31
Benutzerbild von OlafWeber
Erfahrener Benutzer
 
Registriert seit: 24.05.2004
Ort: Thüringen
Beiträge: 250
Standard

Danke, aber ich meinte durch die Suche, wenn man da z.b den kategorienamen "Ball" eingibt, dass das dann auch gefunden wird, ohne die erweiterte Suche .

Wie kann man das evtl. In die Suchfunktion einbauen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 27.04.2010, 22:01
Pax Pax ist offline
Benutzer
 
Registriert seit: 25.09.2009
Beiträge: 48
Standard

ok,

versuch doch mal bitte das hier. (keine Garantie)
Füge doch bitte mal in der Datei box_search.html (diese findest Du unter deinem template -> in dem Ordner boxes) diesen Codeschnipsel hinzu!

{form type=select name=cat value=$cat_data}
sollte das nicht funktionieren dann bitte so {form type=select name=cat value="on"}

Des Weiteren kannst Du auch noch diesen hier hinzufügen:
{form type=checkbox name=subkat} wenn das nicht geht dann so {form type=checkbox name=subkat value="on"}

Beide Codeschnipsel müssen vor {form type=formend} stehen!

Ich hoffe ich konnte Dir helfen...

mfg
Pax
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 28.04.2010, 06:40
Benutzerbild von OlafWeber
Erfahrener Benutzer
 
Registriert seit: 24.05.2004
Ort: Thüringen
Beiträge: 250
Standard

Danke Dir, aber bei mir in dieser Datei steht folgender Code:

PHP-Code:
{config_load file="$language/lang_$language.conf" section="boxes"}
{
#heading_search#}
{$FORM_ACTION}
{
$INPUT_SEARCH}{$BUTTON_SUBMIT}
{
#text_advanced_search#} {if $GM_OPENSEARCH_LINK} 
{$GM_OPENSEARCH_LINK} {/if} {$FORM_END
also das {form type=formend} finde ich nicht, wovor ich das probieren soll ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 28.04.2010, 09:54
Pax Pax ist offline
Benutzer
 
Registriert seit: 25.09.2009
Beiträge: 48
Cool

Hallo OlafWeber,

welche Shopversion hast Du denn? Ich bin von der Version 4 ausgegangen!

In dieser Version hast Du in dem Ordner boxes die jeweiligen .html Datein die für die linke sowie rechte Spalte zuständig sind.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 28.04.2010, 10:15
Benutzerbild von OlafWeber
Erfahrener Benutzer
 
Registriert seit: 24.05.2004
Ort: Thüringen
Beiträge: 250
Standard

Version xt:Commerce v3.0.4 SP2.1

Im Admin unter "Suchoptionen" kann man ja einstellen, dass auch in den Beschreibungen gesucht werden soll, aber eben nicht, dass die Kategorienamen mit berücksichtigt werden.

Wir haben z.B. eine Kategorie Bälle
und die Artikel heißen z.B. Ball 1, Ball 1...
also findet man bei der Suche "Bälle" nicht

Hoffe, Du weißt, was ich damit meine.

Danke für Antwort


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 28.04.2010, 10:33
Pax Pax ist offline
Benutzer
 
Registriert seit: 25.09.2009
Beiträge: 48
Lächeln

Hi,

Poste doch bitte mal den Code von der 'advanced_search_result.php'. Ich glaube hier muss was angepaßt werden.

mfg
Pax
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 28.04.2010, 10:41
Benutzerbild von OlafWeber
Erfahrener Benutzer
 
Registriert seit: 24.05.2004
Ort: Thüringen
Beiträge: 250
Standard

PHP-Code:
<?php
/* --------------------------------------------------------------
   advanced_search_result.php 2009-12-21 gambio
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2009 Gambio GmbH
   Released under the GNU General Public License
   --------------------------------------------------------------
*/
?><?php
/* -----------------------------------------------------------------------------------------
   $Id: advanced_search_result.php 1141 2005-08-10 11:31:36Z novalis $
   XT-Commerce - community made shopping
   http://www.xt-commerce.com
   Copyright (c) 2005 XT-Commerce
   -----------------------------------------------------------------------------------------
   based on:
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(advanced_search_result.php,v 1.68 2003/05/14); www.oscommerce.com
   (c) 2003  nextcommerce (advanced_search_result.php,v 1.17 2003/08/21); www.nextcommerce.org
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
include ('includes/application_top.php');
// bof gm
$_GET['keywords'] = htmlspecialchars($_GET['keywords']);
$_GET['pfrom']  = htmlspecialchars($_GET['pfrom']);
$_GET['pto']  = htmlspecialchars($_GET['pto']);
// eof gm
$breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCHxtc_href_link(FILENAME_ADVANCED_SEARCH));
$breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCHxtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT'keywords='.htmlentities($_GET['keywords']).'&amp;search_in_description='.htmlentities($_GET['search_in_description']).'&amp;categories_id='.(int)$_GET['categories_id'].'&amp;inc_subcat='.htmlentities($_GET['inc_subcat']).'&amp;manufacturers_id='.(int)$_GET['manufacturers_id'].'&amp;pfrom='.htmlentities($_GET['pfrom']).'&amp;pto='.htmlentities($_GET['pto']).'&amp;dfrom='.htmlentities($_GET['dfrom']).'&amp;dto='.htmlentities($_GET['dto'])));

// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
// include needed functions
require_once (DIR_FS_INC.'xtc_parse_search_string.inc.php');
require_once (
DIR_FS_INC.'xtc_get_subcategories.inc.php');
require_once (
DIR_FS_INC.'xtc_get_currencies_values.inc.php');
/*
 * check search entry
 */
$error 0// reset error flag to false
$errorno 0;
$keyerror 0;
if (isset (
$_GET['keywords']) && empty ($_GET['keywords'])) {
 
$keyerror 1;
}
if ((isset (
$_GET['keywords']) && empty ($_GET['keywords'])) && (isset ($_GET['pfrom']) && empty ($_GET['pfrom'])) && (isset ($_GET['pto']) && empty ($_GET['pto']))) {
 
$errorno += 1;
 
$error 1;
}
elseif (isset (
$_GET['keywords']) && empty ($_GET['keywords']) && !(isset ($_GET['pfrom'])) && !(isset ($_GET['pto']))) {
 
$errorno += 1;
 
$error 1;
}
if (
strlen($_GET['keywords']) < && strlen($_GET['keywords']) > && $error == 0) {
 
$errorno += 1;
 
$error 1;
 
$keyerror 1;
}
if (
strlen($_GET['pfrom']) > 0) {
 
$pfrom_to_check xtc_db_input($_GET['pfrom']);
 if (!
settype($pfrom_to_check"double")) {
  
$errorno += 10000;
  
$error 1;
 }
}
if (
strlen($_GET['pto']) > 0) {
 
$pto_to_check $_GET['pto'];
 if (!
settype($pto_to_check"double")) {
  
$errorno += 100000;
  
$error 1;
 }
}
if (
strlen($_GET['pfrom']) > && !(($errorno 10000) == 10000) && strlen($_GET['pto']) > && !(($errorno 100000) == 100000)) {
 if (
$pfrom_to_check $pto_to_check) {
  
$errorno += 1000000;
  
$error 1;
 }
}
if (
strlen($_GET['keywords']) > 0) {
 if (!
xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
  
$errorno += 10000000;
  
$error 1;
  
$keyerror 1;
 }
}
if (
$error == && $keyerror != 1) {
 
xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH'errorno='.$errorno.'&amp;'.xtc_get_all_get_params(array ('x''y'))));
} else {
 
/*
  *    search process starts here
  */
 
require (DIR_WS_INCLUDES.'header.php');
 
// define additional filters //
 //fsk18 lock
 
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
  
$fsk_lock " AND p.products_fsk18 != '1' ";
 } else {
  unset (
$fsk_lock);
 }
 
//group check
 
if (GROUP_CHECK == 'true') {
  
$group_check " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
 } else {
  unset (
$group_check);
 }
 
//manufacturers if set
 
if (isset ($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id'])) {
  
$manu_check " AND p.manufacturers_id = '".(int)$_GET['manufacturers_id']."' ";
 }
 
//include subcategories if needed
 
if (isset ($_GET['categories_id']) && xtc_not_null($_GET['categories_id'])) {
  if (
$_GET['inc_subcat'] == '1') {
   
$subcategories_array = array ();
   
xtc_get_subcategories($subcategories_array, (int)$_GET['categories_id']);
   
$subcat_join " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
   
$subcat_where " AND p2c.categories_id IN ('".(int) $_GET['categories_id']."' ";
   foreach (
$subcategories_array AS $scat) {
    
$subcat_where .= ", '".$scat."'";
   }
   
$subcat_where .= ") ";
  } else {
   
$subcat_join " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
   
$subcat_where " AND p2c.categories_id = '".(int) $_GET['categories_id']."' ";
  }
 }
 if (
$_GET['pfrom'] || $_GET['pto']) {
  
$rate xtc_get_currencies_values($_SESSION['currency']);
  
$rate $rate['value'];
  if (
$rate && $_GET['pfrom'] != '') {
   
$pfrom $_GET['pfrom'] / $rate;
  }
  if (
$rate && $_GET['pto'] != '') {
   
$pto $_GET['pto'] / $rate;
  }
 }
 
//price filters
 
if (($pfrom != '') && (is_numeric($pfrom))) {
  
$pfrom_check " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) >= ".xtc_db_input($pfrom).") ";
 } else {
  unset (
$pfrom_check);
 }
 if ((
$pto != '') && (is_numeric($pto))) {
  
$pto_check " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) <= ".xtc_db_input($pto)." ) ";
 } else {
  unset (
$pto_check);
 }
 
//build query
 
$select_str "SELECT distinct
                   p.products_id,
                   p.products_price,
                   p.products_model,
                   p.products_quantity,
                   p.products_shippingtime,
                   p.products_fsk18,
                   p.products_image,
                   p.products_weight,
                   p.products_tax_class_id,
                   p.products_vpe,
       p.products_vpe_status,
       p.products_vpe_value,                                     
                   pd.products_name,
                   pd.products_short_description,
                   pd.products_description "
;
 
$from_str  "FROM ".TABLE_PRODUCTS." AS p LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." AS pd ON (p.products_id = pd.products_id) ";
 
$from_str .= $subcat_join;
 if (
SEARCH_IN_ATTR == 'true') { $from_str .= " LEFT OUTER JOIN ".TABLE_PRODUCTS_ATTRIBUTES." AS pa ON (p.products_id = pa.products_id) LEFT OUTER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." AS pov ON (pa.options_values_id = pov.products_options_values_id) "; }
 
$from_str .= "LEFT OUTER JOIN ".TABLE_SPECIALS." AS s ON (p.products_id = s.products_id) AND s.status = '1'";
 if ((
DISPLAY_PRICE_WITH_TAX == 'true') && ((isset ($_GET['pfrom']) && xtc_not_null($_GET['pfrom'])) || (isset ($_GET['pto']) && xtc_not_null($_GET['pto'])))) {
  if (!isset (
$_SESSION['customer_country_id'])) {
   
$_SESSION['customer_country_id'] = STORE_COUNTRY;
   
$_SESSION['customer_zone_id'] = STORE_ZONE;
  }
  
$from_str .= " 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) ";
  
$tax_where " 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']."')";
 } else {
  unset (
$tax_where);
 }
 
//where-string
 
$where_str " WHERE p.products_status = '1' "." AND pd.language_id = '".(int) $_SESSION['languages_id']."'".$subcat_where.$fsk_lock.$manu_check.$group_check.$tax_where.$pfrom_check.$pto_check;
 
//go for keywords... this is the main search process
 
if (isset ($_GET['keywords']) && xtc_not_null($_GET['keywords'])) {
  if (
xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
   
$where_str .= " AND ( ";
   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 :
      
$where_str .= " ( ";
      
$where_str .= "pd.products_keywords LIKE ('%".addslashes($search_keywords[$i])."%') ";
      if (
SEARCH_IN_DESC == 'true') {
         
$where_str .= "OR pd.products_description LIKE ('%".addslashes(htmlentities($search_keywords[$i]))."%') ";
         
$where_str .= "OR pd.products_short_description LIKE ('%".addslashes(htmlentities($search_keywords[$i]))."%') ";
      }
      
$where_str .= "OR pd.products_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
      
$where_str .= "OR p.products_model LIKE ('%".addslashes($search_keywords[$i])."%') ";
      if (
SEARCH_IN_ATTR == 'true') {
         
$where_str .= "OR (pov.products_options_values_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
         
$where_str .= "AND pov.language_id = '".(int) $_SESSION['languages_id']."')";
      }
      
$where_str .= " ) ";
      break;
    }
   }
   
$where_str .= " ) GROUP BY p.products_id ORDER BY p.products_id ";
  }
 }
 
//glue together
 // BOF GM_MOD
 
if($_GET['keywords'] != ''$listing_sql $select_str.$from_str.$where_str;
 
// dummy: keine Suchergebnisse, wenn kein Suchbegriff angegeben wurde
 
else $listing_sql 'SELECT products_id FROM products WHERE products_id = 0';
 
// EOF GM_MOD
 
require (DIR_WS_MODULES.FILENAME_PRODUCT_LISTING);
}
$smarty->assign('language'$_SESSION['language']);
$smarty->caching 0;
if (!
defined(RM))
 
$smarty->load_filter('output''note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include (
'includes/application_bottom.php');
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 26.09.2011, 09:31
Neuer Benutzer
 
Registriert seit: 13.04.2007
Beiträge: 2
Frage Suche nach Kategorie

Hallo OlafWeber,
hast Du eine Lösung gefunden ?
Ich stehe vor dem gleichem Problem.

Gruss
dimast
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
kategorie, suche

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
[products] Fehlertolerante Suche - xt_fuzzy_search mzanier VEYTON 4.0 - Plugins 42 08.06.2011 10:37
Suche auch in Content-Seiten breitei Fragen zur Software 4 13.08.2009 13:05
Modul für Suche im Backend ihoppe Admininterface 0 04.05.2009 19:56


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:54 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand