简体   繁体   English

更改Magento发票PDF标头

[英]Change Magento Invoice PDF Header

I need to change the Magento default pdf Header from " Invoice n 201700009 - Invoice date 06/01/2017 " to " Receipt n 201700009 - Receipt date 06/01/2017 ". 我需要将Magento默认pdf标头从“ 发票n 201700009-发票日期06/01/2017 ”更改为“ 收据n 201700009- 发票 日期06/01/2017 ”。

I think that the file is the following: 我认为该文件如下:

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

I have tried to replace the string 'invoice' on line 108: 我试图替换第108行上的字符串“发票”:

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

And the following string on line 133: 并在第133行显示以下字符串:

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

But nothing change in the printed invoice. 但是打印的发票没有任何变化。

Found the solution. 找到了解决方案。 It was pretty easy, just override this inside: 这很简单,只需在内部覆盖以下内容即可:

code/local/Mage/Sales/Model/Order/Pdf/Invoice.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM