Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Magento PDF格式的送货单_Php_Magento_Pdf - Fatal编程技术网

Php Magento PDF格式的送货单

Php Magento PDF格式的送货单,php,magento,pdf,Php,Magento,Pdf,我正在尝试向Magento的发票PDF文档添加自定义注释。我正在使用Deliverynote插件 我试图将这段代码添加到invoice.php代码中,但没有得到任何结果 $noteId = Mage::registry('current_invoice')->getOrder()->getData('delivery_note_id'); $this->_note = Mage::getModel('deliverynote/note')->load($noteId)

我正在尝试向Magento的发票PDF文档添加自定义注释。我正在使用Deliverynote插件

我试图将这段代码添加到invoice.php代码中,但没有得到任何结果

$noteId = Mage::registry('current_invoice')->getOrder()->getData('delivery_note_id'); 

$this->_note = Mage::getModel('deliverynote/note')->load($noteId)->getNote();
这是Github的位置

我也试过这样做

$newnote=new Dh_Deliverynote_Block_Adminhtml_Sales_Order_Note()


我该如何将其插入PDF?

因此,真正起作用的是这个。它可能是从invoice.php中的原始$order变量开始工作的,但我将它保留原样,因为它正在工作

   $order3 = Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId());

   $shipNoteId = $order3->getData('delivery_note_id');

   $note = Mage::getModel('deliverynote/note')->load($shipNoteId)->getData('note');
然后在将其添加到发票pdf中时,我创建了一个insertNote函数

    $this->insertNote(
    $page,
    Mage::helper('sales')->__('USPS INSTRUCTIONS: ') . $note
    );  
我还制作了一个视频,展示了如何在Magento中实现这一点

    $this->insertNote(
    $page,
    Mage::helper('sales')->__('USPS INSTRUCTIONS: ') . $note
    );