mage-snippet

Get Frontend Blocks/Templates from Adminhtml using setArea

There may come a time when you want to get a frontend template from an admin function – possibly some form of shared observer function – normally you wouldn’t be able to grab the file because Magento will instinctively look inside it’s own area (adminhtml)…

mage-snippet

Add a column to a table using DDL

If you want to update a table using DDL – for example you want to add a column – you can do so simply by using the following snippet in your upgrade scripts.

mage-snippet

Creating a new table using DDL

You have the ability in Magento to create tables in your own sql installer scripts using DDL (database definition language). DDL acts as a syntax to convert common database methods into the appropriate database language used on your server. Rather than writing separate queries for…

mage-snippet

Manually Clear Cache

If ever you cannot get into your Magento administration panel but need to clear the cache – simply perform the following.