I'm trying to display <?php echo $this->escapeHtml($this->getMethod()->getPayableTo()) ?>
outside of checkmo.phtml - and in ccsave.phtml, but simply pasting the code doesn't render a result.
I've tried several ways to get this to render, to no avail.
Here's what I'm working with:
<?php $payableto = Mage::getStoreConfig('payment/checkmo'); echo $this->__('Payments will be processed by: ') . $payableto; ?>
This returns Payments will be processed by: Array
.
Adding <?php $payableto = Mage::getStoreConfig('payment/checkmo')->getPayableTo();?>
renders html up to the point of the code. Everthing before renders, everything after does not.
How do I access this information outside of checkmo.phtml?
Edit 1: Trying @AmitBera's code throws and error and report with the following contents:
a:5:{i:0;s:46:"Cannot retrieve the payment info model object.";i:1;s:6172:"#0 /var/www/html/dev.site/app/code/core/Mage/Payment/Block/Info.php(55): Mage::throwException('Cannot retrieve...')
/var/www/html/dev.site/app/code/core/Mage/Payment/Block/Info/Checkmo.php(73): Mage_Payment_Block_Info->getInfo()
/var/www/html/dev.site/app/code/core/Mage/Payment/Block/Info/Checkmo.php(48): Mage_Payment_Block_Info_Checkmo->_convertAdditionalData()
/var/www/html/dev.site/app/design/frontend/site/default/template/payment/form/ccsave.phtml(136): Mage_Payment_Block_Info_Checkmo->getPayableTo()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/d...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/site/de...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/var/www/html/dev.site/app/code/core/Mage/Payment/Block/Form/Cc.php(157): Mage_Core_Block_Template->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Payment_Block_Form_Cc->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('payment.method....', true)
/var/www/html/dev.site/app/code/core/Mage/Checkout/Block/Onepage/Payment/Methods.php(72): Mage_Core_Block_Abstract->getChildHtml('payment.method....')
/var/www/html/dev.site/app/design/frontend/site/default/template/checkout/onepage/payment/methods.phtml(59): Mage_Checkout_Block_Onepage_Payment_Methods->getPaymentMethodFormHtml(Object(Mage_Payment_Model_Method_Ccsave))
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/d...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/site/de...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('methods', true)
/var/www/html/dev.site/app/design/frontend/site/default/template/checkout/onepage/payment.phtml(37): Mage_Core_Block_Abstract->getChildHtml('methods')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/d...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/site/de...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('payment', true)
/var/www/html/dev.site/app/design/frontend/site/default/template/checkout/onepage.phtml(39): Mage_Core_Block_Abstract->getChildHtml('payment')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/d...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/site/de...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
/var/www/html/dev.site/app/design/frontend/site/default/template/page/2columns-right.phtml(49): Mage_Core_Block_Abstract->getChildHtml('content')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/d...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/site/de...')
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
/var/www/html/dev.site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
/var/www/html/dev.site/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
/var/www/html/dev.site/app/code/core/Mage/Checkout/controllers/OnepageController.php(215): Mage_Core_Controller_Varien_Action->renderLayout()
/var/www/html/dev.site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->indexAction()
/var/www/html/dev.site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
/var/www/html/dev.site/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
/var/www/html/dev.site/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
/var/www/html/dev.site/app/Mage.php(684): Mage_Core_Model_App->run(Array)
/var/www/html/dev.site/index.php(87): Mage::run('dev_site_com', 'website')
{main}";s:3:"url";s:18:"/checkout/onepage/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:10:"dev_site_en";}
Edit 2: Trying @DavidManners' code renders the same results as my original code; html before the code renders, but after does not.
a:5:{i:0;s:46:"Cannot retrieve the payment info model object.";i:1;s:6172:"#0 /var/www/html/dev.website/app/code/core/Mage/Payment/Block/Info.php(55): Mage::throwException('Cannot retrieve...')