9

i'm trying to override a zend library (Zend_Pdf_Page) and it doesn't seem to be working. i'm putting it in app/code/local/Zend/Zend_Pdf_Page.php, but the parent class is being used instead.

are there any configuration changes i need to make to get it to work?

thanks!

laura

21

all Zend classes are instantiatet directly, for example here:

app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php:726
$page = new Zend_Pdf_Page($xSize, $ySize);

This is the reason you can't use any config.xml syntax to change the class itself with an <rewrite />

But the include path is set as expected:

/app/code/local:/app/code/community:/app/code/core:/lib:.:...

Therefore putting a Zend class in the correct path (yours is wrong) should do the trick:

app/code/local/Zend/Pdf/Page.php
  • I stand corrected... :) Good to know! – Sander Mangel Mar 4 '13 at 18:24
  • If it is working and my answer helped, you are welcome to mark it as solution :) – Fabian Blechschmidt Mar 4 '13 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.