public function testGetInvoiceCommentsHtml() { $childBlock = $this->_layout->addBlock('Mage_Core_Block_Text', 'invoice_comments', 'block'); $expectedHtml = '<b>Any html</b>'; $this->assertEmpty($childBlock->getEntity()); $this->assertEmpty($childBlock->getTitle()); $this->assertNotEquals($expectedHtml, $this->_block->getInvoiceCommentsHtml($this->_invoice)); $childBlock->setText($expectedHtml); $actualHtml = $this->_block->getInvoiceCommentsHtml($this->_invoice); $this->assertSame($this->_invoice, $childBlock->getEntity()); $this->assertNotEmpty($childBlock->getTitle()); $this->assertEquals($expectedHtml, $actualHtml); }
public function getPrintAllInvoicesUrl($order) { if (!Mage::getStoreConfig('pdfpro/config/enabled') || !Mage::getStoreConfig('pdfpro/config/allow_customer_print') || !Mage::helper('pdfpro')->getDefaultApiKey()) { return parent::getPrintAllInvoicesUrl($order); } if (Mage::getSingleton('customer/session')->isLoggedIn()) { return Mage::getUrl('pdfpro/print/invoices', array('order_id' => $order->getId())); } return Mage::getUrl('pdfpro/guest/printInvoices', array('order_id' => $order->getId())); }
protected function _construct() { parent::_construct(); $this->setTemplate('order/invoice.phtml'); }
public function _toHtml() { $this->setTemplate('aw_points/sales/order/invoice/items.phtml'); return parent::_toHtml(); }