spud Posted December 9, 2003 Share Posted December 9, 2003 err where's this guy's post?? Link to comment Share on other sites More sharing options...
updmike Posted December 9, 2003 Author Share Posted December 9, 2003 I have no idea what happened there, I did type something.. LOL.. anyway, here it goes again.. I am looking for a simple way to reverse the default product listings sort order on the site. I dont need any fancy contribution to sort products, just reverse the way the come in a clean instal. Hope someone can help.. Thanks.. Mikey Link to comment Share on other sites More sharing options...
DazedAndConfused Posted December 9, 2003 Share Posted December 9, 2003 How are you wanting to sort it? By what field, and is it ascending or descending? Link to comment Share on other sites More sharing options...
updmike Posted December 9, 2003 Author Share Posted December 9, 2003 my products are video tapes and the titles are given by years. curently they are being listed 2001,2002,2003,2004 so I guess that is ascending. I would like them to descend by title or product Title so they appear 2004,2003,2002,2001 Hope ya can help.. thanks.. Mikey Link to comment Share on other sites More sharing options...
fiat707 Posted December 9, 2003 Share Posted December 9, 2003 You could try putting "desc" after products_name. Link to comment Share on other sites More sharing options...
jbeech Posted December 22, 2003 Share Posted December 22, 2003 fiat707 Posted on Dec 9 2003, 12:55 AM "You could try putting "desc" after products_name. " We too have video tapes and DVDs on our site and have the same request for likely the same reason, we want customers to first see the very latest tape we offer, not the one we created 7 years ago. Hence, on which file/page (or line number) does this modification need to take place? We're new to this but quite willing to root around . . . but are not familiar enough with the architecture of OSCommerce to know where to look to modify this. Many thanks in advance. Happy Holidays to one and all! John John Beech - GM (and janitor) Link to comment Share on other sites More sharing options...
Guest Posted December 22, 2003 Share Posted December 22, 2003 In catalog/index.php - here is the line with the sort order you should edit: if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; eg. if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_model desc"; break; Matti Link to comment Share on other sites More sharing options...
jbeech Posted December 23, 2003 Share Posted December 23, 2003 Matti, this is wonderful, thank you! Only one small issue remains; the second page of products are still incorrectly sorted. Any further ideas? John Beech - GM (and janitor) Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2003 Share Posted December 23, 2003 Same code, change the a in the second line to a d, as follows: if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'd'; $listing_sql .= " order by pd.products_name desc"; break; I'm not sure if you needed the change of columns in the third line as well? If you did, you might also want to change the first line to match, then it would look like this: if ($column_list[$i] == 'PRODUCT_LIST_MODEL') { $HTTP_GET_VARS['sort'] = $i+1 . 'd'; $listing_sql .= " order by p.products_model desc"; break; Hth, Matt Link to comment Share on other sites More sharing options...
Poper Posted December 28, 2003 Share Posted December 28, 2003 hello!! i have problem whit my product listing. sklep.kansus.pl/o in oscommrce 2.1 (sklep.kansus.pl) i dont have this problem, but i update to 2.2 i i have this ... :( pleace, help ps. sorry for my english:) Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2003 Share Posted December 28, 2003 Tom, it looks like your settings in admin > Configuration > Product Listing are wrong. That area allows you to configure what columns you have in your product listing. Hth, Matt Link to comment Share on other sites More sharing options...
Poper Posted December 29, 2003 Share Posted December 29, 2003 i now abaut thet, ther is all ok check this shop admin panel admin Thanks.. Tom Link to comment Share on other sites More sharing options...
sc00zy Posted December 29, 2003 Share Posted December 29, 2003 Dude!!! Maybe you should secure your admin pages!!! "Resistence is Futile" Link to comment Share on other sites More sharing options...
Poper Posted December 29, 2003 Share Posted December 29, 2003 enybody can help mi?? Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2003 Share Posted December 30, 2003 Using phpMyAdmin or another database tool, check to see if the configuration values for your product listing match the ones for which it is looking in includes/modules/product_listing.php. I.e. compare the configuration_key from the database to what is appearing in the case 'PRODUCT_LIST_MODEL': and other such lines in the file. If not, change to match. Hth, Matt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.