Post by andyh » Sun Aug 28, 2016 8:34 pm

Hi, is there a way of getting the invoice printed so it's sorted by Model low to high to make it easier picking products? Thanks

Newbie

Posts

Joined
Tue Aug 11, 2015 8:02 am

Post by AlexDW » Mon Aug 29, 2016 1:50 am

In file admin\model\sale\order.php

find sting (into getOrderProducts method)

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'");
and replace to

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "' ORDER BY model ASC");
after, also recommended to refresh modifications cache

Useful Opencart extensions


User avatar
New member

Posts

Joined
Sun Jun 05, 2016 3:32 am

Post by anand2064 » Thu Sep 15, 2016 5:20 am

thanks That works for model. But any idea if we can sort the Invoice by Brand i.e manufacturer_id or manufacturer i did try with the same code but does not work. Can you please help.! Thanks

Newbie

Posts

Joined
Sun Feb 14, 2016 11:16 pm
Who is online

Users browsing this forum: No registered users and 62 guests