title: How can we override abstract class in Magento?
body: <p>I want to Override an abstract class of magento. ie <code>Mage_Customer_Model_Address_Abstract</code>. My intention is to get rid of Telephone number validation. </p>
  
  <p>I tried copying app/code/<strong>core</strong>/Mage/Customer/Model/Address/Abstract.php</p>
  
  <p>To</p>
  
  <p>app/code/<strong>local</strong>/Telephone/Customer/Model/Address/Abstract.php</p>
  
  <p>Tried to Override the function validate() with new code.</p>
  
  <pre><code>public function validate()
      {
          $errors = array();
          $this-&gt;implodeStreetAddress();
          if (!Zend_Validate::is($this-&gt;getFirstname(), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the first name.');
          }
  
          if (!Zend_Validate::is($this-&gt;getLastname(), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the last name.');
          }
  
          if (!Zend_Validate::is($this-&gt;getStreet(1), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the street.');
          }
  
          if (!Zend_Validate::is($this-&gt;getCity(), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the city.');
          }
  
         /* if (!Zend_Validate::is($this-&gt;getTelephone(), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the phone number.');
          } */
  
          $_havingOptionalZip = Mage::helper('directory')-&gt;getCountriesWithOptionalZip();
          if (!in_array($this-&gt;getCountryId(), $_havingOptionalZip)
              &amp;&amp; !Zend_Validate::is($this-&gt;getPostcode(), 'NotEmpty')
          ) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the zip/postal code.');
          }
  
          if (!Zend_Validate::is($this-&gt;getCountryId(), 'NotEmpty')) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the country.');
          }
  
          if ($this-&gt;getCountryModel()-&gt;getRegionCollection()-&gt;getSize()
                 &amp;&amp; !Zend_Validate::is($this-&gt;getRegionId(), 'NotEmpty')
                 &amp;&amp; Mage::helper('directory')-&gt;isRegionRequired($this-&gt;getCountryId())
          ) {
              $errors[] = Mage::helper('customer')-&gt;__('Please enter the state/province.');
          }
  
          if (empty($errors) || $this-&gt;getShouldIgnoreValidation()) {
              return true;
          }
          return $errors;
      }
  </code></pre>
  
  <p>But, I cant make it work!</p>
  
  <p>Only way i can do it is by exactly copying the file to local folder. ie</p>
  
  <p>app/code/<strong>core/Mage</strong>/Customer/Model/Address/Abstract.php</p>
  
  <p>To</p>
  
  <p>app/code/<strong>local/Mage</strong>/Customer/Model/Address/Abstract.php</p>
  
  <p>and my config.xml in app/code/local/Customer/etc/ is..</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;modules&gt;
          &lt;Telephone_Customer&gt;
              &lt;version&gt;0.0.1&lt;/version&gt;
          &lt;/Telephone_Customer&gt;
      &lt;/modules&gt;
  
      &lt;global&gt;
      &lt;models&gt;
      &lt;telephone_customer&gt;
          &lt;class&gt;Telephone_Customer_Model&lt;/class&gt;
      &lt;/telephone_customer&gt;
      &lt;customer&gt;
          &lt;rewrite&gt;
              &lt;customer&gt;Telephone_Customer_Model_Customer&lt;/customer&gt;
          &lt;/rewrite&gt;
      &lt;customer&gt;
      &lt;/models&gt;
      &lt;/global&gt;   
  &lt;/config&gt;
  </code></pre>
  
  <p>But it is not allowed here bcz its not the right way to do it.</p>
  
  <p>Can we override this abstract class like what we do in elsewhere..?</p>
  
  <p>Please help.</p>