Magento 1.7更改购物车成功页面

时间:2012-12-21 14:07:31

标签: magento-1.7

在结帐成功页面(http://domain.com/checkout/cart/success)上如何将布局更改为2columns-left并左侧边栏?当我在checkout.xml文件中编辑布局时,左边的块不会渲染。

1 个答案:

答案 0 :(得分:1)

添加了左参考。并更改了2xolumns-left.phtml。在我的主题中创建了一个名为“custom”的目录,在该目录中创建了一个custom.phtml。此内容现在在左侧呈现。

<强> onepagecheckout.xml

<onepagecheckout_index_success translate="label">
    <reference name="left">
        <block type="core/template" name="customproduct" template="custom/custom.phtml"/>
    </reference>    
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
    </reference>
</onepagecheckout_index_success>

<强> checkout.xml

<checkout_onepage_success translate="label">
    <reference name="left">
        <block type="core/template" name="customproduct" template="custom/custom.phtml"/>
    </reference>
    <label>One Page Checkout Success</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
    </reference>
</checkout_onepage_success>

希望你能成功!