我创建了一个正在运行的自定义运输模块。我想将结帐页面上显示的 2 个文本设置为来自翻译文件。
配置文件
<default>
<carriers>
<starmall>
<active>1</active>
<model>Starmall_Shippingcost_Model_Carrier_Starmall</model>
<title>Carrier Title</title>
<name>Method Name</name>
<price>0.00</price>
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
</starmall>
</carriers>
</default>
管理员屏幕:
结帐前端屏幕:
问题:我想将代码中的“aaa”和“bbb”文本设置为来自翻译文件。
我可以使用在代码中设置“aaa”文本
$method->setMethodTitle(Mage::helper("starmall_config")->__("Starmall_shipping_method_title"));
然后显示:
如何在代码中设置“bbb”文本?
以下不起作用:
$method->setCarrierTitle("xxxxxx");
$method->setTitle("xxxxx");