Jump to content

Sort on Reference number in admin Order


Hans Wolf

Recommended Posts

52 minutes ago, ndiaga said:

Hi,

If  you  are talking  about  ordered  products  then  you  should  do it  in the  code.

Do you also know how to do that. I have now adjusted this(see photo). But how should you sort by Reference?

Screenshot_1.jpg

Link to comment
Share on other sites

./classes/order/OrderDetail.php

find:

public static function getList($id_order)
    {
        return Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'order_detail` WHERE `id_order` = ' . (int) $id_order);
    }

replace to:

public static function getList($id_order)
    {
        return Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'order_detail` WHERE `id_order` = ' . (int) $id_order.' ORDER BY product_reference ASC');
    }

 

Link to comment
Share on other sites

15 hours ago, Guest said:

./classes/order/OrderDetail.php

find:


public static function getList($id_order)
    {
        return Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'order_detail` WHERE `id_order` = ' . (int) $id_order);
    }

replace to:


public static function getList($id_order)
    {
        return Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'order_detail` WHERE `id_order` = ' . (int) $id_order.' ORDER BY product_reference ASC');
    }

 

have now adjusted this (see photo) and deleted the cache on the server but it remains the same. It just doesn't want to sort by Product reference. What is going wrong
What I forgot to mention that it is a multishop

Screenshot_1.jpg

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...