prettyswan Posted August 28, 2008 Posted August 28, 2008 the products is sorted by Product Name in admin pinewbjoy/products_attributes.php. i want to sort the products by ID. Can someboy help me how to do this?
sLaV- Posted August 31, 2008 Posted August 31, 2008 I think this will change the order in the attributes (PLEASE KEEP A BACKUP JUST IN CASE IT DOESNT WORK SO YOU CAN REVERT BACK TO OLD ONE!) in /catalog/admin/product_attributes.php around line 542 change this <?php $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name"; TO THIS: <?php $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_id"; Havn't tested it as I dont have product attributes set up ... so please make backup before trying it
prettyswan Posted August 31, 2008 Author Posted August 31, 2008 sLaV, thanks. it will save me lots of time. it almost works. but it still has some strange behaviors. can you figure it out?
sLaV- Posted September 1, 2008 Posted September 1, 2008 sLaV, thanks. it will save me lots of time.it almost works. but it still has some strange behaviors. can you figure it out? Try <?php $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_id DESC";
prettyswan Posted September 1, 2008 Author Posted September 1, 2008 hi, sLaV the problem is still there. maybe i should give up. the little bug will not waste me much time. thanks for your great help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.