Magento Forum

Strange behaviour when overloading a method
 
Gabriel Queiroz
Sr. Member
 
Total Posts:  135
Joined:  2008-05-28
Brasília, Brazil
 

Hi All,

I’ve been trying to crate a “payment method” which will only appear at the back end. Why? Sometimes some parcels get lost during shipping, and I need to create new ones, but i don’t want to charge the customer twice (dã).

So, I’ve created a new payment method which will only appear at the backend, and will do nothing, just authorize the order. For that, I’ll need to overload the method getMethods() on Mage_Payment_Block_Form_Container, and take out my new “payment method” from that, adding it later to the adminhtml block.

I’ve got to overload the adminhtml block beautifully, but i can’t do it with the Mage_Payment_Block_Form_Container::getMethods() method. Here’s a snippet from my config.xml:

...
<global>
...
        <
blocks>
            <
adminhtml>
                <
rewrite>
                    <
sales_order_create_billing_method_form>Mage_Reorder_Block_Sales_Order_Create_Billing_Method_Form</sales_order_create_billing_method_form>
                </
rewrite>
            </
adminhtml>
            <
payment>
                <
rewrite>
                    <
form_container>Mage_Rasdfeorder_Block_Form_Container</form_container>
                </
rewrite>
            </
payment>
        </
blocks>
...
</global>
...

The first rewrite works, but the latter doesn’t. Any ideas why? I’ve tested everything, and I don’t wanna touch the Core classes…

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gabriel Queiroz
Sr. Member
 
Total Posts:  135
Joined:  2008-05-28
Brasília, Brazil
 

Hi!

Does anyone have hints on this?

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top