最新消息:觉得本站不错的话 记得收藏哦 博客内某些功能仅供测试 讨论群:135931704 快养不起小站了 各位有闲钱就打赏下把 My Email weicots#gmail.com Please replace # with @

Magento 修改toplink 的方法

Magento 资料整理 ajiang-tuzi 6024浏览

在magento 默认模板里面的顶部链接toplinks 在前台显示为
* My Account
* My Wishlist
* My Cart
* Checkout
* Log In
那么如何把它们修改成自己想要的链接呢?下面提供一个比较简单的方法:首先你必须找到文件header.phtml
它在默认模板里的路径为

app/design/frontend/default/default/template/page/html/header.phtml

修改时注意替换default为你的模板路径
找到打开编辑,在大概31行处你会看到一行代码

< ?php echo $this->getChildHtml(‘topLinks’) ?>

把它直接替换成你要修改的链接,用php语言写成

 <liclass="first"><a href="<?php echo$this->getUrl('/customer/account/') ?>"title="MY ACCOUNT">MY ACCOUNT</a></li>
<li><a href="<?php echo$this->getUrl('/yourlinksurl') ?>"title="YOUR LINKS">YOUR LINKS</a></li>
<liclass="last"><a href="<?php echo$this->getUrl('/customer/account/login/') ?>"title="LOG IN">LOG IN</a></li>

上面是示例代码,可根据自己需求修改。修改完保存刷新缓存即可。
如果只是想去掉我的购物车和结帐这两项,直接到对应的xml文件里修改即可,例如要修改checkout和Customer这两项,只需要到

app/design/frontend/default/default/layout/checkout.xml

app/design/frontend/default/default/layout/customer.xml

修改就可以了
参考:
customer.xml

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

Supported layout update handles (action):
- customer_account_index
- customer_address_index
- customer_address_view
- customer_account_login
- customer_account_logoutsuccess
- customer_account_create
- customer_account_forgotpassword
- customer_account_confirmation
- customer_account_edit

Supported layout update handles (special):
- default

-->
<layout version="0.1.0">

<!--
Default layout, loads most of the pages
-->

    <default>
        <!-- Mage_Customer -->
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
        </reference>
    </default>

<!--
Load this update on every page when customer is logged in
-->

    <customer_logged_in>
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
        </reference>
    </customer_logged_in>

<!--
Load this update on every page when customer is logged out
-->

    <customer_logged_out>
        <!---<reference name="right">
            <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
        </reference>-->
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
        </reference>
        <remove name="reorder"></remove>
    </customer_logged_out>

<!--
Layout for customer login page
-->

    <customer_account_login translate="label">
        <label>Customer Account Login Form</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
        </reference>
    </customer_account_login>

<!--
Layout for customer log out page
-->

    <customer_account_logoutsuccess translate="label">
        <label>Customer Account Logout Success</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="core/template" name="customer_logout" template="customer/logout.phtml"/>
        </reference>
    </customer_account_logoutsuccess>

<!--
New customer registration
-->

    <customer_account_create translate="label">
        <label>Customer Account Registration Form</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
                <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
                    <label>Form Fields Before</label>
                </block>
            </block>
        </reference>
    </customer_account_create>

    <customer_account_forgotpassword translate="label">
        <label>Customer Forgot Password Form</label>
        <remove name="right"/>
        <remove name="left"/>

        <reference name="head">
            <action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
        </reference>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
            <action method="setHeaderTitle" translate="title" module="customer"><title>Password forgotten</title></action>
        </reference>
        <reference name="content">
            <!--<block type="core/template" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>-->
            <block type="customer/account_forgotpassword" name="forgotPassword" template="customer/form/forgotpassword.phtml" />
        </reference>
    </customer_account_forgotpassword>

    <customer_account_resetpassword translate="label">
        <label>Reset a Password</label>
        <remove name="right"/>
        <remove name="left"/>

        <reference name="head">
            <action method="setTitle" translate="title" module="customer">
                <title>Reset a Password</title>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
            <action method="setHeaderTitle" translate="title" module="customer">
                <title>Reset a Password</title>
            </action>
        </reference>
        <reference name="content">
            <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
        </reference>
    </customer_account_resetpassword>

    <customer_account_confirmation>
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
            <action method="setHeaderTitle" translate="title" module="customer"><title>Send confirmation link</title></action>
        </reference>
        <reference name="content">
            <block type="core/template" name="accountConfirmation" template="customer/form/confirmation.phtml"/>
        </reference>
    </customer_account_confirmation>

    <customer_account_edit translate="label">
        <label>Customer Account Edit Form</label>
        <update handle="customer_account"/>
        <reference name="root">
            <action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
        </reference>
        <reference name="my.account.wrapper">
            <block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
        </reference>

        <reference name="left">
          <action method="unsetChild"><name>left.permanent.callout</name></action>
        </reference>
    </customer_account_edit>

<!--
Customer account pages, rendered for all tabs in dashboard
-->

    <customer_account translate="label">
        <label>Customer My Account (All Pages)</label>
        <!--remove name="catalog.compare.sidebar"/>
        <remove name="sale.reorder.sidebar"/-->
        <!-- Mage_Customer -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>

        <reference name="content">
            <block type="page/html_wrapper" name="my.account.wrapper" translate="label">
                <label>My Account Wrapper</label>
                <action method="setElementClass"><value>my-account</value></action>
            </block>
        </reference>

        <reference name="left">
            <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
                <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
                <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
                <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
            </block>
            <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
            </block>
            <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <remove name="tags_popular"/>

        </reference>
    </customer_account>

<!--
Customer account home dashboard layout
-->

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

    </customer_account_index>

<!--
Customer account address book
-->

    <customer_address_index translate="label">
        <label>Customer My Account Address Book</label>
        <!-- Mage_Customer -->
        <update handle="customer_account"/>
        <reference name="my.account.wrapper">
            <block type="customer/address_book" name="address_book" template="customer/address/book.phtml"/>
        </reference>
    </customer_address_index>

<!--
Customer account address edit page
-->

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

</layout>

checkout.xml

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

-->
<layout version="0.1.0">

<!--
Default layout, loads most of the pages
-->

    <default>

        <!-- Mage_Checkout -->
        <reference name="top.links">
            <block type="checkout/links" name="checkout_cart_link">
                <action method="addCartLink"></action>
                <action method="addCheckoutLink"></action>
            </block>
        </reference>
        <reference name="right">
            <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
                    <label>Shopping Cart Sidebar Extra Actions</label>
                </block>
            </block>
        </reference>
    </default>

    <checkout_cart_index translate="label">
        <label>Shopping Cart</label>
        <remove name="right"/>
        <remove name="left"/>
        <!-- Mage_Checkout -->
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/cart" name="checkout.cart">
                <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
                <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
                <action method="chooseTemplate"/>
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>

                <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
                    <label>Payment Methods Before Checkout Button</label>
                    <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
                </block>

                <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
                    <label>Shopping Cart Form Before</label>
                </block>

                <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
                    <label>Payment Methods After Checkout Button</label>
                    <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
                    <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
                </block>

                <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
                <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
                <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>

                <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
            </block>
        </reference>
        <block type="core/text_list" name="additional.product.info" translate="label">
            <label>Additional Product Info</label>
        </block>
    </checkout_cart_index>

    <checkout_cart_configure translate="label">
        <label>Configure Cart Item</label>
        <update handle="catalog_product_view"/>
        <reference name="product.info">
            <block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
        </reference>
    </checkout_cart_configure>

<!--
Multi address shipping checkout main layout,
will be rendered on all checkout pages
-->

    <checkout_multishipping translate="label">
        <label>Multishipping Checkout</label>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
        </reference>
    </checkout_multishipping>

    <checkout_multishipping_login>
        <update handle="customer_account_login"/>
    </checkout_multishipping_login>

    <checkout_multishipping_register>
        <update handle="customer_account_create"/>
    </checkout_multishipping_register>

<!--
Multi address shipping checkout selection of address per item page
-->

    <checkout_multishipping_address_select translate="label">
        <label>Multishipping Checkout Shipping Address Selection</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
        </reference>
    </checkout_multishipping_address_select>

    <checkout_multishipping_address_selectbilling translate="label">
        <label>Multishipping Checkout Billing Address Selection</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
        </reference>
    </checkout_multishipping_address_selectbilling>


    <checkout_multishipping_address_newshipping translate="label">
        <label>Multishipping Checkout Shipping Address Creation</label>
        <update handle="checkout_multishipping"/>
        <update handle="checkout_multishipping_customer_address"/>
    </checkout_multishipping_address_newshipping>

    <checkout_multishipping_address_newbilling translate="label">
        <label>Multishipping Checkout Billing Address Creation</label>
        <update handle="checkout_multishipping"/>
        <update handle="checkout_multishipping_customer_address"/>
    </checkout_multishipping_address_newbilling>

    <checkout_multishipping_address_editshipping translate="label">
        <label>Multishipping Checkout Shipping Address Edit Form</label>
        <update handle="checkout_multishipping"/>
        <update handle="checkout_multishipping_customer_address"/>
    </checkout_multishipping_address_editshipping>

    <checkout_multishipping_address_editaddress>
        <update handle="checkout_multishipping"/>
        <update handle="checkout_multishipping_customer_address"/>
    </checkout_multishipping_address_editaddress>

    <checkout_multishipping_address_editbilling translate="label">
        <label>Multishipping Checkout Billing Address Edit Form</label>
        <update handle="checkout_multishipping"/>
        <update handle="checkout_multishipping_customer_address"/>
    </checkout_multishipping_address_editbilling>

    <checkout_multishipping_customer_address translate="label">
        <label>Multishipping Checkout Customer Address Edit Form</label>
        <reference name="content">
            <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
        </reference>
    </checkout_multishipping_customer_address>

<!--
Multi address shipping checkout address page
-->

    <checkout_multishipping_addresses translate="label">
        <label>Multishipping Checkout Address (Any) Form</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
                <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
            </block>
        </reference>
    </checkout_multishipping_addresses>

<!--
Multi address shipping checkout shipping information
-->

    <checkout_multishipping_shipping translate="label">
        <label>Multishipping Checkout Shipping Information Step</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
                <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>

                <block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
                    <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
                    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
                    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
                </block>
            </block>
        </reference>
    </checkout_multishipping_shipping>

<!--
Multi address shipping checkout billing information
-->

    <checkout_multishipping_billing translate="label">
        <label>Multishipping Checkout Billing Information Step</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
                <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>

                <!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
                    <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
                    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
                    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
                </block>-->

            </block>
        </reference>
    </checkout_multishipping_billing>

<!--
Multi address shipping checkout overview
-->

    <checkout_multishipping_overview translate="label">
        <label>Multishipping Checkout Overview</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
                <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
                <action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
                <action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
                <block type="checkout/multishipping_payment_info" name="payment_info">
                    <action method="setInfoTemplate"><method></method><template></template></action>
                </block>
                <block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
                <block type="checkout/cart_totals" name="totals" />
                <block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
                    <label>Overview Items After</label>
                </block>
            </block>
        </reference>
    </checkout_multishipping_overview>

<!--
Multi address shipping checkout success
-->

    <checkout_multishipping_success translate="label">
        <label>Multishipping Checkout Success</label>
        <update handle="checkout_multishipping"/>
        <!-- Mage_Checkout -->
        <reference name="content">
            <block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
        </reference>
    </checkout_multishipping_success>

<!--
One page checkout main layout
-->

    <checkout_onepage_index translate="label">
        <label>One Page Checkout</label>
        <!-- Mage_Checkout -->
        <remove name="left"/>

        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="right">
            <action method="unsetChildren"></action>
            <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
                <label>Checkout Progress Wrapper</label>
                <action method="setElementId"><value>checkout-progress-wrapper</value></action>
                <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml">
                    <block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block>
                    <block type="checkout/onepage_progress" name="shipping.progress" template="checkout/onepage/progress/shipping.phtml"></block>
                    <block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block>
                    <block type="checkout/onepage_progress" name="payment.progress" template="checkout/onepage/progress/payment.phtml"></block>
                </block>
            </block>
        </reference>
        <reference name="content">
            <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
                <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
                    <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
                        <label>Login/Registration Before</label>
                        <action method="setMayBeInvisible"><value>1</value></action>
                    </block>
                </block>
                <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
                <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
                <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
                    <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
                    <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
                </block>
                <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
                    <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/info.phtml">
                        <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
                    </block>
                </block>
                <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
            </block>
        </reference>
    </checkout_onepage_index>

    <!--
    One page checkout progress block
    -->

    <checkout_onepage_progress>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
            <action method="setInfoTemplate"><method></method><template></template></action>
            <block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block>
            <block type="checkout/onepage_progress" name="shipping.progress" template="checkout/onepage/progress/shipping.phtml"></block>
            <block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block>
            <block type="checkout/onepage_progress" name="payment.progress" template="checkout/onepage/progress/payment.phtml"></block>
        </block>
    </checkout_onepage_progress>

    <!-- Individual blocks for Progress steps begins -->
    <checkout_onepage_progress_billing>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/billing.phtml">
            <action method="setInfoTemplate"><method></method><template></template></action>
        </block>
    </checkout_onepage_progress_billing>


    <checkout_onepage_progress_shipping>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/shipping.phtml">
            <action method="setInfoTemplate"><method></method><template></template></action>
        </block>
    </checkout_onepage_progress_shipping>


    <checkout_onepage_progress_shipping_method>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/shipping_method.phtml">
            <action method="setInfoTemplate"><method></method><template></template></action>
        </block>
    </checkout_onepage_progress_shipping_method>

    <checkout_onepage_progress_payment>
    <!-- Mage_Checkout -->
    <remove name="right"/>
    <remove name="left"/>

    <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/payment.phtml">
        <block type="checkout/onepage_payment_info" name="payment_info">
            <action method="setInfoTemplate"><method></method><template></template></action>
        </block>
        <action method="setInfoTemplate"><method></method><template></template></action>
    </block>
    </checkout_onepage_progress_payment>

<!-- end individual progress blocks -->

    <!--
    One page checkout payment methods block
    -->
    <checkout_onepage_paymentmethod>
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
            <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
        </block>
    </checkout_onepage_paymentmethod>


<!--
One page checkout shipping methods block
-->

    <checkout_onepage_shippingmethod>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
    </checkout_onepage_shippingmethod>

    <checkout_onepage_additional>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
            <action method="setDontDisplayContainer"><param>1</param></action>
        </block>
    </checkout_onepage_additional>

<!--
One page checkout order review block
-->

    <checkout_onepage_review translate="label">
        <label>One Page Checkout Overview</label>
        <!-- Mage_Checkout -->
        <remove name="right"/>
        <remove name="left"/>

        <block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
            <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
            <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
            <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
                <label>Items Before</label>
            </block>
            <block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
                <label>Items After</label>
            </block>
            <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
            <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
        </block>
    </checkout_onepage_review>

    <checkout_onepage_success translate="label">
        <label>One Page Checkout Success</label>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
        </reference>
    </checkout_onepage_success>
    <checkout_onepage_failure translate="label">
        <label>One Page Checkout Failure</label>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
        </reference>
    </checkout_onepage_failure>
    <block type="core/list" name="additional.product.info"/>
</layout>

转载请注明:(●--●) Hello.My Weicot » Magento 修改toplink 的方法

蜀ICP备15020253号-1