Forums / General Questions / Fatal Error: admin/orders.php on line 382

Fatal Error: admin/orders.php on line 382

Results 1 to 20 of 22
17 Dec 2010, 03:25
#1
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Fatal Error: admin/orders.php on line 382

I just upgraded from Zen Cart 1.3.9f to Zen Cart 1.3.9h

When you try to edit an order in administration you get the following error:
Fatal error: Call to undefined function zen_address_format() in admin/orders.php on line 382

Per the instructions in the new version I just transfered the changed files for both versions, g and h

I have looked through the forum and haven't found the answer to this problem. I don't understand what it is wanting here. It worked before the upgrade.

Any help would be appreciated.
DebbyP
17 Dec 2010, 03:58
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Fatal Error: admin/orders.php on line 382

Edit orders module installed?

~Melanie
19 Dec 2010, 07:03
#3
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Melanie,
Thanks for the response but I don't understand what you are asking here. What Edit Orders module, where?
19 Dec 2010, 14:17
#4
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Fatal Error: admin/orders.php on line 382

Is your cart capable of actually editing your customer's orders? Changing quantity etc


~Melanie
19 Dec 2010, 20:17
#5
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Truthfully, I would have to check with my client to see if they were able to do that but I know that you could display the order by clicking on the edit button and it would bring it up but now if you click on the edit button you get the error:
Fatal error: Call to undefined function zen_address_format() in admin/orders.php on line 382

DebbyP
19 Dec 2010, 20:21
#6
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Fatal Error: admin/orders.php on line 382

Right but the ability to actually edit the order is a module/addon, which is what I am trying to determine as it could have been fragged in an upgrade.

~Melanie
19 Dec 2010, 20:39
#7
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

I didn't see a module in the admin area for editing would you know exactly where and what to look for? I only updated the files that were listed in the changelog-v1-3-9g.html and changelog-v1-3-9h.html docs.
DebbyP
19 Dec 2010, 20:40
#8
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Fatal Error: admin/orders.php on line 382

mprough:

Is your cart capable of actually editing your customer's orders? Changing quantity etc




Like this....
20 Dec 2010, 17:01
#9
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Ok got more information.
When the store owner goes into the Customer>Orders and clicks on the edit button they do not have the ability to actually edit the quantities on the order, they use the edit to view and print the order, place comments, communicate with the client as to status and shipping tracking numbers.

If you click on the Invoice button you get this error:
Fatal error: Call to undefined function zen_address_format() in /home/******/*******.com/catalog/admin/invoice.php on line 100

If you click on the Packing Slip button you get this error:
Fatal error: Call to undefined function zen_address_format() in in /home/******/*******.com/catalog/admin/packingslip.php on line 97


DebbyP
20 Dec 2010, 17:09
#10
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Fatal Error: admin/orders.php on line 382

Well, assumptions are bad business, but orders.php was not updated for G or H. Have you tried restoring the original file?

The line

<td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>


Really holds no clues, I think you have file(s) that have modules installed in them which were not properly merged for the upgrade.

~Melanie
25 Dec 2010, 01:22
#11
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

I don't think the problem lies in the invoice.php, packingslip.php and orders.php but a conflict with the files that were updated and those files, regarding the orders.php. Originally I got a fatal error that was on another line but that problem line was the same:
<td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>

DebbyP
03 Jan 2011, 21:06
#12
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

fatal error that was on another line but that problem line was the same:
Fatal error: Call to undefined function zen_address_format() in
/admin/orders.php on line 382

<td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>

Can someone please tell me what is wrong with the format, I don't understand why the blank single quotes after the 1, shouldn't there be something there?

The rest of the program seems to be working correctly except the orders.php, invoice.php and packingslip.php, and they all have to do with the zen_address_format, I've got to get this figured out and I really need some help.
DebbyP
05 Jan 2011, 23:37
#13
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Posts:
3,189
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

It looks as though you have an old version of "Edit Orders" installed which is not compatible with 1.3.9+, or else the original install was never completed properly.

You'll find the latest version here:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1818

Vger
06 Jan 2011, 01:06
#14
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Vger,
Thank you for getting back to me on this. They never have been able to edit order quantities so I'm thinking that they never had the "Edit Orders" module installed, but I'm willing to give it a try.

I have this hosted at Dreamhost and their support staff have been giving it a valiant effort in trying to help me. Their latest suggestion is to reload all the ZC files. I'm really afraid that I'd mess things up. Don't really know what I can do without messing things up.

I only have this one ZenCart installed for my client list so I'm a real newbie and really do appreciate any help that you've offered.

I've downloaded the Edit Orders module and will look through it. From what I see at this time those files don't and have never existed in their directories and they were able to at least view the orders and enter comments but this time I have a backup to fall back on.

Thank you again,
DebbyP
06 Jan 2011, 14:16
#15
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Posts:
3,189
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Well, in 1.3.8a that entry (listed above) exists in 5 places:
admin\invoice.php(104): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
admin\invoice.php(113): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td>
admin\orders.php(365): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>
admin\packingslip.php(101): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
admin\packingslip.php(110): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td>
Found 5 occurrence(s) in 3 file(s)


In 1.3.9H it only exists in 3 places:
admin\invoice.php(91): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
admin\orders.php(382): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>
admin\packingslip.php(88): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
Found 3 occurrence(s) in 3 file(s)


Vger
06 Jan 2011, 18:16
#16
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Vger,
I'm sorry, I guess that I didn't make my last comment clear. I was referring to the files in the Edit Orders v3.0 module. It doesn't appear that they ever had that module loaded.

I have the same three files you listed:

admin\invoice.php(91): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>

admin\orders.php(382): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>

admin\packingslip.php(88): <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>

I'm willing to try loading the Edit Orders v3.0 module and hope that it fixes the problem.

Thank you again for answering me.
DebbyP
06 Jan 2011, 23:34
#17
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Posts:
3,189
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

The zen_address_format function is defined in these files:

admin\includes\functions\functions_customers.php(35): function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
admin\includes\functions\functions_customers.php(134): return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);
admin\includes\functions\general.php(464): function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {

It is then used throughout the website, both in the back end (where you are getting the errors) and in the shop front.

Compare those 3 files you have against the default Zen cart install files.

Vger
07 Jan 2011, 23:46
#18
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Vger,
Thank you, but those are exactly the same as the ones that I have installed already.

The weird thing is, the front end of the store works just fine, the admin, customer files are fine as well, it's just the admin, customer, orders that is malfunctioning.

I'll take the shop down this weekend and try your suggestion about the edit orders module, and pray!

DebbyP
07 Jan 2011, 23:59
#19
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Posts:
3,189
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

I only mentioned the "Edit Orders" add-on because someone else thought you had it installed (incorrectly).

Vger
08 Jan 2011, 01:12
#20
debbyp avatar

debbyp

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Fatal Error: admin/orders.php on line 382

Vger,
No it was never installed. My server tech support suggested that I reload ZC, I've seen in older posts where it was suggested that the Admin directory be reloaded. Maybe I'll try reloading the Admin directory, after doing a backup this time.

DebbyP