Satch Posted June 17, 2010 Share Posted June 17, 2010 Is it possible to sort the reference number in the delivery slip ?I want to sort them from high to low, for example40-00140-00241-01045-101and so on.I know that i can edit the pdf.php but i don't know what to look for and how to change it. Link to comment Share on other sites More sharing options...
DutchCoding Posted June 20, 2010 Share Posted June 20, 2010 The PDF.php or pdf.php have nothing to do with it.You have to edit the Order.php fileAround line 292 public function getProductsDetail() { return Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = '.intval($this->id)); } You have to add Order by product refrence and ASC of DESCASC: 40-00140-00241-01045-101DESC45-10141-01040-00240-001 public function getProductsDetail() { return Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = '.intval($this->id).' ORDER BY od.`product_reference` ASC'); } If this helps, remember to edit the title with solved. Link to comment Share on other sites More sharing options...
'Woger Posted November 19, 2015 Share Posted November 19, 2015 Well let's reopen this topic again ;-) How can this be done in 1.6.1.1? The mentioned line now looks like: if ($order_detail->product_quantity == 0) { if (!$order_detail->delete()) return false; if (count($this->getProductsDetail()) == 0) { $history = new OrderHistory(); $history->id_order = (int)$this->id; $history->changeIdOrderState(Configuration::get('PS_OS_CANCELED'), $this); if (!$history->addWithemail()) return false; } return $this->update(); } else Link to comment Share on other sites More sharing options...
'Woger Posted November 22, 2015 Share Posted November 22, 2015 So it seems this isn't possible using a simple procedure. Too bad, I think this should be a standard setting. 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