在结帐成功页面(http://domain.com/checkout/cart/success)上如何将布局更改为2columns-left并左侧边栏?当我在checkout.xml文件中编辑布局时,左边的块不会渲染。
答案 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>
希望你能成功!