How to display users by ID in increasing order on the 'Users' page

  1. Open the search_users.php file located in the include/common directory of your CS-Cart installation.
  2. Find and replace the following part of code there:
    if (empty($sort_order) || empty($directions[$sort_order])) {
        $sort_order = 'asc';
    } 
    
    if (empty($sort_by) || empty($sortings[$sort_by])) {
        $sort_by = 'name';
    }

    with this one:
    if (empty($sort_order) || empty($directions[$sort_order])) {
        $sort_order = 'desc';
    } 
    
    if (empty($sort_by) || empty($sortings[$sort_by])) {
        $sort_by = 'date';
    }
  3. Save the file.

Noticed an error in the article or it is not clear enough? Any suggestions to improve it? Please let us know by filling in the feedback form. Click here.