我創建了一個正在工作的自定義裝運模塊。 我想將結賬頁面上顯示的兩個文本設置爲來自翻譯文件。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