Guest aksk Posted September 3, 2007 Report Share Posted September 3, 2007 Also den shop sehe ich das ist schonmal was, nun ist das Problem das ich keine suche starten kann und keine kategorie geht, weil dann kommt folgender Fehler schaut unter http://www.xt-commerce.com/forum/showthread.php?p=256867#post256867 Vielleicht habt ihr ja da auch noch eine Lösung für, wäre super Link to comment Share on other sites More sharing options...
rivendarkness Posted September 4, 2007 Author Report Share Posted September 4, 2007 Wie ich sehe nutzt Du Gambio...da kann Dir hier keiner helfen...auch wenn der script ähnlich ist, ist er anders...wende dich bitte an ein anderes forum (gambio) oscommerce ist auch ähnlich im script und trotzdem ganz anders Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Hallo, Ich sitze auch grade an XT-Commerce und habe das Problem, dass ich folgende Fehlermeldung erhalte, sobald ich auf meine Kategorien klicke: 1054 - Unknown column 'p.products_id' in 'on clause' select p.products_fsk18, p.products_shippingtime, p.products_model, p.vario_s01, p.products_ean, pd.products_name, pd.products_name2, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_discount_allowed, p.products_tax_class_id from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p2c.categories_id = '2' ORDER BY p.products_price ASC [XT SQL Error] Den gleichen Fehler hatten ja nun schon einige vor mir auch, hab auch alles gelesen und die Klammern an den empfohlenen Stellen gesetzt, aber irgendwie scheint es immer noch nicht zu funktionieren. Danke schon mal im vorraus Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 Huhu DaHengst, Ich finde diese SQL-Abfrage auch nicht. Du scheinst eine Version zu haben, die ich nicht habe. Vermutlich befindet sich aber diese Abfrage in der includes/modules/default.php Schau dort bitte mal nach und passe den Code dort an. Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Was meinst du mit anpassen? Schauen ob da eventuell klammern fehlen? Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 Ähm...genau...anpassen heisst du passt den script an Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Ok hat sich grade erledigt, hab ein bischen weiter gegooglet und dann was gefunden. lag (wie bei den anderen auch) an fehlenden Klammern, nur an anderer Stelle. Allerdings hab ich nun noch das Problem, dass wenn ich auf der Index (im Begrüßungstext) auf "neuen Artikel" klicke, folgende Fehlermeldung kommt: 1054 - Unknown column 'p.manufacturers_id' in 'on clause' select distinct p.products_id, p.products_fsk18, pd.products_name, pd.products_short_description, p.products_image, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from products p, categories c, products_to_categories p2c left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '2' where c.categories_status=1 and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' and p.products_date_added > '2007.08.06' order by p.products_date_added DESC [XT SQL Error] Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 Ah prima ok und wenn du Probleme bei "Neue Artikel" hast, musst du in die product_info.php reinschaun und dort den Script anpassen. Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Hmm... grade versucht dort was zu finden (Fehlende Klammern oder ähnliches) aber nichts gefunden. Eventuell reicht mein PHP einfach noch nicht dazu. Könnte sich jemand erbarmen und für mich schauen Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 oh, ähm, dann guck doch mal in die products_new.php Was die sonstige Hilfe angeht...ich helf grad jemand anderen bei Ihrem Shop und bekomm dafür Naturalien:D Nich was man denkt LOL. es gibt leckere Sachen und 3 schöne orientalische Kissen hihi Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Ok, also in der products_new.php hab ich zumindest schon mal die stelle gefunden, die in der Fehlermeldung vorkommt. Mal hoffen, dass ich auch den Fehler finde. Danke dir soweit schon mal Falls wir uns mal sehen sollten bekommst nen Keks! Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 $products_new_query_raw = "select distinct p.products_id, p.products_fsk18, pd.products_name, pd.products_short_description, p.products_image, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from ".TABLE_PRODUCTS." p, ".TABLE_CATEGORIES." c, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c left join ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id left join ".TABLE_PRODUCTS_DESCRIPTION." pd on p.products_id = pd.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."' where c.categories_status=1 and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' ".$group_check." ".$fsk_lock." ".$days." order by p.products_date_added DESC "; Hier muss der fehler drin sein.. aber wo Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 Na vielen Danke...Soviel zur Zahlungsmoral der Deutschen Probiers mal damit: $products_new_query_raw = "select distinct p.products_id, p.products_fsk18, pd.products_name, pd.products_short_description, p.products_image, p.products_price, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from (((".TABLE_PRODUCTS." p, ".TABLE_CATEGORIES." c, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c) left join ".TABLE_MANUFACTURERS." m on p.manufacturers_id = m.manufacturers_id) left join ".TABLE_PRODUCTS_DESCRIPTION." pd on p.products_id = pd.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."' ) where c.categories_status=1 and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' ".$group_check." ".$fsk_lock." ".$days." order by p.products_date_added DESC "; Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Ich danke dir vielmals !!! Mit Orientkissen usw kann ich ja nicht mehr kommen und Kekse sind immer gut Link to comment Share on other sites More sharing options...
rivendarkness Posted September 5, 2007 Author Report Share Posted September 5, 2007 Ich nehme alles was du bieten kannst hrhr Schön das es bei Dir auch geklappt hat Link to comment Share on other sites More sharing options...
DaHengst Posted September 5, 2007 Report Share Posted September 5, 2007 Ich nehme alles was du bieten kannst hrhr huch ok, komm ich drauf zurück Hab dir überigends noch ne mail geschrieben die sich allerdings schon erledigt hat, also gekonnt ignorieren Link to comment Share on other sites More sharing options...
rivendarkness Posted September 6, 2007 Author Report Share Posted September 6, 2007 Ich hab Dir eigentlich schon drauf geantwortet...naja, weiter im Text hier...sonstwer noch Hilfe benötigt? Link to comment Share on other sites More sharing options...
Karten Mobil Posted September 9, 2007 Report Share Posted September 9, 2007 Ja :-) Also hab mir hier jetzt mal alles duchgelesen und probiert aber leider komme ich nicht auf eine Lösung. Ich hoffe Ihr könnt mir helfen. Ich habe die Shopversion 3.0.3 und bin bei Host Europe. Meine Fehlermeldung: 1054 - Unknown column 'p.products_id' in 'on clause' select p.products_fsk18, p.products_shippingtime, p.products_model, p.products_ean, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_discount_allowed, p.products_tax_class_id from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p2c.categories_id = '39' ORDER BY p.products_price ASC [XT SQL Error] Link: http://www.karten-mobil.com/shop/index.php?cPath=37_39 Meine Indexseite: <?php /* ----------------------------------------------------------------------------------------- $Id: index.php,v 1.21 2004/05/25 17:09:01 fanta2k Exp $ XT-Commerce - community made shopping 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 | [email protected] Customers Status v3.x © 2002-2003 Copyright Elari [email protected] | www.unlockgsm.com/dload-osc/ | CVS : 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'); ?>Also ich hoffe das langt erst mal um mir vielleicht einen Tipp zu geben. Allerdings muss ich Euch gleich Wahnen PHP und ich sind nicht wirklich eins ;-) Also auf jede Hilfe würde ich mich sehr freuen. Karten Mobil Link to comment Share on other sites More sharing options...
Karten Mobil Posted September 9, 2007 Report Share Posted September 9, 2007 Habs gelöst! hab alles noch mal versucht und der Fehler war in der "default" Datei. Link to comment Share on other sites More sharing options...
rivendarkness Posted September 10, 2007 Author Report Share Posted September 10, 2007 jupp dort ist zu suchen und nicht in der index.php. Link to comment Share on other sites More sharing options...
Chris.Cross Posted October 10, 2007 Report Share Posted October 10, 2007 Ich hab das Problem durch nen Serverwechsel auch gerade und brauch dafür ganz dringen Hilfe default.php: <?php /* ----------------------------------------------------------------------------------------- $Id: default.php,v 1.27 2004/04/26 10:31:17 fanta2k Exp $ XT-Commerce - community made shopping [URL]http://www.xt-commerce.com[/URL] Copyright (c) 2003 XT-Commerce ----------------------------------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(default.php,v 1.84 2003/05/07); [URL="http://www.oscommerce.com"]www.oscommerce.com[/URL] (c) 2003 nextcommerce (default.php,v 1.11 2003/08/22); [URL="http://www.nextcommerce.org"]www.nextcommerce.org[/URL] Released under the GNU General Public License ----------------------------------------------------------------------------------------- Third Party contributions: Enable_Disable_Categories 1.3 Autor: Mikel Williams | [EMAIL="[email protected]"][email protected][/EMAIL] Customers Status v3.x (c) 2002-2003 Copyright Elari [EMAIL="[email protected]"][email protected][/EMAIL] | [URL="http://www.unlockgsm.com/dload-osc/"]www.unlockgsm.com/dload-osc/[/URL] | CVS : [URL]http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist[/URL] Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ $default_smarty = new smarty; $default_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/'); $default_smarty->assign('session',session_id()); $main_content = ''; // include needed functions require_once(DIR_FS_INC . 'xtc_customer_greeting.inc.php'); require_once(DIR_FS_INC . 'xtc_get_path.inc.php'); require_once(DIR_FS_INC . 'xtc_draw_hidden_field.inc.php'); require_once(DIR_FS_INC . 'xtc_check_categories_status.inc.php'); require_once(DIR_FS_INC . 'xtc_image_button.inc.php'); if (xtc_check_categories_status($current_category_id)>=1) { $error=CATEGORIE_NOT_FOUND; include(DIR_WS_MODULES . FILENAME_ERROR_HANDLER); } else { if ($category_depth == 'nested') { if (GROUP_CHECK=='true') { $group_check="and c.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $category_query = xtc_db_query("select cd.categories_description, cd.categories_name, c.categories_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 = '" . (int)$_SESSION['languages_id'] . "'"); $category = xtc_db_fetch_array($category_query); if (isset($cPath) && ereg('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i = 0, $n = sizeof($category_links); $i < $n; $i++) { if (GROUP_CHECK=='true') { $group_check="and c.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '" . $category_links[$i] . "' and c.categories_id = cd.categories_id ".$group_check." and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by sort_order, cd.categories_name"); if (xtc_db_num_rows($categories_query) < 1) { // do nothing, go through the loop } else { break; // we've found the deepest category the customer is in } } } else { if (GROUP_CHECK=='true') { $group_check="and c.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $categories_query = xtc_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id ".$group_check." and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by sort_order, cd.categories_name"); } $rows = 0; while ($categories = xtc_db_fetch_array($categories_query)) { $rows++; $cPath_new = xtc_get_path($categories['categories_id']); $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; $image=''; if ($categories['categories_image']!='') { $image=DIR_WS_IMAGES.'categories/'.$categories['categories_image']; } $categories_content[]=array( 'CATEGORIES_NAME' => $categories['categories_name'], 'CATEGORIES_IMAGE' => $image, 'CATEGORIES_LINK' => xtc_href_link(FILENAME_DEFAULT, $cPath_new), 'CATEGORIES_DESCRIPTION' => $categories['categories_description']); } $new_products_category_id = $current_category_id; include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); $image=''; if ($category['categories_image']!='') { $image=DIR_WS_IMAGES.'categories/'.$category['categories_image']; } $default_smarty->assign('CATEGORIES_NAME',$category['categories_name']); $default_smarty->assign('CATEGORIES_IMAGE',$image); $default_smarty->assign('CATEGORIES_DESCRIPTION',$category['categories_description']); $default_smarty->assign('language', $_SESSION['language']); $default_smarty->assign('module_content',$categories_content); // get default template if ($category['categories_template']=='' or $category['categories_template']=='default') { $files=array(); if ($dir= opendir(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/')){ while (($file = readdir($dir)) !==false) { if (is_file( DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/module/categorie_listing/'.$file) and ($file !="index.html")){ $files[]=array( 'id' => $file, 'text' => $file); }//if } // while closedir($dir); } $category['categories_template']=$files[0]['id']; } $default_smarty->caching = 0; $main_content= $default_smarty->fetch(CURRENT_TEMPLATE.'/module/categorie_listing/'.$category['categories_template']); $smarty->assign('main_content',$main_content); } elseif ($category_depth == 'products' || $_GET['manufacturers_id']) { //fsk18 lock $fsk_lock=''; if ($_SESSION['customers_status']['customers_fsk18_display']=='0') { $fsk_lock=' and p.products_fsk18!=1'; } // show the products of a specified manufacturer if (isset($_GET['manufacturers_id'])) { if (isset($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) { // sorting query $sorting_query=xtc_db_query("SELECT products_sorting, products_sorting2 FROM ". TABLE_CATEGORIES." where categories_id='".(int)$_GET['filter_id']."'"); $sorting_data=xtc_db_fetch_array($sorting_query); if (!$sorting_data['products_sorting']) $sorting_data['products_sorting']='pd.products_name'; $sorting=' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' '; // We are asked to show only a specific category if (GROUP_CHECK=='true') { $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $listing_sql = "select DISTINCT p.products_fsk18, p.products_shippingtime, p.products_model, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_discount_allowed, p.products_tax_class_id 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 ".$group_check." and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' ".$fsk_lock." and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'".$sorting; } else { // We show them all if (GROUP_CHECK=='true') { $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $listing_sql = "select p.products_fsk18, p.products_shippingtime, p.products_model, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_discount_allowed, p.products_tax_class_id 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 ".$group_check." and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.manufacturers_id = m.manufacturers_id ".$fsk_lock." and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) { // sorting query $sorting_query=xtc_db_query("SELECT products_sorting, products_sorting2 FROM ". TABLE_CATEGORIES." where categories_id='".$current_category_id."'"); $sorting_data=xtc_db_fetch_array($sorting_query); if (!$sorting_data['products_sorting']) $sorting_data['products_sorting']='pd.products_name'; $sorting=' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' '; // We are asked to show only specific catgeory if (GROUP_CHECK=='true') { $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $listing_sql = "select p.products_fsk18, p.products_shippingtime, p.products_model, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_discount_allowed, p.products_tax_class_id 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['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id ".$group_check." and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' ".$fsk_lock." and p2c.categories_id = '" . $current_category_id . "'".$sorting; } else { // sorting query $sorting_query=xtc_db_query("SELECT products_sorting, products_sorting2 FROM ". TABLE_CATEGORIES." where categories_id='".$current_category_id."'"); $sorting_data=xtc_db_fetch_array($sorting_query); if (!$sorting_data['products_sorting']) $sorting_data['products_sorting']='pd.products_name'; $sorting=' ORDER BY '.$sorting_data['products_sorting'].' '.$sorting_data['products_sorting2'].' '; // We show them all if (GROUP_CHECK=='true') { $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $listing_sql = "select p.products_fsk18, p.products_shippingtime, p.products_model, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, p.products_id, p.manufacturers_id, p.products_price, p.products_discount_allowed, p.products_tax_class_id from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id ".$group_check." and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' ".$fsk_lock." and p2c.categories_id = '" . $current_category_id . "'".$sorting; } } // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { 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)$_SESSION['languages_id'] . "' and p.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = xtc_db_query($filterlist_sql); if (xtc_db_num_rows($filterlist_query) > 1) { $manufacturer_dropdown= xtc_draw_form('filter', FILENAME_DEFAULT, 'GET') .' '; if (isset($_GET['manufacturers_id'])) { $manufacturer_dropdown.= xtc_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']); $options = array(array('text' => TEXT_ALL_CATEGORIES)); } else { $manufacturer_dropdown.= xtc_draw_hidden_field('cPath', $cPath); $options = array(array('text' => TEXT_ALL_MANUFACTURERS)); } $manufacturer_dropdown.= xtc_draw_hidden_field('sort', $_GET['sort']); while ($filterlist = xtc_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } $manufacturer_dropdown.= xtc_draw_pull_down_menu('filter_id', $options, $_GET['filter_id'], 'onchange="this.form.submit()"'); $manufacturer_dropdown.= '</form>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($_GET['manufacturers_id'])) { $image = xtc_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"); $image = xtc_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = xtc_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); $image = xtc_db_fetch_array($image); $image = $image['categories_image']; } include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); } else { // default page $shop_content_query=xtc_db_query("SELECT content_title, content_heading, content_text, content_file FROM ".TABLE_CONTENT_MANAGER." WHERE content_group='5' AND languages_id='".$_SESSION['languages_id']."'"); $shop_content_data=xtc_db_fetch_array($shop_content_query); $default_smarty->assign('title',$shop_content_data['content_heading']); include(DIR_WS_INCLUDES . FILENAME_CENTER_MODULES); if ($shop_content_data['content_file']!=''){ ob_start(); if (strpos($shop_content_data['content_file'],'.txt')) echo '<pre>'; include(DIR_FS_CATALOG.'media/content/'.$shop_content_data['content_file']); if (strpos($shop_content_data['content_file'],'.txt')) echo '</pre>'; $shop_content_data['content_text']=ob_get_contents(); ob_end_clean(); } $default_smarty->assign('text',str_replace('{$greeting}',xtc_customer_greeting(),$shop_content_data['content_text'])); $default_smarty->assign('language', $_SESSION['language']); // set cache ID if (USE_CACHE=='false') { $default_smarty->caching = 0; $main_content= $default_smarty->fetch(CURRENT_TEMPLATE.'/module/main_content.html'); } else { $default_smarty->caching = 1; $default_smarty->cache_lifetime=CACHE_LIFETIME; $default_smarty->cache_modified_check=CACHE_CHECK; $cache_id = $_SESSION['language'].$_SESSION['currency'].$_SESSION['customer_id']; $main_content= $default_smarty->fetch(CURRENT_TEMPLATE.'/module/main_content.html',$cache_id); } $smarty->assign('main_content',$main_content); } } ?> advanced_search_result.php <?php /* ----------------------------------------------------------------------------------------- $Id: advanced_search_result.php,v 1.8 2004/04/05 16:33:49 fanta2k Exp $ XT-Commerce - community made shopping [URL]http://www.xt-commerce.com[/URL] Copyright (c) 2003 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); [URL="http://www.oscommerce.com"]www.oscommerce.com[/URL] (c) 2003 nextcommerce (advanced_search_result.php,v 1.17 2003/08/21); [URL="http://www.nextcommerce.org"]www.nextcommerce.org[/URL] 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'); // 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_parse_search_string.inc.php'); require_once(DIR_FS_INC . 'xtc_parse_search_string.inc.php'); require_once(DIR_FS_INC . 'xtc_parse_search_string.inc.php'); require_once(DIR_FS_INC . 'xtc_checkdate.inc.php'); require_once(DIR_FS_INC . 'xtc_get_currencies_values.inc.php'); $error = 0; // reset error flag to false $errorno = 0; if ( (isset($_GET['keywords']) && empty($_GET['keywords'])) && (isset($_GET['dfrom']) && (empty($_GET['dfrom']) || ($_GET['dfrom'] == DOB_FORMAT_STRING))) && (isset($_GET['dto']) && (empty($_GET['dto']) || ($_GET['dto'] == DOB_FORMAT_STRING))) && (isset($_GET['pfrom']) && empty($_GET['pfrom'])) && (isset($_GET['pto']) && empty($_GET['pto'])) ) { $errorno += 1; $error = 1; } $dfrom_to_check = (($_GET['dfrom'] == DOB_FORMAT_STRING) ? '' : $_GET['dfrom']); $dto_to_check = (($_GET['dto'] == DOB_FORMAT_STRING) ? '' : $_GET['dto']); if (strlen($dfrom_to_check) > 0) { if (!xtc_checkdate($dfrom_to_check, DOB_FORMAT_STRING, $dfrom_array)) { $errorno += 10; $error = 1; } } if (strlen($dto_to_check) > 0) { if (!xtc_checkdate($dto_to_check, DOB_FORMAT_STRING, $dto_array)) { $errorno += 100; $error = 1; } } if (strlen($dfrom_to_check) > 0 && !(($errorno & 10) == 10) && strlen($dto_to_check) > 0 && !(($errorno & 100) == 100)) { if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) { $errorno += 1000; $error = 1; } } if (strlen($_GET['pfrom']) > 0) { $pfrom_to_check = $_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']) > 0 && !(($errorno & 10000) == 10000) && strlen($_GET['pto']) > 0 && !(($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; } } if ($error == 1) { xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH, 'errorno=' . $errorno . '&' . xtc_get_all_get_params(array('x', 'y')))); } else { $breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH)); $breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . $_GET['keywords'] . '&search_in_description=' . $_GET['search_in_description'] . '&categories_id=' . $_GET['categories_id'] . '&inc_subcat=' . $_GET['inc_subcat'] . '&manufacturers_id=' . $_GET['manufacturers_id'] . '&pfrom=' . $_GET['pfrom'] . '&pto=' . $_GET['pto'] . '&dfrom=' . $_GET['dfrom'] . '&dto=' . $_GET['dto'])); require(DIR_WS_INCLUDES . 'header.php'); //fsk18 lock $fsk_lock=''; if ($_SESSION['customers_status']['customers_fsk18_display']=='0') { $fsk_lock=' and p.products_fsk18!=1'; } // create column list $select_str = "select distinct p.products_model, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_fsk18, p.products_image, p.products_weight, pd.products_short_description, pd.products_description, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id "; if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ( (isset($_GET['pfrom']) && xtc_not_null($_GET['pfrom'])) || (isset($_GET['pto']) && xtc_not_null($_GET['pto']))) ) { $select_str .= ", SUM(tr.tax_rate) as tax_rate "; } $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; 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 join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id 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'] . "')"; } if (GROUP_CHECK=='true') { $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'"; } $where_str = " where p.products_status = '1' ".$fsk_lock." and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.products_id = p2c.products_id ".$group_check." and p2c.categories_id = c.categories_id "; if (isset($_GET['categories_id']) && xtc_not_null($_GET['categories_id'])) { if ($_GET['inc_subcat'] == '1') { $subcategories_array = array(); xtc_get_subcategories($subcategories_array, $_GET['categories_id']); $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$_GET['categories_id'] . "'"; for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) { $where_str .= " or p2c.categories_id = '" . $subcategories_array[$i] . "'"; } $where_str .= ")"; } else { $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p2c.categories_id = '" . (int)$_GET['categories_id'] . "'"; } } if (isset($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id'])) { $where_str .= " and m.manufacturers_id = '" . $_GET['manufacturers_id'] . "'"; } 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 .= "(pd.products_name like '%" . addslashes($search_keywords[$i]) . "%' or p.products_model like '%" . addslashes($search_keywords[$i]) . "%' or m.manufacturers_name like '%" . addslashes($search_keywords[$i]) . "%'"; if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . addslashes($search_keywords[$i]) . "%'"; $where_str .= ')'; break; } } $where_str .= " )"; } } if (isset($_GET['dfrom']) && xtc_not_null($_GET['dfrom']) && ($_GET['dfrom'] != DOB_FORMAT_STRING)) { $where_str .= " and p.products_date_added >= '" . xtc_date_raw($dfrom_to_check) . "'"; } if (isset($_GET['dto']) && xtc_not_null($_GET['dto']) && ($_GET['dto'] != DOB_FORMAT_STRING)) { $where_str .= " and p.products_date_added <= '" . xtc_date_raw($dto_to_check) . "'"; } $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; } if ($pfrom !='') $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= " . $pfrom . ")"; if ($pto !='') $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= " . $pto . ")"; $order_str = ' group by pd.products_name order by pd.products_name'; $listing_sql = $select_str . $from_str . $where_str . $order_str; 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'); ?> Link to comment Share on other sites More sharing options...
rivendarkness Posted October 10, 2007 Author Report Share Posted October 10, 2007 wo hast du denn das problem? hast du einen beispiellink oder sowas? Link to comment Share on other sites More sharing options...
Chris.Cross Posted October 10, 2007 Report Share Posted October 10, 2007 Ja, hab ich. Einmal bei der Kategorie Übersicht: http://web404.nrb.r01.sanager.net/shop/index.php?cPath=19 Einmal bei der Suche: http://web404.nrb.r01.sanager.net/shop/advanced_search_result.php?keywords=test&x=8&y=11 (KK-Antrag ist noch nicht durch, deshalb die serveradresse) Ich hab allerdings nicht die 3er Version, sondern die etwas ältere (2?) Vielen Dank schonmal für die super schnelle Antwort!!! Ich sitze schon den ganzen Tag an dem Problem Link to comment Share on other sites More sharing options...
rivendarkness Posted October 11, 2007 Author Report Share Posted October 11, 2007 also was auch immer du meinst...bei mir funktionieren beide links! problem selber schon gelöst? Link to comment Share on other sites More sharing options...
Chris.Cross Posted October 11, 2007 Report Share Posted October 11, 2007 Sorry. Hatte vergessen es zu posten. Ja ich habs nach stundenlangem probieren irgendwie selbst hinbekommen(wunder mich selber). Gibt es noch irgenwelche anderen Dateien, die geändert werden müssen, ausser default.php, products_new.php & advanced_search_result.php? Vielen Dank aber für die Bemühungen!! Wenn jemand die Korrekturen für die V2 braucht, ich kann sie gerne posten. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.