我正在开发一个现在使用Magento的网站.
我在后端遇到错误,当我去Sales-> Order-> View(选择任何订单) - > Ship.
当我点击添加跟踪号码时,没有结果.当我查看我的firebug时,出现此错误显示:
this.template is undefined
http://www.myDomain.com/index.php/admin/sales_order_shipment/new/order_id/154/key/f58bdecb79687dd839f91cdc23bb1b9d/
Line 628
Run Code Online (Sandbox Code Playgroud)
由于这个错误,我们无法移动一个.
Magento Version: 1.4.1.1
Run Code Online (Sandbox Code Playgroud)
怎么可能出错?
您需要查看app/design/adminhtml/default/default/template/sales/order/shipment/create/tracking.phtml:
在这里,您将看到Firebug在Element.insert上引用的错误(...
var trackingControl = {};
trackingControl = {
index : 0,
add : function () {
this.index++;
var data = {index:this.index};
Element.insert($('track_row_container'), {bottom: this.template.evaluate(data)});
$('trackingC' + this.index).disabled = false;
$('trackingT' + this.index).disabled = false;
$('trackingN' + this.index).disabled = false;
this.bindCurrierOnchange();
},
Run Code Online (Sandbox Code Playgroud)
有关原型插入方法的更多详细信息,请访问:http: //www.prototypejs.org/api/element/insert
您还需要确保在此文件的底部设置以下模板对象:
<script type="text/javascript">
//<![CDATA[
trackingControl.template = new Template('<tr>' + $('track_row_template').innerHTML.replace(/__index__/g, '#{index}') + '<\/tr>');
//]]>
</script>
Run Code Online (Sandbox Code Playgroud)
这是this.template定义的地方.
见http://www.prototypejs.org/api/template
一些事情要尝试:
1)尝试使用其他浏览器,以确保它不是特定于浏览器的错误.
2)尝试通过/etc/modules/company_modulename/config.xml禁用任何第三方模块
3)从相同或更新版本的Magento复制tracking.phtml的新版本.