<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SpinOneSolutions &#187; Module</title>
	<atom:link href="http://www.spinonesolutions.com/tag/module/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spinonesolutions.com</link>
	<description>I waste my time so that you don't have to...</description>
	<lastBuildDate>Mon, 16 May 2011 17:01:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Magento Custom Widget</title>
		<link>http://www.spinonesolutions.com/2010/10/magento-custom-widget/</link>
		<comments>http://www.spinonesolutions.com/2010/10/magento-custom-widget/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 17:00:24 +0000</pubDate>
		<dc:creator>Will Wright</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://www.spinonesolutions.com/?p=602</guid>
		<description><![CDATA[With the latest release of Magento admins now have the ability to create custom “widgets” that can be dropped anywhere on the site to provide additional functionality.  The most common type of widget that I come across is a simple frontend presentation widget.  Basically the developer is asked to display some sort of data in [...]]]></description>
			<content:encoded><![CDATA[<p>With the latest release of Magento admins now have the ability to create custom “widgets” that can be dropped anywhere on the site to provide additional functionality.  The most common type of widget that I come across is a simple frontend presentation widget.  Basically the developer is asked to display some sort of data in a new way.</p>
<p>Widgets can basically be thought of as easily customizable blocks.  The main difference between standard blocks and widgets is that widgets can be added to CMS pages through the WYSIWYG editor and they can easily accept parameters, also defined through the WYSIWYG.  Thus a non-programmer can add quasi-dynamic content to their CMS pages, hurrah!</p>
<p>You should reference previous articles if you want more details about creating custom Modules and Blocks.</p>
<p>As an example I’m going to build a super simple slideshow widget called “Glider”.  It’s going to be a widget that takes four static block_id(s) as parameters and then displays each static block, in succession, as a slideshow.  If you let your imagination work a little you should be able to see some cool possibilities for such a thing, given that you extend it a little.</p>
<p>I’m using static blocks as the source material for each slide because this would allow a content manager to change out the content of a slide by either editing the static block that contains the content or by editing the block id being passed to the widget.  Either way it’s manageable through the interface.</p>
<p>Also note that the template (presentation layer) is going to be statically defined in this example, but you could easily make that a parameter and create multiple templates for the content manager to choose from!</p>
<p>Finally, I’ve used jQuery to build the actual slideshow.  I’m not going to go into very much detail about the presentation of the slideshow as that’s not really the focus of this article.  Feel free to write in if you want to see the details on how to implement jQuery (or any other script).</p>
<p>First let’s setup the Module:</p>
<p><strong>/app/etc/modules/Spinonesolutions_WidgetGlider.xml</strong></p>
<pre class="xml" name="code">&lt;?xml version="1.0"?&gt;
 &lt;config&gt;
 &lt;modules&gt;
 &lt;Spinonesolutions_WidgetGlider&gt;
   &lt;active&gt;true&lt;/active&gt;
   &lt;codePool&gt;local&lt;/codePool&gt;
   &lt;depends&gt;
     &lt;Mage_Cms /&gt;
   &lt;/depends&gt;
 &lt;/Spinonesolutions_WidgetGlider&gt;
 &lt;/modules&gt;
 &lt;/config&gt;</pre>
<p><strong>/app/code/local/Spinonesolutions/WidgetGlider/etc/config.xml</strong></p>
<pre class="xml" name="code">&lt;?xml version="1.0"?&gt;
 &lt;config&gt;
 &lt;modules&gt;
 &lt;Spinonesolutions_WidgetGlider&gt;
   &lt;version&gt;1.0.0&lt;/version&gt;
 &lt;/Spinonesolutions_WidgetGlider&gt;
 &lt;/modules&gt;
 &lt;global&gt;
 &lt;blocks&gt;
   &lt;spinonesolutions_widgetglider&gt;
     &lt;class&gt;Spinonesolutions_WidgetGlider_Block&lt;/class&gt;
   &lt;/spinonesolutions_widgetglider&gt;
 &lt;/blocks&gt;
 &lt;/global&gt;
 &lt;/config&gt;</pre>
<p>OK!  The next thing we need to do is define our widget’s interface.  To do that we create a <strong>widget.xml</strong> file inside our module’s “etc” folder.</p>
<p><strong>/app/code/local/Spinonesolutions/WidgetGlider/etc/widget.xml</strong></p>
<pre class="xml" name="code">&lt;?xml version="1.0"?&gt;
&lt;widgets&gt;
&lt;glider type="spinonesolutions_widgetglider/glider"&gt;
   &lt;name&gt;SpinoneSolutions: Glider&lt;/name&gt;
   &lt;description&gt;Displays the given HTML Sections in a Glider Slideshow&lt;/description&gt;
   &lt;parameters&gt;
     &lt;section1&gt;
       &lt;required&gt;0&lt;/required&gt;
       &lt;visible&gt;1&lt;/visible&gt;
       &lt;label&gt;Section1&lt;/label&gt;
       &lt;type&gt;text&lt;/type&gt;
     &lt;/section1&gt;
     &lt;section2&gt;
       &lt;required&gt;0&lt;/required&gt;
       &lt;visible&gt;1&lt;/visible&gt;
       &lt;label&gt;Section2&lt;/label&gt;
       &lt;type&gt;text&lt;/type&gt;
     &lt;/section2&gt;
     &lt;section3&gt;
       &lt;required&gt;0&lt;/required&gt;
       &lt;visible&gt;1&lt;/visible&gt;
       &lt;label&gt;Section3&lt;/label&gt;
       &lt;type&gt;text&lt;/type&gt;
     &lt;/section3&gt;
     &lt;section4&gt;
       &lt;required&gt;0&lt;/required&gt;
       &lt;visible&gt;1&lt;/visible&gt;
       &lt;label&gt;Section4&lt;/label&gt;
       &lt;type&gt;text&lt;/type&gt;
     &lt;/section4&gt;
     &lt;template&gt;
       &lt;visible&gt;0&lt;/visible&gt;
       &lt;value&gt;widgetglider/banner.phtml&lt;/value&gt;
     &lt;/template&gt;
   &lt;/parameters&gt;
&lt;/glider&gt;
&lt;/widgets&gt;</pre>
<p>You can define any number of widgets in here.  We’re only creating one so I’ve only got a single entry, <strong>glider</strong>.</p>
<p>The <strong>type</strong> attribute tells Magento what class to use when instantiating objects.  I’ve set it as <strong>spinonesolutions_widgetglider/glider</strong>.  If you go back and inspect the config.xml and remember your Magento naming conventions you can surmise that this is going to cause Magento to try and instantiate an object of type <strong>Spinonesolutions_WidgetGlider_Block_Glider</strong>.  That class doesn’t exist yet so we should create it.</p>
<p><strong>/app/code/local/Spinonesolutions/WidgetGlider/Block/Glider.php</strong></p>
<pre class="php" name="code">&lt;?php
class Spinonesolutions_WidgetGlider_Block_Glider extends Mage_Core_Block_Template
implements Mage_Widget_Block_Interface {
  const MAXSECTIONS = 4;
  public $sectionArr = array();

  protected function _construct() {
    parent::_construct();
  }

  protected function _toHtml() {
    for ($i=1;$i &lt;= self::MAXSECTIONS;$i++) {
      if ($this-&gt;getData("section$i")) {
        $blockHTML = $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($this-&gt;getData("section$i"))-&gt;toHtml();
        $this-&gt;sectionArr[$i] = $blockHTML;
      }
    }
    return parent::_toHtml();
  }
}</pre>
<p>Let’s inspect the class from top to bottom.  The first thing to notice is that in the declaration it implements <strong>Mage_Widget_Block_Interface</strong>.  This is a requirement for Widgets.</p>
<p>Notice my constant <strong>MAXSECTIONS</strong> is set to 4, the same number of section parameters that I defined in widget.xml.  There’s probably some room for improvement here: one could probably figure out the number of parameters dynamically and then remove the constant.  That would make the widget more flexible for future uses.</p>
<p>I call the <strong>_construct</strong> function so that everything gets setup the way it’s supposed to.</p>
<p>Finally the real work gets done in <strong>_toHtml</strong>.  This function will be called automagically by Magento when it goes to render this object to the screen.</p>
<p>What I do is load up each block that gets passed into the widget and I stuff it’s HTML into an array element.  This way the widget can render any block, independently, by referencing a key in the array.</p>
<p>It’s not the classes job to do the rendering, that’s left to the presentation layer.  This class is just gathering everything that the presentation layer needs.</p>
<p>To move on with the tutorial we need to look back at our widget declaration in <strong>widget.xml</strong>.  I’m sure you noticed the last parameter <strong>template</strong> that I haven’t discussed yet.  Notice that the attribute <strong>visible</strong> is set to false.  What this parameter does is define the template that our widget is going to use for presentation.  My value is <strong>widgetglider/banner.phtml</strong> this template doesn’t exist by default so let’s create it.</p>
<p><strong>/app/design/frontend/default/spinonesolutions/template/widgetglider/banner.phtml</strong></p>
<pre class="php" name="code">&lt;style&gt;
.slideshow {
  position:relative;
}

.slideshow .items div {
  float:left;
  opacity:0.0;
  position:absolute;
  z-index:8;
}

.slideshow .items div.active {
  opacity:1.0;
  z-index:10;
}
&lt;/style&gt;

&lt;script&gt;
function slideSwitch() {
  var active = jQuery('.slideshow .items .active');
  // use this to pull the images in the order they appear in the markup
  var next =  jQuery(active).next().length ? jQuery(active).next() : jQuery('.slideshow .items div:first');
  jQuery(next).css({opacity: 0.0})
  .addClass('active')
  .animate({opacity: 1.0}, 1000, function() {
    jQuery(active).removeClass('active');
  });

  jQuery(active).animate({opacity:0.0}, 1000, function(){
  });
}

// execute your scripts when the DOM is ready. this is mostly a good habit
jQuery('document').ready(function() {
  var active = jQuery('.slideshow .items .active');
  if ( active.length == 0 ) {
    active = jQuery('.slideshow .items div:first');
    active.addClass('active').animate({opacity: 1.0}, 1000);
  }

  jQuery(function() {
    setInterval( "slideSwitch()", 5000 );
  });
});
&lt;/script&gt;
&lt;div class="slideshow"&gt;
  &lt;div class="items"&gt;
    &lt;?php foreach($this-&gt;sectionArr as $key =&gt; $section) { ?&gt;
    &lt;div class=""&gt;
      &lt;?php echo $section; ?&gt;
    &lt;/div&gt;
    &lt;?php } ?&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<p>The first part of that path is determined by the theme that you’ve set in Configuration.</p>
<p>Inspecting this file the real takeaway is simply the foreach loop.  All it does it loop over the array that was defined in the Business Layer and output the HTML stored in each element.  The template file does all the presentation.</p>
<p>The reason for doing things this way is that one can easily envision some department manager coming to you and asking for another, different, presentation of the same data for some other location of your website.  Since you’ve done a good job of separating your layers all you have to do is make a new .phtml file, and then change the <strong>template</strong> parameter of your <strong>widget.xml</strong> file and viola, you’ve got a new presentation of your data.</p>
<p>That does it for the code, all we need to do now is build a little demo using the interface.</p>
<p>Load up the admin and navigate to CMS -&gt; Static Blocks.  Create four static blocks and put an image file into each one.  If you hover your mouse over the row you’ll see the block_id.  Make note of these as you’ll need them for when you create the widget.  Mine are: 6,8,9,10.</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/static-blocks.png"><img class="aligncenter size-medium wp-image-624" title="static-blocks" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/static-blocks-700x69.png" alt="static-blocks" width="700" height="69" /></a></p>
<p>Go to CMS -&gt; Pages and create a new CMS page to hold the widget.  Alternatively you could add the widget to a preexisting page.  Switch to the Content Tab.  Click the add Widget icon to add your widget.</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/add-widget-button.png"><img class="aligncenter size-full wp-image-625" title="add-widget-button" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/add-widget-button.png" alt="add-widget-button" width="97" height="104" /></a></p>
<p>Choose your new widget from the dropdown menu.</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/insert-widget-choose.png"><img class="aligncenter size-medium wp-image-626" title="insert-widget-choose" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/insert-widget-choose-700x356.png" alt="insert-widget-choose" width="700" height="356" /></a></p>
<p>Fill in the block_id(s) of your static blocks.</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/insert-widget-filledin.png"><img class="aligncenter size-medium wp-image-627" title="insert-widget-filledin" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/insert-widget-filledin-700x360.png" alt="insert-widget-filledin" width="700" height="360" /></a></p>
<p>Hit Insert.</p>
<p>As a learning exercise click the “Show/HideEditor” button.</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/widget-markup.png"><img class="aligncenter size-medium wp-image-628" title="widget-markup" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/widget-markup-700x114.png" alt="widget-markup" width="700" height="114" /></a></p>
<p>Notice what was generated!  It should be pretty similar to what’s in your <strong>widget.xml</strong> file.  As the smart and curious type the you are also realize that you can change these parameters right here.  Thus the widget.xml file serves a template for your widget, which can be customized later to suit your specific needs.</p>
<p>Ok, save your CMS page.  That’s it!</p>
<p><a href="http://www.spinonesolutions.com/wp-content/uploads/2010/10/glider-demo.png"><img class="aligncenter size-medium wp-image-629" title="glider-demo" src="http://www.spinonesolutions.com/wp-content/uploads/2010/10/glider-demo-700x535.png" alt="glider-demo" width="700" height="535" /></a></p>
<p>You can see my <a title="Glider Demo" href="http://magento.spinonesolutions.com/glider-demo" target="_blank">demo here</a>.</p>
<p>As always, questions and comments welcomed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spinonesolutions.com/2010/10/magento-custom-widget/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Part I : Custom Module</title>
		<link>http://www.spinonesolutions.com/2009/09/magento-custom-module-part-i/</link>
		<comments>http://www.spinonesolutions.com/2009/09/magento-custom-module-part-i/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 04:00:01 +0000</pubDate>
		<dc:creator>Will Wright</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Module]]></category>

		<guid isPermaLink="false">http://www.spinonesolutions.com/?p=336</guid>
		<description><![CDATA[This article was written while using Magento v1.3.2.3. Greetings!  This is installment number one of the the exiting Magento Custom Module series.  There&#8217;s basically two paths to the end of the fairytale: Path 1: You follow this series and get down and dirty with Magento, learning a lot along the way. Path 2: You go [...]]]></description>
			<content:encoded><![CDATA[<p>This article was written while using Magento v1.3.2.3.</p>
<p>Greetings!  This is installment number one of the the exiting <em>Magento Custom Module</em> series.  There&#8217;s basically two paths to the end of the fairytale:</p>
<p>Path 1: You follow this series and get down and dirty with Magento, learning a lot along the way.</p>
<p>Path 2: You go out and download the Module Creator (<a href="http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table">http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table</a>) and head straight to GO!</p>
<p>Your choice!</p>
<p>Note: Magento is an MVC application so I&#8217;m going to assume you have a basic understanding of <a title="MVC" href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">MVC</a>.  Also, Magento is built (I believe) on the <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend framework</a>, so there&#8217;s some Zend specific syntax that I&#8217;m also not going to dive into.  Huzzzah!</p>
<h2>The Problem:</h2>
<p>You need to create a custom Module in Magento!  Why&#8230;?  Hell, I don&#8217;t know; you just do.  That&#8217;s enough of that, let&#8217;s get down to it.</p>
<h2>The Solution:</h2>
<p>All of your customizations need to go into the [root]\app\code\local folder.  This is where Magento expects to find them and it&#8217;s also a factor in maintaining your upgrade path.  When the next version of Magento is released you&#8217;ll be able to backup your &#8220;local&#8221; folder and blow away everything else.</p>
<p>Before we get too far into this let’s setup our development environment, go to:<br />
Admin -&gt; System -&gt; Cache Management: Cache Control – All Cache = Disable</p>
<p>This will save you many hours of self-torture while you’re developing.</p>
<p>A couple of other developer settings that I’ve found helpful:<br />
Admin -&gt; System -&gt; Configuration -&gt; Developer: Debug &#8211; Profiler = yes<br />
Log Settings &#8211; Enabled = yes</p>
<p>Now open up [root]\index.php and at the very end you&#8217;ll see three lines that are commented out; un-comment them and save.</p>
<p>Finally, turn SEO friendly URLs on:<br />
Admin -&gt; System -&gt; Configuration -&gt; Web: Search Engine Optimization &#8211; Use Web Server Rewrites = Yes</p>
<p>All of the URLs that I’ll be presenting as examples below assume that SEO friendly URLs are enabled.</p>
<p>Magento is now correctly configured for development so let’s dive into building a custom module.</p>
<p>Sample file structure:<br />
[root]\app\code\local\{Namespace}\{Modulename}<br />
[root]\app\code\local\{Namespace}\{Modulename}\controllers<br />
[root]\app\code\local\{Namespace}\{Modulename}\etc<br />
[root]\app\code\local\{Namespace}\{Modulename}\etc\config.xml<br />
[root]\app\code\local\{Namespace}\{Modulename}\Helper<br />
[root]\app\code\local\{Namespace}\{Modulename}\Helper\Data.php<br />
[root]\app\code\local\{Namespace}\{Modulename}\Model<br />
[root]\app\code\local\{Namespace}\{Modulename}\{Modulename}.php</p>
<p><strong>{Namespace}</strong> is a user defined variable.  Basically it&#8217;s just a mechanism that allows the user to create disparate classes that would otherwise have the same names.<br />
<strong>{Modulename}</strong> this is the name of your module.</p>
<p>For my examples I&#8217;m going to use &#8220;Spinonesolutions&#8221; as my namespace and &#8220;Helloworld&#8221; as my Module.  I&#8217;m not entirely sure if it matters or not, but as a general rule I always capitalize the first letter and leave the rest lower case.  Don&#8217;t use underscores in your names either, we&#8217;ll see why later.</p>
<p><strong>controllers</strong> is where all the controllers go, crazy right?  I’ll get into the controller structure in another part of this series.  For now a sample will suffice.</p>
<pre class="php" name="code">&lt;?php
//IndexController is the default controller
//EG: http://localhost/spinonesolutions/
//Notice there's no parameters being passed as a parameter (Nothing after trailing "/")
//IndexController will be called since it's the default.
//"spinonesolutions" is the frontname as defined in confg.xml
class Spinonesolutions_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
  //indexAction is the default Action for any controller
  function indexAction() {
    echo "indexAction";
    $helloworld = Mage::getModel("spinonesolutions_helloworld/helloworld");
    $helloworld-&gt;helloworld("helloworld");
  }
}</pre>
<p><strong>Data.php</strong> is just a helper file for the Magento internals, I&#8217;m not exactly sure what it does but it appears to be exactly the same in every module except for its class definition.</p>
<pre class="php" name="code">&lt;?php
class Spinonesolutions_Helloworld_Helper_Data extends Mage_Core_Helper_Abstract {

}</pre>
<p><strong>Model</strong> holds all of the models for your module.  It&#8217;s customary to name your main model after your {Modulename}.  You’ll most likely have at least one model and if you browse through the Magento core you&#8217;ll notice that most modules contain many models.</p>
<pre class="php" name="code">&lt;?php
class Spinonesolutions_Helloworld_Model_Helloworld extends Varien_Object {
  function __construct() {
    parent::__construct();
  }

  function helloworld($arg) {
    echo "&lt;br&gt;Hello World! My argument is : " . $arg;
  }
}</pre>
<p><strong>config.xml</strong> is where you connect all your code up to Magento.  There&#8217;s a lot of voodoo going on in here and I&#8217;m not entirely sure how it all works.  I might even write a full post on the <strong>config.xml</strong> as a forthcoming part of this series.</p>
<pre class="xml" name="code">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;config&gt;
 &lt;modules&gt;
   &lt;Spinonesolutions_Helloworld&gt;
   &lt;version&gt;0.1.0&lt;/version&gt;
   &lt;/Spinonesolutions_Helloworld&gt;
 &lt;/modules&gt;
 &lt;frontend&gt;
   &lt;routers&gt;
     &lt;spinonesolutions&gt;    &lt;!-- I make this match my front name but I'm not sure it matters --&gt;
       &lt;use&gt;standard&lt;/use&gt;    &lt;!-- Use standard routing as opposed to admin.  IE: frontend vs admin --&gt;
       &lt;args&gt;
         &lt;module&gt;Spinonesolutions_Helloworld&lt;/module&gt;    &lt;!-- The module to search for controllers --&gt;
         &lt;frontName&gt;spinonesolutions&lt;/frontName&gt;    &lt;!-- The first descriminator in the path.  "spinonesolutions" in http://localhost/spinonesolutions/ --&gt;
       &lt;/args&gt;
     &lt;/spinonesolutions&gt;
   &lt;/routers&gt;
 &lt;/frontend&gt;
 &lt;global&gt;
   &lt;models&gt;
     &lt;spinonesolutions_helloworld&gt;    &lt;!-- This is used when istanting your Model EG: Mage::getModel("spinonesolutions_helloworld/hellworld") --&gt;
       &lt;class&gt;Spinonesolutions_Helloworld_Model&lt;/class&gt;    &lt;!-- That class to use when isntanting objects of type above. --&gt;
     &lt;/spinonesolutions_helloworld&gt;
   &lt;/models&gt;
 &lt;/global&gt;
&lt;/config&gt;</pre>
<p>That takes care of all the code needed in the module directory. There’s one more configuration file we need to create and it’s an exception to the local folder rule:<br />
[root]\app\etc\modules\{Namespace}_{Modulename}.xml</p>
<pre class="xml" name="code">&lt;?xml version="1.0"?&gt;
&lt;config&gt;
 &lt;modules&gt;
   &lt;Spinonesolutions_Helloworld&gt;
     &lt;active&gt;true&lt;/active&gt;
     &lt;codePool&gt;local&lt;/codePool&gt;
   &lt;/Spinonesolutions_Helloworld&gt;
 &lt;/modules&gt;
&lt;/config&gt;</pre>
<p>This file tells Magento that there&#8217;s a new module out there that it needs to load.  Alternatively, you can name your file [root]\app\etc\modules\{Namespace}_All.xml to tell Magento to load up all the modules in that namespace.</p>
<p>Once you have this file in place you can navigate to Admin-&gt;System -&gt; Configuration -&gt; Advanced and you should see your module enabled here.</p>
<p>You now have a functioning custom module, hurray!</p>
<p>Download the source &#8211; <a href="http://www.spinonesolutions.com/wp-content/uploads/2009/09/Helloworld.rar">Helloworld</a></p>
<ol>
<li><a title="Part I : Custom Module" href="http://www.spinonesolutions.com/2009/09/magento-custom-module-part-i/">Part I : Custom Module</a></li>
<li><a title="Part II : Models" href="http://www.spinonesolutions.com/2009/10/magento-part-ii-models/">Part II : Models</a></li>
<li><a title="Part III : Controllers" href="http://www.spinonesolutions.com/2009/10/magento-part-iii-controllers/">Part III : Controllers</a></li>
<li><a title="Part IV : Extending Models" href="http://www.spinonesolutions.com/2009/10/magento-part-iv-extending-models/">Part IV : Extending Models</a></li>
<li><a title="Part V: Data Layer" href="http://www.spinonesolutions.com/2009/10/magento-part-v-data-layer/">Part V : Data Layer</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.spinonesolutions.com/2009/09/magento-custom-module-part-i/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

