title: magento sales_order_place_after observer
body: <p>I'm trying to write an observer that will export order data when an order is placed.  I haven't written any modules before.  Basing my implementation on this article: <a href="http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/customizing_magento_using_event-observer_method" rel="noreferrer">http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/customizing_magento_using_event-observer_method</a></p>
  
  <p>so far I'm just trying to trigger some dummy code to write to a file.  I'm not getting anything showing in my log, and the file's not being modified.  The apache user has permission for the directory.  I've disabled configuration caching in the Magento settings.  I'm a little confused on some of the naming conventions; I just tried to follow the example.  Anyone know where I'm going wrong?  </p>
  
  <p>in magento/app/etc/modules/Feed.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;modules&gt;
          &lt;Feed_Sales&gt;
              &lt;codePool&gt;local&lt;/codePool&gt;
              &lt;active&gt;true&lt;/active&gt;
          &lt;/Feed_Sales&gt;
      &lt;/modules&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>in magento/app/code/local/Feed/Sales/etc/config.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;global&gt;
          &lt;models&gt;
              &lt;feedsales&gt;
                  &lt;class&gt;Feed_Sales_Model&lt;/class&gt;
              &lt;/feedsales&gt;
          &lt;/models&gt;
          &lt;events&gt;
              &lt;sales_order_place_after&gt;
                  &lt;observers&gt;
                      &lt;feed_sales_order_observer&gt;
                          &lt;type&gt;singleton&lt;/type&gt;
                          &lt;class&gt;sales/order_observer&lt;/class&gt;&lt;!-- I've also tried Feed_Sales_Model_Order_Observer here --&gt;
                          &lt;method&gt;export_new_order&lt;/method&gt;
                      &lt;/feed_sales_order_observer&gt;
                  &lt;/observers&gt;
              &lt;/sales_order_place_after&gt;
          &lt;/events&gt;
      &lt;/global&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>in magento/app/code/local/Feed/Sales/Model/Order/Observer.php:</p>
  
  <pre><code>&lt;?php
  class Feed_Sales_Model_Order_Observer
  {
      public function __contruct()
      {
  
      }
  
      /**
       * Exports new orders to an xml file
       * @param Varien_Event_Observer $observer
       * @return Feed_Sales_Model_Order_Observer
       */
      public function export_new_order($observer)
      {
          Mage::log("reached export_new_order");
          try
          {
              $dumpFile = fopen('/home/jorelli/new_orders/testdump', 'w+');
              fwrite($dumpFile, 'this is a test!');
          }
          catch (Exception $e)
          {
              Mage::log("order export failed.\n");
          }
          return $this;
      }
  }
  ?&gt;  
  </code></pre>
  
  <p>Magento 1.4 on Debian Lenny with Apache2 if it should matter for any reason.</p>