Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54
  1. #1
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,711
    Plugin Contributions
    19

    Default Modern admin dashboard

    I've created a pull request for this and it will hopefully be part of Zen Cart 2.2.0, but this commit will not work with any version prior to 2.2.0 because of the currencies class which needs to be included manually on versions 2.1.0 and older.

    For anyone using Zen Cart 2.1.0 (and probably any other version down to 1.5.8), you can use this "plugin" to achieve the same look:
    https://zenexpert.com/zen-cart-modern-admin-dashboard

    Will submit to plugins if no bugs are reported.

    Click image for larger version. 

Name:	modernized-admin.jpg 
Views:	325 
Size:	50.4 KB 
ID:	21125
    Last edited by balihr; 11 Jan 2026 at 06:06 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    372
    Plugin Contributions
    6

    Default Re: Modern admin dashboard

    Error displayed on screen bottom RH corner. Image is attached.
    Code:
    1055 'zc220_exp.pd.products_name' isn't in GROUP BY
    in:
    [SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold FROM orders_products op JOIN orders o ON op.orders_id = o.orders_id JOIN products p ON op.products_id = p.products_id JOIN products_description pd ON (p.products_id = pd.products_id AND pd.language_id = 1) WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY) GROUP BY p.products_id ORDER BY total_sold DESC LIMIT 5]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.
    error-log
    Code:
    [12-Jan-2026 07:55:34 Australia/Brisbane] Request URI: /zc220_exp/public/admin/, IP address: 192.168.1.63, Language id 1#0 [internal function]: zen_debug_error_handler()
    #1 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(757): trigger_error()
    #2 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(701): queryFactory->show_error()
    #3 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(314): queryFactory->set_error()
    #4 E:\Web\zc220_exp\public\admin\includes\modules\dashboard_widgets\MostPopularProductsDashboardWidget.php(21): queryFactory->Execute()
    #5 E:\Web\zc220_exp\public\admin\index_dashboard.php(141): include('E:\\Web\\zc220_ex...')
    #6 E:\Web\zc220_exp\public\admin\home.php(27): require('E:\\Web\\zc220_ex...')
    #7 E:\Web\zc220_exp\public\admin\index.php(16): require('E:\\Web\\zc220_ex...')
    --> PHP Fatal error: FATAL MySQL error 1055: 'zc220_exp.pd.products_name' isn't in GROUP BY :: SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold
            FROM orders_products op
            JOIN orders o ON op.orders_id = o.orders_id
            JOIN products p ON op.products_id = p.products_id
            JOIN products_description pd ON (p.products_id = pd.products_id AND pd.language_id = 1)
            WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
            GROUP BY p.products_id
            ORDER BY total_sold DESC
            LIMIT 5 ==> (as called by) E:\Web\zc220_exp\public\admin\includes\modules\dashboard_widgets\MostPopularProductsDashboardWidget.php on line 21 <== in E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php on line 757.


    Environment: Zen Cart 2.2.0; Apache 2.4.63; PHP 8.4.16; MySQL 11.8.5-MariaDB-log; Windows 11
    Attached Images Attached Images  
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,636
    Plugin Contributions
    11

    Default Re: Modern admin dashboard

    Sorry, saw the 2.2.0 finally

    Are you using github or the zip?
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,711
    Plugin Contributions
    19

    Default Re: Modern admin dashboard

    Quote Originally Posted by OldNGrey View Post
    Error displayed on screen bottom RH corner. Image is attached.
    Code:
    1055 'zc220_exp.pd.products_name' isn't in GROUP BY
    in:
    [SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold FROM orders_products op JOIN orders o ON op.orders_id = o.orders_id JOIN products p ON op.products_id = p.products_id JOIN products_description pd ON (p.products_id = pd.products_id AND pd.language_id = 1) WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY) GROUP BY p.products_id ORDER BY total_sold DESC LIMIT 5]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.
    error-log
    Code:
    [12-Jan-2026 07:55:34 Australia/Brisbane] Request URI: /zc220_exp/public/admin/, IP address: 192.168.1.63, Language id 1#0 [internal function]: zen_debug_error_handler()
    #1 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(757): trigger_error()
    #2 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(701): queryFactory->show_error()
    #3 E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php(314): queryFactory->set_error()
    #4 E:\Web\zc220_exp\public\admin\includes\modules\dashboard_widgets\MostPopularProductsDashboardWidget.php(21): queryFactory->Execute()
    #5 E:\Web\zc220_exp\public\admin\index_dashboard.php(141): include('E:\\Web\\zc220_ex...')
    #6 E:\Web\zc220_exp\public\admin\home.php(27): require('E:\\Web\\zc220_ex...')
    #7 E:\Web\zc220_exp\public\admin\index.php(16): require('E:\\Web\\zc220_ex...')
    --> PHP Fatal error: FATAL MySQL error 1055: 'zc220_exp.pd.products_name' isn't in GROUP BY :: SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold
            FROM orders_products op
            JOIN orders o ON op.orders_id = o.orders_id
            JOIN products p ON op.products_id = p.products_id
            JOIN products_description pd ON (p.products_id = pd.products_id AND pd.language_id = 1)
            WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
            GROUP BY p.products_id
            ORDER BY total_sold DESC
            LIMIT 5 ==> (as called by) E:\Web\zc220_exp\public\admin\includes\modules\dashboard_widgets\MostPopularProductsDashboardWidget.php on line 21 <== in E:\Web\zc220_exp\public\includes\classes\db\mysql\query_factory.php on line 757.


    Environment: Zen Cart 2.2.0; Apache 2.4.63; PHP 8.4.16; MySQL 11.8.5-MariaDB-log; Windows 11
    MySQL is in strict mode...
    Can you please try updating admin\includes\modules\dashboard_widgets\MostPopularProductsDashboardWidget.php
    Replace
    Code:
    $sql = "SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold
            FROM " . TABLE_ORDERS_PRODUCTS . " op
            JOIN " . TABLE_ORDERS . " o ON op.orders_id = o.orders_id
            JOIN " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id
            JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] . ")
            WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
            GROUP BY p.products_id
            ORDER BY total_sold DESC
            LIMIT 5";
    with
    Code:
    $sql = "SELECT p.products_id, pd.products_name, p.products_image, p.products_model, SUM(op.products_quantity) as total_sold
            FROM " . TABLE_ORDERS_PRODUCTS . " op
            JOIN " . TABLE_ORDERS . " o ON op.orders_id = o.orders_id
            JOIN " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id
            JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] . ")
            WHERE o.date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
            GROUP BY p.products_id, pd.products_name, p.products_image, p.products_model
            ORDER BY total_sold DESC
            LIMIT 5";
    Notice the text in red - that's the only addition.
    Please report back - this will probably need to be updated in the PR as well.

  5. #5
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    372
    Plugin Contributions
    6

    Default Re: Modern admin dashboard

    The error is due to the DB_MYSQL_MODE setting ONLY_FULL_GROUP_BY which is on by default in MYSQL.
    Without this setting the page displays fully.
    Last edited by OldNGrey; 11 Jan 2026 at 11:28 PM.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

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

    Default Re: Modern admin dashboard

    Yes updating the GROUP BY statement works.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  7. #7
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,711
    Plugin Contributions
    19

    Default Re: Modern admin dashboard

    Thanks for the update.

    If there are any other bugs, or even better - suggestions, I'm happy to hear it! I've also redesigned the header, but I have a feeling it won't be welcomed because we're all used to the styling that's been with us for decades... Although new users might like it? If anyone is interested in taking it for a spin, please PM me.

    Click image for larger version. 

Name:	admin-header-1.jpg 
Views:	16 
Size:	49.3 KB 
ID:	21131

  8. #8
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    372
    Plugin Contributions
    6

    Default Re: Modern admin dashboard

    Post a link to the header and I'll give it a try.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  9. #9
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,711
    Plugin Contributions
    19

    Default Re: Modern admin dashboard

    Quote Originally Posted by OldNGrey View Post
    Post a link to the header and I'll give it a try.
    Yeah, probably easier.

    Same link as above - the zip file now contains two separate folders, one for dashboard and one for header.

  10. #10
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,711
    Plugin Contributions
    19

    Default Re: Modern admin dashboard

    Just updated the zip file - I uploaded with wrong structure and missing language file... Same download link as in post #1

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. Admin Activity Dashboard
    By g2ktcf in forum General Questions
    Replies: 3
    Last Post: 23 May 2022, 03:14 PM
  2. v153 Couldnt access admin dashboard - too many redirects error
    By Arvinrags in forum Installing on a Linux/Unix Server
    Replies: 17
    Last Post: 18 May 2022, 10:46 AM
  3. Admin Dashboard customization
    By Mikeondraco in forum General Questions
    Replies: 2
    Last Post: 1 Jan 2019, 11:26 PM
  4. v154 Icons or images are not showing in admin dashboard
    By Annie_zaz in forum General Questions
    Replies: 2
    Last Post: 21 Jan 2016, 03:57 PM
  5. Survey for Zen Cart v2.0 Admin Dashboard
    By Kim in forum General Questions
    Replies: 35
    Last Post: 4 Jul 2011, 03:07 PM

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