How to pull the list of customers from Magento to an external site?

If you’re thinking of creating a page that will display your customer list from Magento to a different PHP-based application, you can use the script below to do so.

First, let’s create a file called index.php and inside it, create function (I named it getCustomers()) that will extract an array of customer list and their information. The function should be able to access the Mage.php file of your Magento instance.

Continue reading

How to add Magento blocks, CSS and Javascript to an external site

You might have a Magento based website running online and wanted to extend parts of it (also known as blocks, which may include some css and js in the code) to an external site which may either be a blog, another CMS or any other PHP based web application. If you have been following my previous posts, you will know that by adding the Mage.php file of your Magento instance to your application, you can actually pull the needed HTML blocks at any time. The only problem is that most of the examples available online asks you to use the getChildHtml(‘your-block-here’) in which most the time frustrates you because of its complexity and limited resources of how you can actually use it.

There are other ways of doing it. Oddly enough, some are pretty simple and straight forward.
Continue reading