Patronbutiken Posted October 11, 2019 Share Posted October 11, 2019 Is there anyway to have the products sorted by productcode instead of name in the adminpage "Assign to Category"? Link to comment Share on other sites More sharing options...
bsmither Posted October 11, 2019 Share Posted October 11, 2019 Please try this edit: In the file /admin/sources/products.assign.inc.php, near line 131, find: ## Product list if (($products = $GLOBALS['db']->select('CubeCart_inventory', array('product_id', 'name', 'product_code'), false, array('name' => 'ASC'))) !== false) { Change to: ## Product list if (($products = $GLOBALS['db']->select('CubeCart_inventory', array('product_id', 'name', 'product_code'), false, array($GLOBALS['config']->get('config', 'product_sort_column') => $GLOBALS['config']->get('config', 'product_sort_direction')))) !== false) { This change will have the query use the default product sort setting (in admin, Store Settings, Layout tab, Product List Sorting). Link to comment Share on other sites More sharing options...
Patronbutiken Posted October 11, 2019 Author Share Posted October 11, 2019 Thanks But that didnt help, at least not in adminmode Regards Peter Link to comment Share on other sites More sharing options...
bsmither Posted October 11, 2019 Share Posted October 11, 2019 Since the edit means that the listing will be according to this setting, one will need to visit that setting and change what column with which you want the products to be sorted. So, if you want to sort by Product ID, make the settings change, save, then see if the Assign to Category shows the products sorted by that column. Link to comment Share on other sites More sharing options...
Patronbutiken Posted October 11, 2019 Author Share Posted October 11, 2019 Thanks, now i got it to order by product code..... Again thanks for the help bsmither Link to comment Share on other sites More sharing options...
bsmither Posted October 11, 2019 Share Posted October 11, 2019 Be advised that this setting applies also to the storefront. So, once you finish with Assign to Category, if necessary, reset the default sort back to what you want the customer to see. Link to comment Share on other sites More sharing options...
Patronbutiken Posted October 11, 2019 Author Share Posted October 11, 2019 Ok. thanks i try to remember Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.