【发布时间】:2012-12-21 14:07:30
【问题描述】:
在结帐成功页面 (http://domain.com/checkout/cart/success) 我如何将布局更改为 2columns-left 并具有左侧边栏?当我在我的 checkout.xml 文件中编辑布局时,左侧块不会呈现。
【问题讨论】:
标签: magento-1.7
在结帐成功页面 (http://domain.com/checkout/cart/success) 我如何将布局更改为 2columns-left 并具有左侧边栏?当我在我的 checkout.xml 文件中编辑布局时,左侧块不会呈现。
【问题讨论】:
标签: magento-1.7
添加了左侧参考。并更改了 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>
希望你会成功!
【讨论】: