title: Magento override controller
body: <p>I would like to do the above.
  Ive overridden many files in the past...block, model, helper....but this one eludes me.</p>
  
  <p>Can anyone see what im doing wrong here:
  (ive edited this code...to include some of the recomendations now...)</p>
  
  <p>Heres my folder structure (2 controller locations as a test):</p>
  
  <pre><code>/Idigital/Idgeneral/etc/config.xml
  /Idigital/Idgeneral/controllers/Checkout/CartController.php
  /Idigital/Idgeneral/controllers/CartController.php
  </code></pre>
  
  <p>Heres my config.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
  &lt;modules&gt;
      &lt;idigital_idgeneral&gt;
      &lt;version&gt;0.1.0&lt;/version&gt;
      &lt;/idigital_idgeneral&gt;
  &lt;/modules&gt;
  &lt;global&gt;
  &lt;blocks&gt;
          &lt;idgeneral&gt;&lt;class&gt;Idigital_Idgeneral_Block&lt;/class&gt;&lt;/idgeneral&gt;
      &lt;/blocks&gt;
  &lt;/global&gt;   
  
  &lt;frontend&gt;
      &lt;routers&gt;
                  &lt;checkout&gt;
                      &lt;use&gt;standard&lt;/use&gt;
                      &lt;args&gt;
                          &lt;modules&gt;
                              &lt;Idigital_Idgeneral before="Mage_Checkout"&gt;Idigital_Idgeneral_Checkout&lt;/Idigital_Idgeneral&gt;
                          &lt;/modules&gt;
                      &lt;/args&gt;
                  &lt;/checkout&gt;
             &lt;/routers&gt;
         &lt;layout&gt;   
          &lt;updates&gt;   
              &lt;idgeneral&gt;   
                  &lt;file&gt;idigital.xml&lt;/file&gt;   
              &lt;/idgeneral&gt;   
          &lt;/updates&gt;   
      &lt;/layout&gt;
  &lt;/frontend&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>Ihave placed my controller file in 2 locations to test.
  And heres the top of my FIRST controller file:</p>
  
  <pre><code>require_once 'Mage/Checkout/controllers/CartController.php';
  class Idigital_Idgeneral_Checkout_CartController extends Mage_Checkout_CartController
  {
  
  
  public function testAction()
  {  
      var_dump('inside checkout/cart/test');exit; 
  }
  
  /**
   * Add product to shopping cart action
   */
  public function addAction()
  {
      blah...
  }
  </code></pre>
  
  <p>Ans my second controller:</p>
  
  <pre><code>require_once 'Mage/Checkout/controllers/CartController.php';
  class Idigital_Idgeneral_CartController extends Mage_Checkout_CartController
  {
  
  
  public function testAction()
  {  
      var_dump('inside cart/test');exit; 
  }
  
  /**
   * Add product to shopping cart action
   */
  public function addAction()
  {
      blah...
  }
  </code></pre>
  
  <p>When i visit:  /checkout/cart/add
  Im directed to the mage controller...not my local. (i have var_dump stmts in each..so i can see which is ran).</p>
  
  <p>When i visit /checkout/cart/test    -  i get a 404
  When i visit /cart/add  or cart/test   -  i get a 404 
  when i visit idgeneral/cart/test   or   idgeneral/cart/add    -  i get a 404  </p>