【问题标题】:Magento - Move Customer Edit Form into Account DashboardMagento - 将客户编辑表单移至帐户仪表板
【发布时间】:2014-08-20 15:59:55
【问题描述】:

我的 magento 商店目前有我的客户帐户仪表板的默认布局。 仪表板中的部分之一是使用模板的联系信息

customer/account/info.phtml

如果客户想要编辑他们的联系信息,他们来自:

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

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

有没有办法可以将实际的编辑表单移动到仪表板本身?

【问题讨论】:

    标签: magento dashboard


    【解决方案1】:

    如果您想在 customer.xml 中添加以下代码和

    添加

          <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 -->
            </reference>
    

    【讨论】:

    【解决方案2】:

    请参考下面的sn-p

    <customer_account_index translate="label">
        <label>Customer My Account Dashboard</label>
        <update handle="customer_account"/>
        <!-- Mage_Customer -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
        <reference name="my.account.wrapper">
            <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
                <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
                <block type="core/template" name="customer_account_dashboard_top" as="top" />
                <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
                <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
                <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
            </block>
        </reference>
        <update handle="customer_account_edit" />
    
    </customer_account_index>
    

    &lt;update handle="customer_account_edit" /&gt;会采用customer/account/edit的布局

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-25
      • 2011-09-09
      • 2017-05-24
      • 1970-01-01
      • 1970-01-01
      • 2012-07-09
      相关资源
      最近更新 更多