valentin.g Posted May 30, 2013 Share Posted May 30, 2013 (edited) I try to override PDF class using override\classes\pdf\PDF.php but no effect In Prestashop 1.5.3 is works but from 1.5.4 or 1.5.4.1 not Can anyone help ? Edited May 30, 2013 by valentin.g (see edit history) Link to comment Share on other sites More sharing options...
IllicoPresta Posted May 30, 2013 Share Posted May 30, 2013 (edited) Hi, We have exactly the same problem, overriding pdf controller works perfectly on 1.5.2, 1.5.3.1, etc.. but not on 1.5.3.0. We can't find any issue for the moment... if someone has a solution,he's welcome P.S: and no change log about it between 1.5.3 and 1.5.3.1 so i really don't have any hint Edited May 30, 2013 by IllicoPresta (see edit history) Link to comment Share on other sites More sharing options...
valentin.g Posted May 30, 2013 Author Share Posted May 30, 2013 (edited) Advanced Parameters >Performance Cache = off Edited May 30, 2013 by valentin.g (see edit history) Link to comment Share on other sites More sharing options...
Housy Posted October 30, 2015 Share Posted October 30, 2015 Hello guys Why am i not able to override PDFGenerator.php file? Under "Override/classes/pdf/" i have created the same file, which is PDFGenerator.php. Within that file i have put code below, because i want to define different header and footer height. The problem is, that override doesn't work at all, even if i disable cache and delete class_index.php file within cache directory. What am i doing wrong? Is there maybe a bug or something? <?php class PDFGeneratorCoreOverride extends PDFGeneratorCore { /* Header and Footer HEIGHT change */ public function writePage() { $this->SetHeaderMargin(10); $this->SetFooterMargin(30); $this->setMargins(10, 40, 10); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } } I am using Prestashop version 1.6.0.14. If i change code directly, it affects PDF, when it is exported. It works as it should but no results, when overriding PDFGenerator.php file. Overriding works good for modules as well.Could you guys take a look and help me here please?Thank you and best regards,Housy Link to comment Share on other sites More sharing options...
valentin.g Posted October 30, 2015 Author Share Posted October 30, 2015 delete file cache/class_index.php and test again override Link to comment Share on other sites More sharing options...
Housy Posted October 30, 2015 Share Posted October 30, 2015 As i mentioned in my previous post, i already did that but nothing happens, don't know why ... delete file cache/class_index.php and test again override Link to comment Share on other sites More sharing options...
Housy Posted October 30, 2015 Share Posted October 30, 2015 Class name wasn't named properly! Solution is here Link to comment Share on other sites More sharing options...
Recommended Posts