Jump to content

Sort by productcode on page Assign to Category


Patronbutiken

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...