If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / Access to my Customers and Orders broken after installing a mod

Access to my Customers and Orders broken after installing a mod

Locked

Started by iheartguts on 9 Jan 2008, 9:57 PM · Views: 3,615

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
9 Jan 2008, 9:57 PM
#1
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #1 by iheartguts

Hi,

I was trying to install a new bit of code (the "how did you hear about us?" thing) into my Zencart system and like an idiot forgot to back it up first. It didn't work and I couldn't access orders and customers. So I reinstalled the shop/admin/customers.php and shop/admin/orders.php files, but now all my customer/order info is lost. Now I get the following error:

Fatal error: Call to undefined function zen_get_orders_comments() in /shop/admin/orders.php on line 802

I contacted my host about retrieving the info -- is that all I can do, or is there some other fancy way to retrieve the info? Thanks in advance.

9 Jan 2008, 10:07 PM
#2
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #2 by iheartguts

just to add infor, first i got this error:

Parse error: syntax error, unexpected T_CASE in /home/iheartgu/public_html/shop/admin/orders.php on line 195

then after reloading a fresh orders.php, got the error listed above...

Fatal error: Call to undefined function zen_get_customers_address_book() in shop/admin/customers.php on line 1120

9 Jan 2008, 10:12 PM
#3
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #3 by iheartguts

and line 195 is this:

  case 'doRefund':
9 Jan 2008, 11:16 PM
#4
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Post #4 by barco57

you probably haven't lost the customer info or the orders as they are stored in the database.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

9 Jan 2008, 11:18 PM
#5
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #5 by iheartguts

good news! how do i retrieve the info?

10 Jan 2008, 8:37 AM
#6
drbyte avatar

drbyte

Sensei

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

Post #6 by drbyte

iheartguts:

Fatal error: Call to undefined function zen_get_customers_address_book() in shop/admin/customers.php on line 1120

That means you're using an older version of the /admin/includes/functions/functions_general.php file.

Perhaps your addon contains an old version and isn't doing you any favors .... you'll have to manually merge its customizations into your correct original copy of the file.

.
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.

10 Jan 2008, 5:32 PM
#7
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #7 by iheartguts

hmm, i replaced that file (although in the latest zc version that file was inclues/functions not admin/includes/functions -- maybe this is also a source of trouble?) and now i get this error:

Parse error: syntax error, unexpected T_CASE in /home/iheartgu/public_html/shop/admin/orders.php on line 195

i don't even care about the new module anymore, just want to get my orders back. thank you so much for your help, you rock!

10 Jan 2008, 7:58 PM
#8
drbyte avatar

drbyte

Sensei

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

Post #8 by drbyte

DrByte:

That means you're using an older version of the /admin/includes/functions/functions_general.php file.

iheartguts:

hmm, i replaced that file (although in the latest zc version that file was inclues/functions not admin/includes/functions -- maybe this is also a source of trouble?)Sorry - typo on my part.
I should have said: /admin/includes/functions/general.php

.
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.

10 Jan 2008, 8:00 PM
#9
drbyte avatar

drbyte

Sensei

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

Post #9 by drbyte

iheartguts:

Parse error: syntax error, unexpected T_CASE in /home/iheartgu/public_html/shop/admin/orders.php on line 195

Um ... well ... it means that your /shop/admin/orders.php is bad.
Again, putting back the original one using the backups you have from before making your changes would normally solve that problem.

When you added that contribution, did it add any "new" files that you haven't also removed?

.
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.

10 Jan 2008, 9:21 PM
#10
iheartguts avatar

iheartguts

New Zenner

Join Date:
Aug 2007
Posts:
32
Plugin Contributions:
0

Post #10 by iheartguts

right, right, of course i need to remove the "new" files frm the module. so, like an idiot i committed the cardinal sin of not backing up the original before trying to install the module. very very dumb. so how can i get the orders.php back without wrecking orders that have come in the meantime (i'm not really clear on how this whole thing works, so forgive my stupid questions)? i can get a day-old backup from my hosts, but someone wrote something about the info being stored in the database (but i have no idea how to get access to the database -- again, forgive my fuzziness on this). thank you thank you!

10 Jan 2008, 9:38 PM
#11
drbyte avatar

drbyte

Sensei

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

Post #11 by drbyte

Your error appears to be coming from /admin/orders.php and not from the database.
So, replacing that file with the original should be a good starting point.
If you didn't make a backup, then use the original one from your original set of Zen Cart files.
If you don't have a set, then you really ought to start making backups! and then get the original files from the Zen Cart site, for your currently-installed version.

You still need to remove any extra files that you installed as part of the mod, if you haven't already.

.
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.

25 Mar 2008, 11:06 AM
#12
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Post #12 by crazycucumber

Did you guys solve this one ?

I have exactly the same issue on a 1.3.7 install .

Checked my orders.php with the original and with the modded one , all looks OK .

confused at the moment:huh:

Various Zen cart sites !

25 Mar 2008, 11:42 AM
#13
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Post #13 by crazycucumber

Just to update anyone that is reading this thread ,

I have put in the original 1.3.7. file and now works ok .

I am not sure what the modded file from the How did you hear about us 1.3.7. mod differs

This is the only bit of code that is new in the mod around those line numbers :
181 to 195

    }
  }

  if (($action == 'edit') && isset($_GET['oID'])) {
    $oID = zen_db_prepare_input($_GET['oID']);

    $orders = $db->Execute("select orders_id from " . TABLE_ORDERS . "
                            where orders_id = '" . (int)$oID . "'");

    $order_exists = true;
    if ($orders->RecordCount() <= 0) {
      $order_exists = false;
      $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');

any help to solve appreciated. May be worth me posting in the how did you hear.... thread !

Various Zen cart sites !