题
我正在尝试覆盖zend库(zend_pdf_page),但似乎无法正常工作。我将其放入App/code/local/zend/zend_pdf_page.php中,但是正在使用父类。
我是否需要进行任何配置更改才能使其正常工作?
谢谢!
劳拉
解决方案
所有Zend类都是直接实用的,例如:
app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php:726
$page = new Zend_Pdf_Page($xSize, $ySize);
这就是您不能使用任何config.xml语法来更改类本身的原因 <rewrite />
但是包括路径是按预期设置的:
/app/code/local:/app/code/community:/app/code/core:/lib:.:...
因此,将Zend类放在正确的路径(您的错)中应该解决:
app/code/local/Zend/Pdf/Page.php