Magento 1.9 – Fix Add/Edit Customer Address Problem

addressaddress-attributecustomer-addressmagento-1.9

I have added 1 more page to add and edit address (custom address) of Magento.
but adding a new address ( my custom address) is working but edit address it not working.

here is my code

<customer_address_form translate="label">
        <label>Customer My Account Address Edit Form</label>
        <!-- Mage_Customer -->
        <update handle="customer_account"/>
        <reference name="my.account.wrapper">
            <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
        </reference>
    </customer_address_form>

<customer_address_formstaff translate="label">
        <label>Customer My Account Address Edit Form</label>
        <!-- Mage_Customer -->
        <update handle="customer_account"/>
        <reference name="my.account.wrapper">
            <block type="customer/address_editstaff" name="customer_address_editstaff" template="customer/address/editstaff.phtml"/>
        </reference>
    </customer_address_formstaff>

I have block and controller for both type add and edit address. but

Add Default new address is working
project_url/index.php/customer/address/new/

Add Default Edit address is working
project_url/index.php/customer/address/edit/5/

Add Custom new address is working
project_url/index.php/customer/address/newstaff/

Add Custom Edit address is not working ( 404 page not found )
project_url/index.php/customer/address/editstaff/57/

Can anyone help me please?

Best Answer

It might be worth adding your code fully to inspect. However, I dont think your Layout Handle is correct for the action you are trying to access.

customer_address_editstaff might be what you need to associate to a controller providing your URL structure.

Related Topic