Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
316 views
in Technique[技术] by (71.8m points)

php - 1 abstract method and must therefore be declared abstract or implement the remaining methods

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

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

extends Mage_Usa_Model_Shipping_Carrier_Abstract

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

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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

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

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

Long term you'll either need to

  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.

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

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...