Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    17
    Plugin Contributions
    1

    Default Sort admin configuration menu

    I'm using ZC 2.01 with the Fluorspar template, and no other plugins.

    I'd like to change the sort order of the configuration menu in admin.

    I followed these instructions: https://docs.zen-cart.com/dev/code/sorting_menu/

    In the instructions, they mention admin/includes/languages/english.php - mine is called admin/includes/languages/lang.english.php - I'm assuming they're the same thing as I can't find anything else that's similar.

    I changed this:

    'CONFIGURATION_MENU_ENTRIES_TO_SORT_BY_NAME' => '4,2,3,1,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,30,31,32',

    and it's made no difference. I tried logging out, deleting cookies, and clearing the cache.

    Has anyone done this successfully?

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Sort admin configuration menu

    This documentation needs to be updated - thanks for reporting this.

    The constant CONFIGURATION_MENU_ENTRIES_TO_SORT_BY_NAME indicates which submenus under configuration should be alpha sorted.
    The value of this constant in 2.1.0 is '1', which means only submenu 1 (Configuration > My Store) should be alpha sorted. Other menu entries under configuration are sorted using the sort order from the configuration table.

    Does that make sense? If not, please tell me what you're trying to do and I'll help you get there.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jun 2006
    Posts
    17
    Plugin Contributions
    1

    Default Re: Sort admin configuration menu

    Thanks so much for your time.

    At the moment, this is the configuration menu order:


    My Store
    Minimum Values
    Maximum Values
    Images
    Customer Details
    Shipping/Packaging
    Product Listing
    Stock
    Logging
    Email
    Attribute Settings
    GZip Compression
    Sessions
    Regulations
    GV Coupons
    Credit Cards
    Product Info
    Layout Settings
    Website Maintenance
    Index Listing
    Define Page Status
    EZ-Pages Settings

    but I'd like it in this order:

    Attribute Settings
    Credit Cards
    Customer Details
    Define Page Status
    Email
    EZ-Pages Settings
    GV Coupons
    GZip Compression
    Images
    Index Listing
    Layout Settings
    Logging
    Maximum Values
    Minimum Values
    My Store
    Product Info
    Product Listing
    Regulations
    Sessions
    Shipping/Packaging
    Stock
    Website Maintenance

    I tried changing the sort order in the configuration_group table, but it had no effect.
    Last edited by Cath; 3 Dec 2024 at 11:11 PM.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Sort admin configuration menu

    OK. Edit admin/includes/languages/lang.english.php

    change
    'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'reports,tools',
    to
    'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'configuration,reports,tools',
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,878
    Plugin Contributions
    96

    Default Re: Sort admin configuration menu

    Quote Originally Posted by swguy View Post
    OK. Edit admin/includes/languages/lang.english.php

    change
    'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'reports,tools',
    to
    'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'configuration,reports,tools',
    Even better, so that you're not making a core-file change, create the file admin/includes/languages/english/extra_definitions/mysite_overrides.php that contains
    Code:
    $define = [
        'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'configuration,reports,tools',
    ];
    return $define;

  6. #6
    Join Date
    Jun 2006
    Posts
    17
    Plugin Contributions
    1

    Default Re: Sort admin configuration menu

    Hi, Lat9 - thanks for your time.

    I created the following:

    D:\SOFTWARE\xampp\htdocs\zencart6\MYADMIN\includes\languages\english\extra_defin itions\mysite_overrides.php

    which contains:

    Code:
    <?php
    $define = [
        'MENU_CATEGORIES_TO_SORT_BY_NAME' => 'configuration,reports,tools',
    ];
    return $define;
    and it made no difference to the configuration menu.

    Is there somewhere else that I should make changes?

    I followed SWGuy's instructions and that worked, but I understand that it's bad practice to edit the core files.
    Last edited by Cath; 18 Dec 2024 at 12:02 AM.

  7. #7
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    405
    Plugin Contributions
    6

    Default Re: Sort admin configuration menu

    I made the file MYADMIN\includes\languages\english\extra_defin itions\lang.mysite_overrides.php
    and it works.

    On my sites I usually prefix my override file names with z to force them to load last eg
    lang.zbmh_overrides.php
    OldNGrey
    ZC222 PHP 8.4.16
    MySQL 11.8.5-MariaDB

 

 

Similar Threads

  1. v155 Admin -> Configuration Menu Dropdown
    By adb34 in forum General Questions
    Replies: 2
    Last Post: 28 Mar 2016, 04:43 PM
  2. Replies: 1
    Last Post: 8 Nov 2012, 12:39 AM
  3. Change sort order of Admin > Configuration menu?
    By frank18 in forum General Questions
    Replies: 8
    Last Post: 18 Aug 2010, 07:25 AM
  4. Admin Configuration Menu Problem
    By ALFO in forum Basic Configuration
    Replies: 3
    Last Post: 18 Nov 2008, 06:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg