문제

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?

도움이 되었습니까?

해결책 2

Oh i forget to add action function in controller

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

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top