title: Disabling a Magento Product via code
body: <p>More precisely, how to simulate the action made when a user selects "Status: Disabled" in the Product edit page in backend - so that it's not shown, sold, showed in various lists etc.? </p>
  
  <p>From what I've gathered, Magento sets the status of a product to 2 when disabled, that being <code>Mage_Catalog_Model_Product_Status::STATUS_DISABLED</code>.</p>
  
  <p>I've tried the code below in <code>Mage_Catalog_Model_Product</code> to see how/if it works, but it doesn't:</p>
  
  <pre><code>    public function getStatus()
      {
          return 2;
  //        return $this-&gt;_getData('status');
      }
  </code></pre>
  
  <p>But I think that's not enough as I presume Magento uses events to notify listeners that the Product has been disabled.</p>
  
  <p><em>PS: Magento EE 1.11.0.2</em></p>