Question

My magento store currently has the default layout for my customer account dashboard. One of the sections in the dashboard is the contact information which uses the template

customer/account/info.phtml

If a customer wants to edit their contact information they go from:

www.site.com/customer/account/
(calls template customer/account/dashboard.phtml and customer/account/info.phtml)

to

www.site.com/customer/account/edit/
(calls template customer/form/edit.phtml)

Is there a way i can move the actual edit form into the dashboard itself?

Was it helpful?

Solution

create or edit the file local.xml from your respected theme layout folder (app/design/frontend/your package/your theme/layout/) and add the following code in it

<customer_account_index translate="label">
    <reference name="customer_account_dashboard">
        <block type="customer/form_edit" name="customer_edit" as="customeredit" template="customer/form/edit.phtml"/>
    </reference>
</customer_account_index>

now edit the file at app/design/frontend/your package/your theme/template/customer/account/dashboard.phtml and add the following line wherever suites you best

<?php echo $this->getChildHtml('customeredit') ?>

not tested but hope it will work

OTHER TIPS

if you want add below code in customer.xml and

add

      <customer_account translate="label">
........
        <reference name="content">

  <!-- add below .... -->
          <block type="customer/form_edit" name="you_customer_edit" 
    template="customer/form/edit.phtml"/>
<!--- end of -->

Or create local.xml under app/design/frontend/yourpackage/yourtemplate/layout/

<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
 <reference name="content">
             <block type="customer/form_edit" name="you_customer_edit" template="customer/form/edit.phtml" after="my.account.wrapper" />

 </reference>
</<customer_account>
</layout>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top