Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I change the order email address in Sales Order Info? 
 
RuggeroSB
Jr. Member
 
Total Posts:  13
Joined:  2011-04-19
 

Hi everyone,

My client has asked us to write something which allows him to change a specific order’s email address. It turns out the customers don’t enter their email address correctly fairly often, and Magento does not support this out the box.

The plan was to extend the existing Sales Order View Info block and add an “edit” link to the Account Information area, much like you see for “Shipping Address” and other areas on the page. I’ve spent an entire day looking at other people’s code including Magentocommerce.com regarding rewriting blocks and just can’t get it to work.

Here’s what I got:

In app/etc/modules/Webulartech_Adminhtml.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
    <
modules>
        <
Webulartech_Adminhtml>
            <
active>true</active>
            <
codePool>local</codePool>
            <
depends>
                <
Mage_Adminhtml/>
            </
depends>
        </
Webulartech_Adminhtml>
    </
modules>
</
config>
In app/code/local/Webulartech/Adminhtml/etc/config.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
    <
modules>
        <
Webulartech_Adminhtml>
            <
version>0.0.1</version>
        </
Webulartech_Adminhtml>
    </
modules>
    <global>
        <
blocks>
            <
adminhtml>
                <
rewrite>
                    <
sales_order_view_info>
                        
Webulartech_Adminhtml_Block_Sales_Order_View_Info
                    
</sales_order_view_info>
                </
rewrite>
            </
adminhtml>
        </
blocks>
    </global>
</
config>
In app/code/local/Webulartech/Adminhtml/Block/Sales/Order/View/Info.php
<?php
class Webulartech_Adminhtml_Block_Sales_Order_View_Info extends Mage_Adminhtml_Block_Sales_Order_View_Info {

    
public function getAddressEditLink($address$label='')
    
{
        
return "YES! IT WORKS!");
    
}
}
Needless to say, it doesn’t work! The block Mage_Adminhtml_Block_Sales_Order_View_Info does not get extended by my class. I’m expecting the “Edit” links in Billing Address and Shipping Address to change to “YES! IT WORKS!” but it doesn’t.

I’m using Magento 1.5.1.0. Can anyone explain where I’ve gone wrong, or if not then perhaps suggest another way?

 
Magento Community Magento Community
Magento Community
Magento Community
 
RuggeroSB
Jr. Member
 
Total Posts:  13
Joined:  2011-04-19
 

Anyone? Come on guys, I know somebody’s gotta know how this works!

 
Magento Community Magento Community
Magento Community
Magento Community
 
RuggeroSB
Jr. Member
 
Total Posts:  13
Joined:  2011-04-19
 

bump. Still hoping somebody out there can help....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

Have you been able to figure this out at all?  I am looking for this same type of feature and cannot find it anywhere.

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