PDA

Shop Support News Archive - Shopbetreiber News -> Forum : xt eCommerce Templates Module SEO Support: GPL Shop: Datenbank Abfrage aendern?!


DarKmaN_AC
26.04.2006, 16:20
Ich versuche gerade die Contrib Multishop von OSC, auf XTC zu ändern. Dabei habe ich folgene Fehlermeldung wenn ich die Datei aufrufe:

''>ZITAT</div>Multishop

1146 - Table 'd0021cc6.TABLE_SHOPS' doesn't exist

select count( ) as total from TABLE_SHOPS s, TABLE_SHOPS_INFO si where s.shops_id = si.shops_id

[XT SQL Error]
[/b]

Hier ist der PHP Code von dieser Datei:

''>ZITAT</div>
<?php
/
shops.php v1.00

Publied for
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com (http://anonym.to/?http://www.oscommerce.com)
Copyright © 2003 osCommerce
Released under the GNU General Public License

Created by XoraX for Multi-Shop Contribution
http://xorax.free.fr (http://anonym.to/?http://xorax.free.fr)
xxorax@gmail.com
/

require('includes/application_top.php');

$action = (isset($HTTP_GET['action']) ? $HTTP_GET['action'] : '');

// if (xtc_not_null($action)) {
switch ($action) {
case 'insert':
case 'save':
if (isset($HTTP_GET['sID'])) $shops_id = xtc_db_prepare_input($HTTP_GET['sID']);
$shops_name = xtc_db_prepare_input($HTTP_POST['shops_name']);

$sql_data_array = array('shops_name' => $shops_name);

if ($action == 'insert') {
xtc_db_perform(TABLE_SHOPS, $sql_data_array);
$shops_id = xtc_db_insert_id();
} elseif ($action == 'save') {
xtc_db_perform(TABLE_SHOPS, $sql_data_array, 'update', "shops_id = '" . (int)$shops_id . "'");
}

$sql_data_array = array('shops_addr' => xtc_db_prepare_input($_POST['shops_addr']),
'shops_ville' => xtc_db_prepare_input($_POST['shops_ville']),
'shops_cp' => xtc_db_prepare_input($_POST['shops_cp']),
'shops_tel' => xtc_db_prepare_input($_POST['shops_tel']),
'shops_fax' => xtc_db_prepare_input($_POST['shops_fax']),
'shops_indic' => xtc_db_prepare_input($_POST['shops_indic'])
);

if($action == 'insert') {
$insert_sql_data = array('shops_id' => $manufacturers_id);

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
xtc_db_perform(TABLE_SHOPS_INFO, $sql_data_array);

} elseif ($action == 'save') {
xtc_db_perform(TABLE_SHOPS_INFO, $sql_data_array, 'update', "shops_id = '" . (int)$shops_id . "'");
}

if ($shops_image = new upload('shops_image', DIR_FS_CATALOG_IMAGES)) {
xtc_db_query("update " . TABLE_SHOPS_INFO . " set shops_image = '" . $shops_image->filename . "' where shops_id = '" . (int)$shops_id . "'");
}
if ($shops_plan = new upload('shops_plan', DIR_FS_CATALOG_IMAGES)) {
xtc_db_query("update " . TABLE_SHOPS_INFO . " set shops_plan = '" . $shops_plan->filename . "' where shops_id = '" . (int)$shops_id . "'");
}


if (USE_CACHE == 'true') {
xtc_reset_cache_block('shops');
}

xtc_redirect(xtc_href_link(FILENAME_SHOPS, (isset($HTTP_GET['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'sID=' . $shops_id));
break;
case 'deleteconfirm':
$shops_id = xtc_db_prepare_input($HTTP_GET['sID']);

if (isset($HTTP_POST['delete_image']) && ($HTTP_POST_VARS['delete_image'] == 'on')) {
$shop_query = xtc_db_query("select shops_image from " . TABLE_SHOPS_INFO . " where shops_id = '" . (int)$shops_id . "'");
$shop = xtc_db_fetch_array($shop_query);

$image_location = DIR_FS_CATALOG_IMAGES_SHOPS . $shop['shops_image'];
if (file_exists($image_location)) @unlink($image_location);
$image_location = DIR_FS_CATALOG_IMAGES_SHOPS . xtc_parse_image($shop['shops_image'], SMALL_IMAGE_EXT);
if (file_exists($image_location)) @unlink($image_location);
}
if (isset($HTTP_POST['delete_plan']) && ($HTTP_POST['delete_plan'] == 'on')) {
$shop_query = xtc_db_query("select shops_plan from " . TABLE_SHOPS_INFO . " where shops_id = '" . (int)$shops_id . "'");
$shop = xtc_db_fetch_array($shop_query);

$image_location = DIR_FS_CATALOG_IMAGES_SHOPS . $shop['shops_plan'];
if (file_exists($image_location)) @unlink($image_location);
$image_location = DIR_FS_CATALOG_IMAGES_SHOPS . xtc_parse_image($shop['shops_plan'], SMALL_IMAGE_EXT);
if (file_exists($image_location)) @unlink($image_location);
}

xtc_db_query("delete from " . TABLE_SHOPS . " where shops_id = '" . (int)$shops_id . "'");
xtc_db_query("delete from " . TABLE_SHOPS_INFO . " where shops_id = '" . (int)$shops_id . "'");

if (isset($HTTP_POST['delete_products']) && ($HTTP_POST['delete_products'] == 'on')) {
$products_query = xtc_db_query("select products_id from " . TABLE_PRODUCTS . " where shops_id = '" . (int)$shops_id . "'");
while ($products = xtc_db_fetch_array($products_query)) {
xtc_remove_product($products['products_id']);
}
} else {
xtc_db_query("update " . TABLE_PRODUCTS . " set shops_id = '' where shops_id = '" . (int)$shops_id . "'");
}

if (USE_CACHE == 'true') {
xtc_reset_cache_block('shops');
}

xtc_redirect(xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page']));
break;
case 'new':
$head = TEXT_HEADING_NEW_SHOP;
break;
case 'edit':
$head = TEXT_HEADING_EDIT_SHOP;
break;
default:
$head = HEADING_TITLE;
break;
}
// }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Tranistional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>



<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

</table></td>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo $head; ?></td>
<td class="pageHeading" align="right"><?php echo xtc_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<?php
if ( ($action == 'new') || ($action == 'edit') ) {
$form_action = 'insert';
if ( ($action == 'edit') && isset($HTTP_GET_VARS['sID']) ) {
$form_action = 'save';

$shop_query = xtc_db_query("select s.shops_id, s.shops_name, si.shops_addr, si.shops_ville, si.shops_cp, si.shops_tel, si.shops_fax, si.shops_indic, si.shops_image, si.shops_plan from " . TABLE_SHOPS . " s, " . TABLE_SHOPS_INFO. " si where s.shops_id = '" . (int)$HTTP_GET_VARS['sID'] . "' and s.shops_id = si.shops_id");
$shop = xtc_db_fetch_array($shop_query);

$sInfo = new objectInfo($shop);
} else {
$sInfo = new objectInfo(array());
}

?>
<tr><form name="new_shop" <?php echo 'action="' . xtc_href_link(FILENAME_SHOPS, xtc_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"'; ?> method="post" enctype="multipart/form-data"><?php if ($form_action == 'save') echo xtc_draw_hidden_field('shops_id', $HTTP_GET_VARS['sID']); ?>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_SHOPS_NAME; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_name', (isset($sInfo->shops_name) ? $sInfo->shops_name : '')); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_ADDR; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_addr', (isset($sInfo->shops_addr) ? $sInfo->shops_addr : '')); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_CP; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_cp', (isset($sInfo->shops_cp) ? $sInfo->shops_cp: '')); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_VILLE; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_ville', (isset($sInfo->shops_ville) ? $sInfo->shops_ville: '')); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main" valign="top"><?php echo TEXT_SHOPS_INDIC; ?></td>
<td class="main"><?php echo xtc_draw_textarea_field('shops_indic', 'soft', '70', '15', (isset($sInfo->shops_indic) ? $sInfo->shops_indic: '') ); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_TEL; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_tel', (isset($sInfo->shops_tel) ? $sInfo->shops_tel: '')); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_FAX; ?></td>
<td class="main"><?php echo xtc_draw_input_field('shops_fax', (isset($sInfo->shops_fax) ? $sInfo->shops_fax: '')); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_IMAGE; ?></td>
<td class="main"><?php echo xtc_draw_file_field('shops_image'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SHOPS_PLAN; ?></td>
<td class="main"><?php echo xtc_draw_file_field('shops_plan'); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main" align="right" valign="top">
<?php echo (($form_action == 'insert') ? xtc_image_submit('button_insert.gif', IMAGE_INSERT) : xtc_image_submit('button_update.gif', IMAGE_UPDATE)). '' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . (isset($HTTP_GET_VARS['sID']) ? '&sID=' . $HTTP_GET_VARS['sID'] : '')) . ')'; ?></td>
</td>
</form></tr>
<?php
}else{
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SHOPS; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?></td>
</tr>
<?php
$shops_query_raw = "select s.shops_id, s.shops_name, si.shops_addr, si.shops_ville, si.shops_cp, si.shops_tel, si.shops_fax, si.shops_image, si.shops_plan from " . TABLE_SHOPS . " s, " . TABLE_SHOPS_INFO . " si where s.shops_id = si.shops_id order by s.shops_name";
$shops_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $shops_query_raw, $shops_query_numrows);
$shops_query = xtc_db_query($shops_query_raw);
while ($shops = xtc_db_fetch_array($shops_query)) {
if ((!isset($HTTP_GET_VARS['sID']) || (isset($HTTP_GET_VARS['sID']) && ($HTTP_GET_VARS['sID'] == $shops['shops_id']))) && !isset($sInfo) && (substr($action, 0, 3) != 'new')) {
$shop_products_query = xtc_db_query("select count( ) as products_count from " . TABLE_PRODUCTS . " where shops_id = '" . (int)$shops['shops_id'] . "'");
$shop_products = xtc_db_fetch_array($shop_products_query);

$sInfo_array = array_merge($shops, $shop_products);
$sInfo = new objectInfo($sInfo_array);
}

if (isset($sInfo) && is_object($sInfo) && ($shops['shops_id'] == $sInfo->shops_id)) {
echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $shops['shops_id'] . '&action=edit') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $shops['shops_id']) . '\'">' . "\n";
}
?>
<td class="dataTableContent"><?php echo $shops['shops_name']; ?></td>
<td class="dataTableContent" align="right"><?php if (isset($sInfo) && is_object($sInfo) && ($shops['shops_id'] == $sInfo->shops_id)) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&mID=' . $shops['shops_id']) . ')'; } ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText" valign="top"><?php echo $shops_split->display_count($shops_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_SHOPS); ?></td>
<td class="smallText" align="right"><?php echo $shops_split->display_links($shops_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
</tr>
</table></td>
</tr>
<?php
if (empty($action)) {
?>
<tr>
<td align="right" colspan="2" class="smallText"><?php echo '' . xtc_image_button('button_insert.gif', IMAGE_INSERT) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $sInfo->shops_id . '&action=new') . ')'; ?></td>
</tr>
<?php
}
?>
</table></td>
<?php
$heading = array();
$contents = array();

switch ($action) {
case 'delete':
$heading[] = array('text' => '' . TEXT_HEADING_DELETE_SHOP . '');

$contents = array('form' => xtc_draw_form('shops', FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $sInfo->shops_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_DELETE_INTRO);
$contents[] = array('text' => '
' . $sInfo->shops_name . '');
$contents[] = array('text' => '
' . xtc_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE);
$contents[] = array('text' => '
' . xtc_draw_checkbox_field('delete_plan', '', true) . ' ' . TEXT_DELETE_PLAN);

if ($sInfo->products_count > 0) {
$contents[] = array('text' => '
' . xtc_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
$contents[] = array('text' => '
' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $sInfo->products_count));
}

$contents[] = array('align' => 'center', 'text' => '
' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $sInfo->shops_id) . ')');
break;
default:
if (isset($sInfo) && is_object($sInfo)) {
$heading[] = array('text' => '' . $sInfo->shops_name . '');

$contents[] = array('align' => 'center', 'text' => '' . xtc_image_button('button_edit.gif', IMAGE_EDIT) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $sInfo->shops_id . '&action=edit') . ') ' . xtc_image_button('button_delete.gif', IMAGE_DELETE) . ' (' . xtc_href_link(FILENAME_SHOPS, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $sInfo->shops_id . '&action=delete') . ')');
$contents[] = array('text' => '
' . TEXT_SHOPS_IMAGE . $sInfo->shops_image . '
' . TEXT_SHOPS_PLAN . $sInfo->shops_plan );
$contents[] = array('text' => '
' . TEXT_SHOPS_ADDR . '
'.$sInfo->shops_addr);
$contents[] = array('text' => '
' . TEXT_SHOPS_CP . '
'.$sInfo->shops_cp);
$contents[] = array('text' => '
' . TEXT_SHOPS_VILLE . '
'.$sInfo->shops_ville);
$contents[] = array('text' => '

' . TEXT_SHOPS_TEL . '' . $sInfo->shops_tel . '
' . TEXT_SHOPS_FAX . '' . $sInfo->shops_fax);
$contents[] = array('text' => '
' . TEXT_PRODUCTS . ' ' . $sInfo->products_count);
}
break;
}

if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
echo ' <td width="25%" valign="top">' . "\n";

$box = new box;
echo $box->infoBox($heading, $contents);

echo ' </td>' . "\n";
}
}
?>
</tr>
</table></td>
</tr>
</table></td>

</tr>
</table>



<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>



</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
[/b]

und folgender mysql code läßt sich nicht hinzufügen:
''>ZITAT</div>
INSERT INTO `configuration` VALUES ('', 'Affichage du Bloc Nos Magasins', 'MAX_DISPLAY_SHOPS_IN_A_LIST', '20', 'Quand le nombre de magasins d&eacute;passe cette valeur, une \'liste d&eacute;roulante\' sera utilis&eacute;e &agrave; la place de la liste par d&eacute;faut.', 3, 8, '2005-04-29 01:13:06', '2005-04-28 05:16:13', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Affichage du Bloc Nos Magasins \'Liste\'', 'MAX_SHOPS_LIST', '0', 'Quand cette valeur est &eacute;gale &agrave; 1 la \'liste d&eacute;roulante\' classique sera utilis&eacute;e. Sinon, une liste sera affich&eacute;e avec le nombre de lignes sp&eacute;cifi&eacute;es.', 3, 8, '2005-04-29 01:12:10', '2005-04-28 05:16:13', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Affichage du Bloc Nos Magasins \'Longueur du nom\'', 'MAX_DISPLAY_SHOP_NAME_LEN', '15', 'Longueur maximum du nom de magasin &agrave; afficher.', 3, 8, NULL, '2005-04-28 05:16:13', NULL, NULL);
[/b]

Könnte mir jemand bitte mal helfen uns sich das mal anschauen?
Das Modul wird für die xtc 3.04 sein!

THX!!

Gruß
Andre´

TechWay
26.04.2006, 17:27
Hi,

die INSERT INTO Befehle musst du nur an XTC anpassen, den die DB-Struktur stimmt mit der von OSC nicht ganz überein...

so müsste es klappen:


INSERT INTO `configuration` VALUES ('', 'MAX_DISPLAY_SHOPS_IN_A_LIST', '20', 3, 8, '2005-04-29 01:13:06', '2005-04-28 05:16:13', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'MAX_SHOPS_LIST', '0', 3, 8, '2005-04-29 01:12:10', '2005-04-28 05:16:13', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'MAX_DISPLAY_SHOP_NAME_LEN', '15', 3, 8, NULL, '2005-04-28 05:16:13', NULL, NULL);


du musst dann eventuell noch die sprachdateien erweitern...

der andere fehler, da hast du diese variable TABLE_SHOPS und TABLE_SHOPS_INFO nicht gesetzt...

dass muss wohl irgendwo in die application_top.php

Gruß

DarKmaN_AC
26.04.2006, 20:28
yo danke, jetzt klappt es. Zumindest was das angeht.
Jetzt stehe ich vor dem nächsten Problem, ich weiß nicht wie ich folgende Info in der index.php einbauen soll.

info
''>ZITAT</div>in : index.php -------------

<<-------------

replace : l 127
} elseif ($category_depth == 'products' || isset($_GET['manufacturers_id']) ) {
to :
} elseif ($category_depth == 'products' || isset($_GET['manufacturers_id']) || isset($_GET['shops_id']) ) {

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

after : l 172
if (isset($_GET['manufacturers_id'])) {
if (isset($_GET['filter_id']) && tep_not_null($_GET['filter_id'])) {
// We are asked to show only a specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
}
insert :
} elseif (isset($_GET['shops_id'])) {
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SHOPS . " sh left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.shops_id = sh.shops_id and sh.shops_id = '" . (int)$_GET['shops_id'] . "'";

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

after: l 246
if (isset($_GET['manufacturers_id'])) {
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' order by cd.categories_name";

insert:
} elseif (isset($_GET['shops_id'])) {
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.shops_id = '" . (int)$_GET['shops_id'] . "' order by cd.categories_name";


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

after: l 256
if (isset($_GET['manufacturers_id'])) {
echo tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']);
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));

insert:
} elseif (isset($_GET['shops_id'])) {
echo tep_draw_hidden_field('shops_id', $_GET['shops_id']);
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));


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

after: l 277
if (isset($_GET['manufacturers_id'])) {
$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'");
$image = tep_db_fetch_array($image);
$image = $image['manufacturers_image'];

insert :
} elseif (isset($_GET['shops_id'])) {
$head_temp = tep_db_query("select si.shops_image, s.shops_name from " . TABLE_SHOPS . " s, " . TABLE_SHOPS_INFO . " si where s.shops_id = '" . (int)$_GET['shops_id'] . "' and si.shops_id = s.shops_id");
$head_temp = tep_db_fetch_array($head_temp);
$image = $head_temp['shops_image'];
$image_type = 'shops';
$heading_title = $head_temp['shops_name'];

------------->>[/b]

die Index.php

''>ZITAT</div>
<?php

/ -----------------------------------------------------------------------------------------
$Id: index.php 1321 2005-10-26 20:55:07Z mz $

XT-Commerce - community made shopping
http://www.xt-commerce.com (http://anonym.to/?http://www.xt-commerce.com)

Copyright © 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
© 2000-2001 The Exchange Project (earlier name of osCommerce)
© 2002-2003 osCommerce(default.php,v 1.84 2003/05/07); www.oscommerce.com
© 2003 nextcommerce (default.php,v 1.13 2003/08/17); www.nextcommerce.org

Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
Enable_Disable_Categories 1.3 Autor: Mikel Williams | mikel@ladykatcostumes.com
Customers Status v3.x © 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs...by=date#dirlist (http://anonym.to/?http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist)

Released under the GNU General Public License
--------------------------------------------------------------------------------------- /

include ('includes/application_top.php');

// create smarty elements

$smarty = new Smarty;

// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');

// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset ($cPath) && xtc_not_null($cPath)) {
$categories_products_query = "select count( ) as total from ".TABLE_PRODUCTS_TO_CATEGORIES." where categories_id = '".$current_category_id."'";
$categories_products_query = xtDBquery($categories_products_query);
$cateqories_products = xtc_db_fetch_array($categories_products_query, true);
if ($cateqories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = "select count( ) as total from ".TABLE_CATEGORIES." where parent_id = '".$current_category_id."'";
$category_parent_query = xtDBquery($category_parent_query);
$category_parent = xtc_db_fetch_array($category_parent_query, true);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}

require (DIR_WS_INCLUDES.'header.php');

include (DIR_WS_MODULES.'default.php');
$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');
?>[/b]

TechWay
26.04.2006, 21:33
du hast in der falschen datei geschaut... dazu musst du die default.php im includes-Ordner anpassen!!