【发布时间】:2015-07-15 17:02:57
【问题描述】:
我正在尝试添加一个自定义订单属性,用户可以在付款方式列表之后和按钮继续之前在结帐页面上定义该属性。
我想做的事情尽可能干净,所以我创建了自己的模块。
我正在为一些我认为很简单的事情而苦苦挣扎,但我没有成功找到解决方案。
目前我只需要能够在下面的块中显示模板文件。
Mage_Checkout_Block_Onepage_Payment
我创建了我的模板文件,它只为测试显示一个愚蠢的文本 应用程序/设计/默认/默认/模板/mymodule/custom.phtml 我知道这个文件在我的模块的索引操作中使用时没有问题
我认为主要问题是我不能正确地执行 xml 布局声明。
也许你可以帮助我
<?xml version="1.0"?>
<layout version="0.1.0">
<!-- this part is working well -->
<mymodule_index_index>
<reference name="content">
<block type="mymodule/mymodule" name="mymodule" template="mymodule/custom.phtml" />
</reference>
</mymodule_index_index>
<!-- this part is not working at all -->
<checkout_onepage_index>
<reference="checkout.onepage.payment" >
<block type="core/template" name="mymodule" template="mymodule/custom.phtml" />
</reference>
</checkout_onepage_index>
</layout>
当然,我的模块已经很好地声明了,因为我的模块的索引方法正在工作。 是不是我的参考标签不好?
先谢谢了,这个布局组织让我头疼,
最好的,
安塞尔
【问题讨论】: