1抽象方法,因此必须声明为抽象或实现其余方法 [英] 1 abstract method and must therefore be declared abstract or implement the remaining methods

查看:257
本文介绍了1抽象方法,因此必须声明为抽象或实现其余方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的magento商店从1.5.1升级到了1.7.0版本.大多数事情都可以正常工作,但是当我通过管理区域进入运输方法"选项时,出现以下错误.

I recently upgraded my magento store to 1.7.0 version from 1.5.1. Most of the things are working as it should be, but when I got to Shipping Method option via admin area I get following error.

Fatal error: Class Zenprint_Ordership_Model_Shipping_Carrier_Ups contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Mage_Usa_Model_Shipping_Carrier_Abstract::_doShipmentRequest) in /home/dev/public_html/app/code/community/Zenprint/Ordership/Model/Shipping/Carrier/Ups.php on line 33

在Ups.php的第33行上,这是代码.

On line 33 of Ups.php this is the code.

extends Mage_Usa_Model_Shipping_Carrier_Abstract

我通过Magento Connect检查了所有模块,它们都已更新为稳定版本.升级时我有什么想念的吗?

I checked all the modules via Magento Connect and they are all updated to stable version. Is there anything that I missed while upgrading?

谢谢

推荐答案

Magento的1.6.x分支重新构造了Mage_Usa_Model_Shipping_Carrier_Abstract的工作方式,其中包括添加了所有子类都必须实现的抽象方法.

The 1.6.x branch of Magento re-factored how the Mage_Usa_Model_Shipping_Carrier_Abstract works, which included adding an abstract method that all child classes must implement.

您的系统上有一个名为Zenprint_Ordership的模块,其中包括货运公司类.它可能是此扩展名的一部分.

You have a module named Zenprint_Ordership on your system, which includes a shipping carrier class. It's probably a part of this extension.

此扩展程序尚未更新,无法与Magento 1.6+一起使用.要使您的商店再次正常工作,您应该通过重命名/删除文件

This extension has not been updated to work with Magento 1.6+. To get your store working again you should disable this extension by renaming/removing the file

#rename so it doesn't have a xml extension to disable
app/etc/modules/Zenprint_Ordership.xml

app/etc/modules/Zenprint_Ordership.xml.disable

这将删除您使用Zenprint_Ordership的所有自定义功能,但应使系统恢复工作状态.

This will remove whatever custom functionality you were using Zenprint_Ordership for, but should return your system to working order.

长期而言,您要么需要

  1. 重新编码Zenprint_Ordership模块以与您的系统一起使用,因为自Magento 1.2以来,开发人员似乎尚未对其进行更新.

  1. Re-code the Zenprint_Ordership module to work with your system, as it looks like the developer hasn't update it since Magento 1.2.

找到使用Zenprint_Ordership的功能的替代方案.

Find an alternative for whatever functionality you were using Zenprint_Ordership for.

此外,即使在禁用扩展程序之后,在查看使用此送货方式的旧订单时,您也可能会遇到问题.如果您对此感到满意,则在类上定义一个空白的_doShipmentRequest方法可能会帮助您解决此问题,但是我不确定是否会推荐给非程序员.

Also, even after disabling the extension you may run into problems when viewing old orders that used this shipping method. If you're feeling up for it defining a blank _doShipmentRequest method on the class may help you work around this, but I'm not sure I'd recommend it to a non-programmer.

高级解决方案?像任何复杂的Web应用程序一样,电子商务系统也需要不断维护.如果您托管自己的购物车,请确保在遇到这种情况时可以与具有专业知识的人员联系,以为您提供帮助.

The high level solution? A ecommerce system, like any complex web application, requires constant maintenance. If you're hosting your own cart make sure you have access to people with the expertise to help you when you run into situations like this.

这篇关于1抽象方法,因此必须声明为抽象或实现其余方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆