I'm writing a payment module and upon returning a successful authorisation from the server, I'd like to open a window with a template file in there to manage redirection to the payment service provider's authentication procedure.
How do I get the URL for the block's phtml file?
I want to run it into a JS function to open in a lightbox.
It depends what exactly you want to achieve.
If you are for example in a specific action and you know the block which has the template you can do something like
$this->getLayout()->getBlock('specific_block')->getTemplate()
to return the template file of the current block or
$template = Mage::getSingleton('core/layout')->getBlock('specific_block')->getTemplate();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.