Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Managing Customers and Orders / Help - PHP Fatal error: Class 'order' not found

Help - PHP Fatal error: Class 'order' not found

Started by sevenhelmets on 30 Oct 2009, 8:20 AM · Views: 3,699

Results 1 to 4 of 4
30 Oct 2009, 8:20 AM
#1
sevenhelmets avatar

sevenhelmets

New Zenner

Join Date:
Oct 2009
Location:
Tokyo, Japan
Posts:
52
Plugin Contributions:
0

Help - PHP Fatal error: Class 'order' not found

Hi folks

Need some help here. I'm very close to finishing setting up my site, and we are scheduling to launch tomorrow....however, I've come across a problem, and I'm not sure where to go.

I've been testing out the payment systems, and Paypal seems to be working fine.

Now I'm trying to test out the order processing side of things in the backend, and am clicking on: **Admin **---> **Customers **---> Orders, which I can see fine. However, when I click on the "E" for edit, I get only a blank page.

I followed Dr.Byte's instructions for debugging, and came up with this code (domain name changed for privacy reasons, as well as admin folder, which is actually not named "admin"):

[30-Oct-2009 01:08:37] PHP Warning: include(includes/classes/order.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/orders.php on line 15

[30-Oct-2009 01:08:37] PHP Warning: include(includes/classes/order.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/orders.php on line 15

[30-Oct-2009 01:08:37] PHP Warning: include() [function.include]: Failed opening 'includes/classes/order.php' for inclusion (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/admin/orders.php on line 15

[30-Oct-2009 01:08:37] PHP Fatal error: Class 'order' not found in /var/www/vhosts/mysite.com/httpdocs/admin/orders.php on line 881

Going on this code, I checked the files:

/admin/orders.php
/includes/classes/order.php

and found that it had been overwritten when I tried installing Fast and Easy checkout mod (which I have decided not to use). So I replaced them with the original files (after compairing the two files with Beyond Compare), but I'm still getting these errors and the blank page.

In any case, lines 15 and 881 read:

include(DIR_WS_CLASSES . 'order.php');

and

$order = new order($oInfo->orders_id);

I'm not a programmer by any stretch of the imagination, but that *seems *to look ok. Could someone please help me and point me in the right direction please?! :unsure:

30 Oct 2009, 3:35 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Help - PHP Fatal error: Class 'order' not found

Good sleuthing.

However, there is one problem you've not caught, simply because the file is absent. Your /admin/includes/classes/order.php file is missing from your server.
Re-upload the original version of that file and you should be fine.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Oct 2009, 4:53 PM
#3
sevenhelmets avatar

sevenhelmets

New Zenner

Join Date:
Oct 2009
Location:
Tokyo, Japan
Posts:
52
Plugin Contributions:
0

Re: Help - PHP Fatal error: Class 'order' not found

DrByte:

Good sleuthing.

However, there is one problem you've not caught, simply because the file is absent. Your /admin/includes/classes/order.php file is missing from your server.
Re-upload the original version of that file and you should be fine.

OOOOOOHHHHH. Duh! I was looking in the *general *"Includes" folder! Didn't even take a step back to notice it was right in front of my face "admin/includes...."!!!

Thanks for pointing that out DrByte - very prompt and helpful advice! :hug:

It's working now! Thanks once again!

15 Jan 2011, 3:27 AM
#4
cshart avatar

cshart

Zen Follower

Join Date:
Mar 2005
Posts:
370
Plugin Contributions:
0

Re: Help - PHP Fatal error: Class 'order' not found

Read the thread here changed the files listed to the originals - I also choose not to use fec but the orders.php is not loading when you click on orders. it will however show order totals stats_customers.php on this page
Error
The website encountered an error while retrieving http://www.pleasantmountainstitchery.com/store/MY_ADMIN/orders.php?cID=1

Is there a problem in the database?
C