Jump to content
xt:Commerce Community Forum

?berschrift Bei Suchergebnis


gswkaiser

Recommended Posts

Bei dem Ergebnis einer Suche wird keine ?berschrift ?ber der resultierenden Produktliste dargestellt (wie das sonst immer der Fall ist)

Mit folgenden ?nderungen kann man das beheben:

===============================================

Modul "advanced_search_result.php"

vor


	require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);


einf?gen

	$category = array();

	$category['categories_name'] = 'Suchergebnis';

	$category['categories_description'] = 'Suchwort(e): "' . $_GET['keywords'] . '"';


=============================================== Modul "includes/modules/product_listing.php"

 $category_query = xtc_db_query("select

                   cd.categories_description,

                   cd.categories_name,

                   c.listing_template,

                   c.categories_image from " .

     TABLE_CATEGORIES . " c, " .

     TABLE_CATEGORIES_DESCRIPTION . " cd

                   where c.categories_id = '" . $current_category_id . "'

                   and cd.categories_id = '" . $current_category_id . "'

                   ".$group_check."

                   and cd.language_id = '" . $_SESSION['languages_id'] . "'");


 $category = xtc_db_fetch_array($category_query);

 $image='';

 if ($category['categories_image']!='') $image=DIR_WS_IMAGES.'categories/'.$category['categories_image'];

 $module_smarty->assign('CATEGORIES_IMAGE',$image);

 $module_smarty->assign('CATEGORIES_NAME',$category['categories_name']);

$module_smarty->assign('CATEGORIES_DESCRIPTION',$category['categories_description']);


ersetzen mit

	if ($current_category_id != 0) 

	{

 $category_query = xtc_db_query("select

                   cd.categories_description,

                   cd.categories_name,

                   c.listing_template,

                   c.categories_image from " .

     TABLE_CATEGORIES . " c, " .

     TABLE_CATEGORIES_DESCRIPTION . " cd

                   where c.categories_id = '" . $current_category_id . "'

                   and cd.categories_id = '" . $current_category_id . "'

                   ".$group_check."

                   and cd.language_id = '" . $_SESSION['languages_id'] . "'");


 $category = xtc_db_fetch_array($category_query);

 $image='';

 if ($category['categories_image']!='') $image=DIR_WS_IMAGES.'categories/'.$category['categories_image'];

 $module_smarty->assign('CATEGORIES_IMAGE',$image);

	}

	$module_smarty->assign('CATEGORIES_NAME',$category['categories_name']);

	$module_smarty->assign('CATEGORIES_DESCRIPTION',$category['categories_description']);


Link to comment
Share on other sites

  • 4 years later...

Hallo,

aber das Formatieren nicht vergessen!:D

$category['categories_description'] = '<div class="suche01" align="center"> - Sie haben gesucht nach: Suchwort(e) </div><div class="suche02" align="center">"' . $_GET['keywords'] . '"</div>';

Ausgabe erfolgt über {$CATEGORIES_DESCRIPTION} in der _product_listing_v1.html

Wer da Problem hat mit der Anzeige, kann es auch so direkt in die html schreiben:

if (isset($_GET['keywords'])) {  
print_r ($_GET['keywords']);
} [/php]

den Tip habe ich von dem Post:

http://www.xt-commerce.com/forum/s-shopbereich/45151-artikelnummer-kategorie-listing-2.html#post335520

Da habe ich auch angegeben wie man mit einem echo-Befehl die Ausgabe formatieren kann.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...