我创建了一个正在工作的自定义装运模块。 我想将结账页面上显示的两个文本设置为来自翻译文件。Magento自定义装运模块翻译
config.xml中
<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>
Admin屏幕:
结帐前端屏幕:
问:我想设置的 “AAA” 和“bbb”文本代码为c ome来自翻译文件。
我怎样才能在代码中设置 “BBB” 文本:
我可以用
$method->setMethodTitle(Mage::helper("starmall_config")->__("Starmall_shipping_method_title"));
然后显示这个在代码中设置 “AAA” 的文字?
下不起作用:
$method->setCarrierTitle("xxxxxx");
$method->setTitle("xxxxx");
作为替代方式,您可以从左侧下拉列表中选择商店明智的标题和方法名称,选择您的商店并按商店添加新标题。 – liyakat