seog Posted September 15, 2013 Share Posted September 15, 2013 Hi I would like to know as can from the orders of backoffice see invoice in new window instead the download. I know that I need add header('Content-Disposition: inline; but I don´t know in what file Do you know? best regards Link to comment Share on other sites More sharing options...
serv0 Posted October 7, 2013 Share Posted October 7, 2013 I'm looking for how to do this also.. Anyone find out how? Link to comment Share on other sites More sharing options...
tuk66 Posted October 8, 2013 Share Posted October 8, 2013 /controllers/admin/AdminPdfController.php Try to set $display parameter for the render() function in /classes/pdf/PDFGenerator.php in all callings of the generatePDF() function. Link to comment Share on other sites More sharing options...
serv0 Posted October 8, 2013 Share Posted October 8, 2013 I didn't see a generatePDF() function in /classes/pdf/PDFGenerator.php however I did change the line starting at 157 public function render($filename, $display = true) { if (empty($filename)) throw new PrestaShopException('Missing filename.'); $this->lastPage(); if ($display === true) $output = 'D'; elseif ($display === false) $output = 'S'; elseif ($display == 'D') $output = 'D'; elseif ($display == 'S') $output = 'S'; else $output = 'I'; return $this->output($filename, $output); } To the following: public function render($filename, $display = true) { if (empty($filename)) throw new PrestaShopException('Missing filename.'); $this->lastPage(); if ($display === true) $output = 'I'; elseif ($display === false) $output = 'S'; elseif ($display == 'D') $output = 'I'; elseif ($display == 'S') $output = 'S'; else $output = 'I'; return $this->output($filename, $output); } After that change the view invoice button and view delivery slip in backoffice now show in new window and not does not download a file... However I'm not sure what else this may affect or if it will affect the way the system attaches pdf to email that is sent to customer, I will have to test that.. 1 Link to comment Share on other sites More sharing options...
Recommended Posts