Hans Wolf Posted March 17, 2021 Share Posted March 17, 2021 (edited) Prestashop 1.7.7.2 How can you set this up so it is sorted by Reference number? It is a multishop Edited March 18, 2021 by Hans Wolf (see edit history) Link to comment Share on other sites More sharing options...
Hans Wolf Posted March 17, 2021 Author Share Posted March 17, 2021 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? Link to comment Share on other sites More sharing options...
Guest Posted March 17, 2021 Share Posted March 17, 2021 ./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 More sharing options...
Hans Wolf Posted March 18, 2021 Author Share Posted March 18, 2021 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 Link to comment Share on other sites More sharing options...
Hans Wolf Posted March 18, 2021 Author Share Posted March 18, 2021 What I forgot to mention that it is a multishop Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2021 Share Posted March 18, 2021 And isn't it by chance OrderDetail.php already rewritten in ./override / ....? Link to comment Share on other sites More sharing options...
Hans Wolf Posted March 18, 2021 Author Share Posted March 18, 2021 1 hour ago, Guest said: And isn't it by chance OrderDetail.php already rewritten in ./override / ....? No this is not there. It only says Order.php for the order reference number Link to comment Share on other sites More sharing options...
adlmr Posted December 10, 2022 Share Posted December 10, 2022 May be this would help you? 😁 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now