0

I'm using a third-party which set an appendPaymentBlock Observer method

<adminhtml>
    <events>
        <payment_info_block_prepare_specific_information>
            <observers>
                <realex_payment_information>
                    <type>singleton</type>
                    <class>realex/observer</class>
                    <method>appendPaymentBlock</method>
                </realex_payment_information>
            </observers>
        </payment_info_block_prepare_specific_information>
        ...
    </events>
    ...
</adminhtml>

Basically, this method set a template:

public function appendPaymentBlock(Varien_Event_Observer $observer)
{
    ...

    $paymentInfoBlock
        ->setPayment($payment)
        ->setPaymentInfo($paymentData)
        ->setTemplate('realex/payment/info/payment-info.phtml');

    $block->append($paymentInfoBlock);
}

payment-info.phtml script is at app/design/adminhtml/default/default/template/ path.

This is causing me the following critical error:

CRIT (2): Not valid template file:frontend/base/default/template/realex/payment/info/payment-info.phtml

How I can get this template from adminhtml and not from frontend folder?

0

Most likely the $paymentInfoBlock class extends Mage_Core_Block_Template and not Mage_Adminhtml_Block_Template.

Specifically to your extension, replacing

$blockType = 'core/template';

with

$blockType = 'adminhtml/template'; should do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.