0

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?

3
  • Could you add some clarity around what the term "not working" means? Eg 404 page, internal server error, not saving to database Mar 13, 2015 at 7:17
  • Hi Johan it is giving 404 error
    – Ashvini K
    Mar 13, 2015 at 7:21
  • @JohnCuthbert any hint ?
    – Ashvini K
    Mar 14, 2015 at 5:53

2 Answers 2

0

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.

0

Oh i forget to add action function in controller

public function editAction()
    {
        $this->_forward('form');
    }

 public function editstaffAction()
    {
        $this->_forward('formstaff');
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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