Include Magento blocks and CMS blocks in any PHP application.
Joomla and Magento
- Include
magento-integration.php
in your application. - Initialize the integration and pass the path to Magento bootstrap file.
Example:
<?php
include 'magento-integration.php';
MI::init('/path/to/magento/app/Mage.php');
This only needs to be done once.
These methods can be used anywhere in the PHP application.
Blocks in Magento's layout can be retrieved by passing the layout name (header, footer, left, etc).
echo MI::getBlock('header');
CMS blocks added via Magento admin can also be retrieved.
echo MI::getStaticBlock('home-slider');
Inspired by Magento WordPress Integration