LeftTurnsAllDay Posted March 1, 2004 Share Posted March 1, 2004 I am working with a client right now who would like products in categories to show up in a specific order. I have experimented with the Sort Order option and various ways of inputting products but no matter what I try, OSC orders the products the way it wants to. This is making me very mad. Is there a way around all this so products will STAY in the order in which I input them? Link to comment Share on other sites More sharing options...
241 Posted March 1, 2004 Share Posted March 1, 2004 I need to narrow down the issue is it the order within the categories info box or product info page is it when you click on a link in the categories infobox and the page loads up there are sections of the code which state order by (then the type product id category id options names , then desc descending and asc ascending etc.) No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
LeftTurnsAllDay Posted March 1, 2004 Author Share Posted March 1, 2004 I need to narrow down the issue is it the order within the categories info box or product info page is it when you click on a link in the categories infobox and the page loads up there are sections of the code which state order by (then the type product id category id options names , then desc descending and asc ascending etc.) After you click a link in the categories infobox, the products that are displayed there are in the wrong order. I entered them into the catalog the way I wanted them but now they're even wrong in the catalog admin. Link to comment Share on other sites More sharing options...
241 Posted March 1, 2004 Share Posted March 1, 2004 most of the osc is setup to alphabetic descending No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
LeftTurnsAllDay Posted March 1, 2004 Author Share Posted March 1, 2004 most of the osc is setup to alphabetic descending There's no way to break that and order them manually? Damn... Link to comment Share on other sites More sharing options...
241 Posted March 1, 2004 Share Posted March 1, 2004 I was just buying myself some time with a snipet of info backup your catalog/index.php then in the catalog/index.php locate this code $categories_query = tep_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.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); ? ? ? ? ?break; // we've found the deepest category the customer is in ? ? ? ?} ? ? ?} ? ?} else { ? ? ?$categories_query = tep_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.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); and change it to this $categories_query = tep_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.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_id"); ? ? ? ? ?break; // we've found the deepest category the customer is in ? ? ? ?} ? ? ?} ? ?} else { ? ? ?$categories_query = tep_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.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_id"); I am not sure if this will give the result you want however there are other combinations the bit to look at is the bit of code that says order by sort_order, cd.categories_name which I changed to end _id you can change this part to alter the order A similar thing can be done to the admin No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
fmerrill Posted March 1, 2004 Share Posted March 1, 2004 you might always be able to use a sorting contribution like this one: http://www.oscommerce.com/community/contributions,911 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.