سؤال

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top