0

I can't find the error in the code.

My module is shown in the Backend but the Block is not rewritten properly.

This is my Code: config.xml

<?xml version="1.0"?>
<config>
<modules>
   <Zdrw_Checkout>
      <version>1.0.0</version>
  </Zdrw_Checkout>
</modules>
<global>
      <blocks>
         <Zdrw_Checkout>
             <class>Zdrw_Checkout_Block</class>
         </Zdrw_Checkout>
     </blocks>
     <blocks>
       <checkout>
         <rewrite> 
<onepage_billing>Zdrw_Checkout_Block_Onepage_Billing</onepage_billing>
          </rewrite>
        </block>
      </checkout>
  </blocks>
 </global>

class Zdrw_Checkout_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Abstract
0

Seems you want to rewrite a abstract class, but this will not work. Please read here: Replacement of an abstract class in custom module

Btw ... your config is bit wrong ...

<?xml version="1.0"?>
<config>
    <modules>
        <Zdrw_Checkout>
            <version>1.0.0</version>
        </Zdrw_Checkout>
    </modules>
    <global>
        <blocks>
            <Zdrw_Checkout>
                <class>Zdrw_Checkout_Block</class>
            </Zdrw_Checkout>
            <checkout>
                <rewrite> 
                    <onepage_billing>Zdrw_Checkout_Block_Onepage_Billing</onepage_billing>
                </rewrite>
            </checkout>
        </blocks>
 </global>
| improve this answer | |
  • Thanks for your fast reply, i am trying to rewrite the Billing.php class which extends Abstract.php. – Alexander Aug 7 '17 at 23:01
  • @Alexander .... maybe change extends Mage_Checkout_Block_Onepage_Abstract to extends Mage_Checkout_Block_Onepage_Billing – sv3n Aug 7 '17 at 23:38
  • that was what i was trying to do from the beginning, so thats not the error i am looking for. But thanks for your help! :) – Alexander Aug 8 '17 at 13:34
  • @Alexander just mentioned it because you have written extends Mage_Checkout_Block_Onepage_Abstract. :) – sv3n Aug 8 '17 at 13:40
  • Sorry, my mistake. Was at the point of everything and forgot to change it back. Any idea what it could be besides that? The Module is shown as active in the Backend. Cache is curently off. Compiler also off. – Alexander Aug 8 '17 at 13:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.