AudiV8 Posted November 20, 2003 Report Share Posted November 20, 2003 Wie bekomme ich eine Sortierung nach Artikelname hin? Irgendwie hat mir mein Shop die Sortierung durcheinander geschmissen... Link to comment Share on other sites More sharing options...
AudiV8 Posted November 21, 2003 Author Report Share Posted November 21, 2003 Hallo, Keiner ne Idee? Ich brauch die Sortierung nach Artikelname, hat am Anfang ja auch gefunzt, nur irgendwie haut er mir das jetzt alles ziemlich durcheinander... Link to comment Share on other sites More sharing options...
Hubi Posted November 21, 2003 Report Share Posted November 21, 2003 Wo soll das sortiert werden? Bei der Suche, bei der Artikelliste?? Link to comment Share on other sites More sharing options...
AudiV8 Posted November 21, 2003 Author Report Share Posted November 21, 2003 Hallo Hubi, Normal beim surfen durch den Katalog. Die Produkte sollen halt einfach per Artikelname sortiert werden. Ich habe mal irgendwas rumprobiert seit dem sortiert er nach Datum, denke ich... Link to comment Share on other sites More sharing options...
Hubi Posted November 21, 2003 Report Share Posted November 21, 2003 Standardm?ssig werden die Artikel da nach nix sortiert, sondern so ausgegeben, wie sie aus der DB kommen. In /includes/modules/default.php werden die queries f?r die Artikel gebildet, so um Zeile 92-105 ($listing_sql). Da einfach jedesmal ein "ORDER by pd.products_name" am ende anf?gen. Dann sollte das klappen. Link to comment Share on other sites More sharing options...
AudiV8 Posted November 24, 2003 Author Report Share Posted November 24, 2003 <?php ?} elseif ($category_depth == 'products' || $_GET['manufacturers_id']) { ? ?// show the products of a specified manufacturer ? ?if (isset($_GET['manufacturers_id'])) { ? ? ?if (isset($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) { ? ? ? ?// We are asked to show only a specific category ? ? ? ?$listing_sql = "select 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, 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 = '" . $_GET['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "' and p2c.categories_id = '" . $_GET['filter_id'] . "ORDER by pd.products_name". "'"; ? ? ?} else { ? ? ? ?// We show them all ? ? ? ?$listing_sql = "select 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, 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 = '" . $_SESSION['languages_id'] . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $_GET['manufacturers_id'] . "ORDER by pd.products_name". "'"; ? ? ?} ? ?} else { ? ? ?// show the products in a given categorie ? ? ?if (isset($_GET['filter_id']) && xtc_not_null($_GET['filter_id'])) { ? ? ? ?// We are asked to show only specific catgeory ? ? ? ?$listing_sql = "select 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, 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 = '" . $_GET['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "' and p2c.categories_id = '" . $current_category_id . "ORDER by pd.products_name". "'"; ? ? ?} else { ? ? ? ?// We show them all ? ? ? ?$listing_sql = "select 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, 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_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 and pd.language_id = '" . $_SESSION['languages_id'] . "' and p2c.categories_id = '" . $current_category_id . "ORDER by pd.products_name". "'"; ? ? ?} ? ?} ?> W?re das so richtig? Weil ge?ndert hat sich nix.... :chris: Link to comment Share on other sites More sharing options...
Hubi Posted November 24, 2003 Report Share Posted November 24, 2003 N?. $listing_sql = "select 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, 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 = '" . $_SESSION['languages_id'] . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $_GET['manufacturers_id'] . "' ORDER by pd.products_name"; So wie Du es hattest, war das Order... innerhalb des Suchsrings zur manufacturers_id. Link to comment Share on other sites More sharing options...
AudiV8 Posted November 25, 2003 Author Report Share Posted November 25, 2003 Ich schussel ich.... Jetzt geht es dank dir wie verr?ckt.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.