Created
October 26, 2015 23:21
-
-
Save jonatanrdsantos/e90f2e02b6cc00eec23d to your computer and use it in GitHub Desktop.
Load custom block outside magento
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once "app/Mage.php"; | |
umask(0); | |
Mage::app()->loadArea('frontend'); | |
$layout = Mage::getSingleton('core/layout'); | |
//load default xml layout handle and generate blocks | |
$layout->getUpdate()->load('default'); | |
$layout->generateXml()->generateBlocks(); | |
//get the loaded head and header blocks and output | |
$headBlock = $layout->getBlock('head'); | |
$headerBlock = $layout->getBlock('header'); | |
$content = $layout->getBlock('content'); | |
echo $headBlock->toHtml() . $headerBlock->toHtml(); | |
echo $content->append( $layout->createBlock('braspag/payment_failure') )->toHtml(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment