Skip to content

Instantly share code, notes, and snippets.

@benmarks
Created December 5, 2013 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benmarks/7815548 to your computer and use it in GitHub Desktop.
Save benmarks/7815548 to your computer and use it in GitHub Desktop.
Simple AJAX block responder example
<?php
//ini_set('display_errors',true);
include 'app/Mage.php';
//Mage::setIsDeveloperMode(true);
Mage::app()
->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL,Mage_Core_Model_App_Area::PART_EVENTS)
->loadAreaPart(Mage_Core_Model_App_Area::AREA_FRONTEND,Mage_Core_Model_App_Area::PART_EVENTS);
echo Mage::app()->getLayout()->createBlock('core/text')->setText('Foo')->toHtml();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment