简体   繁体   English

Magento重写发票PDF模型

[英]Magento rewriting Invoice PDF Model

I'm overriding pdf invoice model to add some text in footer of the pdf.When I print invoice from the backend,strange characters are getting displayed. 我正在重写pdf发票模型,以便在pdf的页脚中添加一些文本。当我从后端打印发票时,会显示奇怪的字符。 在此处输入图片说明

app/code/local/Company/Invoice/etc/config.xml 应用程序/代码/本地/公司/发票/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Invoice>
            <version>0.1.0</version>
        </Company_Invoice>
    </modules>
    <global>
        <models>
            <sales>
                <rewrite>
                    <order_pdf_invoice>Company_Invoice_Model_Order_Pdf_Invoice</order_pdf_invoice>
                </rewrite>
            </sales>
        </models>
    </global>
</config>

app/code/local/Company/Invoice/Model/Order/Pdf/Invoice.php http://pastebin.com/VQaWr0Xg app / code / local / Company / Invoice / Model / Order / Pdf / Invoice.php http://pastebin.com/VQaWr0Xg

If this module is disabled,default Magento prints invoice correctly.Any ideas? 如果禁用此模块,则默认的Magento会正确打印发票。有什么想法吗?

It looks like you included a var_dump() statement somewhere. 好像您在某处包含了var_dump()语句。 Try searching your codebase for an occurence of var_dump() and remove it. 尝试在您的代码库中搜索是否出现var_dump()并将其删除。

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

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