Solving Magento

Solutions for Magento E-Commerce Platform

by Oleg Ishenko

Quickly Create Magento Module Structure with a Powershell Script

Your work on a new module usually begins with a tedious task of creating the basic folder structure. You go to your app folder, cd to code, then to local, then to you working package directory. You add module folder and then etc, Block and Helper. Before you actually get to programming you logic you have to add and edit config.xml, helper.php. And when you are done and ready to fire the first test you remember you forgot to add an xml module file to app/etc/modules.

Sounds familiar? But you are a programmer; so why not try to solve this problem like a programmer?

Its fairly easy to write a shell script for Linux that would do all this dull work for you. But for those who work in Windows (I do) automating this task would mean diving into decades old DOS scripting to create a bat file. Fortunately there is a better alternative: PowerShell. This object oriented scripting framework was first introduced in 2006 and since then had evolved into an incredibly nifty tool for every advanced Windows user.

After some tinkering I was able to produce a script that offers GUI to enter destination app folder, package and module names and creates the basic folder structure and essential files in no time. No installation required: download, unzip, and double-click!

Download it now, its free to use, modify and distribute:

 

Leave a Reply

Your email address will not be published.

Theme: Esquire by Matthew Buchanan.