更改Magento发票PDF标题

时间:2017-01-11 11:31:03

标签: php magento magento-1.9

我需要更改Magento默认的pdf标题来自" 发票n 201700009 - 发票日期06/01/2017 "到" 收据n 201700009 - 收货日期06/01/2017 "。

我认为该文件如下:

/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php

我试图更换字符串'发票'在第108行:

$this->_beforeGetPdf();
$this->_initRenderer('invoice');

第133行的以下字符串:

$this->insertDocumentNumber(
    $page,
    Mage::helper('sales')->__('Invoice # ') . $invoice->getIncrementId()
);

但打印发票没有任何变化。

1 个答案:

答案 0 :(得分:0)

找到解决方案。 这很简单,只需覆盖内部:

code/local/Mage/Sales/Model/Order/Pdf/Invoice.php
相关问题