*/ class Mage_Sales_Block_Order_Print_Creditmemo extends Mage_Sales_Block_Items_Abstract { protected function _prepareLayout() { if ($headBlock = $this->getLayout()->getBlock('head')) { $headBlock->setTitle($this->__('Order # %s', $this->getOrder()->getRealOrderId())); } $this->setChild( 'payment_info', $this->helper('payment')->getInfoBlock($this->getOrder()->getPayment()) ); } public function getBackUrl() { return Mage::getUrl('*/*/history'); } public function getPrintUrl() { return Mage::getUrl('*/*/print'); } public function getPaymentInfoHtml() { return $this->getChildHtml('payment_info'); } public function getOrder() { return Mage::registry('current_order'); } public function getCreditmemo() { return Mage::registry('current_creditmemo'); } protected function _prepareItem(Mage_Core_Block_Abstract $renderer) { $renderer->setPrintStatus(true); return parent::_prepareItem($renderer); } /** * Get Creditmemo totals block html gor specific creditmemo * * @param Mage_Sales_Model_Order_Creditmemo $creditmemo * @return string */ public function getTotalsHtml($creditmemo) { $totals = $this->getChild('creditmemo_totals'); $html = ''; if ($totals) { $totals->setCreditmemo($creditmemo); $html = $totals->toHtml(); } return $html; } }