Standardmäßig nutzt der Shop auf den Suchergebnisseiten auch das Template für die Produktlisten (z.B. templates/TEMPLATE/product_listing/product_listing_v1.html). Um das zu ändern ist eine kleine Anpassung in der includes/modules/product_listing.php notwendig. Sucht dort nach folgendem Code:
PHP-Code:
// get default template
if ($category['listing_template'] == '' or $category['listing_template'] == 'default') {
$files = array ();
if ($dir = opendir(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/product_listing/')) {
while (($file = readdir($dir)) !== false) {
if (is_file(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/product_listing/'.$file) and ($file != "index.html") and (substr($file, 0, 1) !=".")) {
$files[] = array ('id' => $file, 'text' => $file);
} //if
} // while
closedir($dir);
}
$category['listing_template'] = $files[0]['id'];
}
und ersetzt ihn gegen diesen:
PHP-Code:
// get default template
if (substr(basename($PHP_SELF), 0, 22) != 'advanced_search_result') {
if ($category['listing_template'] == '' or $category['listing_template'] == 'default') {
$files = array ();
if ($dir = opendir(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/product_listing/')) {
while (($file = readdir($dir)) !== false) {
if (is_file(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/product_listing/'.$file) and ($file != "index.html") and (substr($file, 0, 1) !=".")) {
$files[] = array ('id' => $file, 'text' => $file);
} //if
} // while
closedir($dir);
}
$category['listing_template'] = $files[0]['id'];
}
} else {
$category['listing_template'] = 'search_results.html';
}
Nun die templates/TEMPLATE/product_listing/product_listing_v1.html kopieren und in search_results.html umbennen. Dann in dieser das Layout wie gewünscht anpassen.Fertig!
MfG Hetfield