override a zend library
-
16-10-2019 - |
문제
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
해결책
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
제휴하지 않습니다 magento.stackexchange