Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

Views: 1,669

Results 1 to 9 of 9
4 Apr 2016, 7:28 AM
#1
kenton avatar

kenton

New Zenner

Join Date:
Sep 2011
Posts:
38
Plugin Contributions:
0

Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

I've upgraded (from 1.4h?) and now I just get a blank screen when I try and edit an order.

Logs show:
PHP Fatal error: Call to undefined method currencies::get_decimal_places() in .../includes/modules/payment/paypalwpp.php on line 1055

Any ideas?

4 Apr 2016, 2:31 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

Kenton:

I've upgraded (from 1.4h?) and now I just get a blank screen when I try and edit an order.

Logs show:
PHP Fatal error: Call to undefined method currencies::get_decimal_places() in .../includes/modules/payment/paypalwpp.php on line 1055

Any ideas?

Not to be (too) smart, but sure have lots of ideas of what the problem is/was, but could really use a little assistance from you to narrow it down. This is usually made easier by providing the information discussed/requested in the posting tips.

Further when you say edit an order, are you referring to the default ZC edit type operation or something added to the cart? Upgraded? To what version? From what version? (When in admin, if the current database was upgraded then click the version button/text in the upper right corner and the database version history ought to be presented in the lower part of the upper section)

There's additional questions in the posting tips that when answered will really help. At the moment, the most likely (Captain Obvious) issue is an incorrect upgrade.

5 Apr 2016, 1:12 AM
#3
kenton avatar

kenton

New Zenner

Join Date:
Sep 2011
Posts:
38
Plugin Contributions:
0

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

OK, so I upgraded via my host's "one click installs" Upgrade button. They're upgrading their php and my version of ZC was incompatible.

The database was upgraded from about 1.39 ..... and it went through all the steps
v1.5.4 [2016-03-31 17:47:52] (Version Update 1.5.3->1.5.4)
v1.5.3 [2016-03-31 17:47:52] (Version Update 1.5.2->1.5.3)
v1.5.2 [2016-03-31 17:47:52] (Version Update 1.5.1->1.5.2)
v1.5.1 [2016-03-31 17:47:52] (Version Update 1.5.0->1.5.1)
v1.5.0 [2016-03-31 17:47:52] (Version Update 1.3.9->1.5.0)
v1.3.9h [2011-09-14 02:50:50] (Fresh Installation)

When I say "edit" an order, what I mean is from the admin panel, when I want to change an order from paid to shipped, I usually click edit.

site is skysports.com.au but as the problem is at the admin screen this probably won't help

===============================================
UPDATE

Edit button works when payment is not PayPal

5 Apr 2016, 3:29 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

You "one click upgrade" apparently didn't work properly. At the very least it forgot to upgrade the /admin/includes/classes/currencies.php file.

Such "one click upgrades" often mess things up like this. You'll want to check every file.

5 Apr 2016, 5:17 AM
#5
kenton avatar

kenton

New Zenner

Join Date:
Sep 2011
Posts:
38
Plugin Contributions:
0

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

DrByte:

You "one click upgrade" apparently didn't work properly. At the very least it forgot to upgrade the /admin/includes/classes/currencies.php file.

So, I had renamed my /admin directory before the upgrade (for security reasons I seem to recall) so I now have 2
/admin.new (I renamed /admin to this after the upgrade)
and
/admin_MY_OLD_VERSION

I'm assuming it upgraded (created?) the files in /admin.new

Do I need to copy/merge these files in to /admin_MY_OLD_VERSION perhaps?

5 Apr 2016, 2:27 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

The error you reported is a result of using the old admin files.

But, yes, any customizations you'd made (or any plugins you'd installed) to the old admin files will need to be re-made in the new ones.

11 Apr 2016, 4:30 AM
#7
kenton avatar

kenton

New Zenner

Join Date:
Sep 2011
Posts:
38
Plugin Contributions:
0

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

OK, so I got it working by uninstalling the paypal plugin and installing paypalwpp_v84 ... this worked but then I was notified by my host that they upgraded PHP to 5.6 (showing 5.6.19) and now I'm getting the same problem again

[10-Apr-2016 17:51:36 America/Los_Angeles] PHP Fatal error:  Call to undefined method currencies::get_decimal_places() in /BLABLABLA/skysports/includes/modules/payment/paypalwpp_v84.php on line 1087

where do I find get_decimal_places()?

11 Apr 2016, 5:11 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

It is found in the new admin folder. What has been identified is that somewhere in this "upgrade"/restore, the files associated with the current version of ZC have been overwritten by older versions of the same file(s). If the one affected function is corrected/addressed, what is to say that other changes haven't been missed or not applied? It is best to review the entire fileset that is being used for the admin as compared to a vanilla install's admin.

12 Apr 2016, 6:04 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055

Kenton:

where do I find get_decimal_places()?
You REALLY need to fix your ENTIRE admin folder. Not just one file. But the VERY SHORT TERM BANDAGE is /admin/includes/classes/currencies.php