Page 1 of 2

Fatal error: Class 'Controllerpayment' not found

Posted: Wed Dec 30, 2015 9:08 am
by Rainforest
I've sucessfully upgraded my 1.5.6 store using the migration upload tool.

Things seem to be OK.

However, when I go to an order and try to VIEW it I get this error:

Fatal error: Class 'Controllerpayment' not found in /xxx/public_html/system/engine/loader.php on line 28

Line 28 is : $controller = new $class($this->registry);

(BTW If I click on the EDIT button, no issues.)

Any ideas?
Thank you!

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Fri Jan 01, 2016 5:20 am
by bxmas13
I was having the same issue today. In my situation the problem turned out that after the upgrade I failed to install and enable a Payment extension that was associated with the order.

The error is associated with the 'payment_code' field in the oc_order table.
Error is thrown by line 1240 in /admin/controller/sale/order.php

Code: Select all

$content = $this->load->controller('payment/' . $order_info['payment_code'] . '/order');

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Sun Jan 03, 2016 1:30 pm
by soundzgood-nz
Change the payment_code in the orders table to the correct / updated payment_code of the replacement oc2 payment module. Example - payment_code 'dps_pxpay' in 1564 would need to be updated to 'paymentexpress' in 2101

Simon

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Fri Jan 08, 2016 1:42 pm
by HAO
I also have the same problem.

But my case is upgrading database manually from 1.5.6.4 to 2.1.0.1 version, For oc_user, oc_user_group, oc_setting data sheets, directly copied from the new 2.1.0.1, All functions are normal, but Orders that can not be displayed.

How can I deal with this problem?

My Error Code:

Code: Select all

Fatal error: Class 'Controllerpayment' not found in /xxx/public_html/system/storage/modification/system/engine/loader.php on line 28

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Sat Jan 09, 2016 2:29 am
by bxmas13
Find out what payment system you are using and do what soundzgood-nz suggested in the previous post:

Change the payment_code in the orders table to the correct / updated payment_code of the replacement oc2 payment module. Example - payment_code 'dps_pxpay' in 1564 would need to be updated to 'paymentexpress' in 2101

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Sat Jan 09, 2016 11:49 am
by HAO
I did not think would be related with the Payment Method, i do have to install our country-specific payment module, After the substitution, indeed can read, thank you for reminding!

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Sun Jan 10, 2016 2:21 am
by bxmas13
You are very welcome!

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Thu Jan 21, 2016 3:15 am
by htwp
The same happens to me also i get the same error but i don't use the mentioned type of payments. This is happening to the unfinished orders when i am trying to view them. What i have discovered is in database table order column payment_code when this column is empty i cant view the unfinished orders. If i type manually any payment method then i can view it. Any help will be great as i am struggling to find the problem more than 2 weeks day and night without answer.
Thank you in advance.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Thu Jan 21, 2016 3:56 am
by Randem
Hi Rainforest,

You say you upgraded with the migration upload tool (never heard of that one). A lot of your error will happen if you use the wrong one. Could you be a little more specific with at least a link to it. I suggest this one - http://www.randemsystems.com/support/op ... n-2-1-0-1/

Hi HAO,

The manual update has caused you some issues I believe. if you don't get it correct your will have problems with orders - Reference: http://www.randemsystems.com/support/op ... cart-v2-x/

Hi htwp,

You have not given enough information as to how you came to get these errors... Please give some history.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Tue Apr 05, 2016 12:06 am
by reececropley
Is there anywhere that I can find what the new payment_code names are for the new site.

I have a site with over £1.2 million pounds worth of orders that I would like migrated to the new version.

I have done a database search but nothing is coming back.

Thanks in advance.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Tue Apr 05, 2016 12:53 am
by reececropley
Hello, I realised the payment code is in the URL of the payment methods module page.

I believe I have updated all but one (i.e sagepay_server_v3 [1.5.6] to sagepay_server [2.1.0.1])

There is one that I cant find the equivalent of, its the openbay amazon payment code. On the old site its amazon.amazon [1.5.6] - does anyone know what it is for the v2.1.0.1?

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Tue Apr 05, 2016 2:36 am
by bxmas13
These are what I found for 2.1.0.1 Openbay Amazon payment_codes

amazonus.amazonus - catalog\controller\openbay\amazonus.php
amazon.amazon - catalog\controller\openbay\amazon.php
amazon_login_pay - catalog\controller\payment\amazon_login_pay.php

Hope that helps!

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Tue Apr 05, 2016 9:10 pm
by reececropley
Cheers thats perfect.

The older version already uses amazon.amazon so I am now guessing its becuase OpenBay isn't fully integrated on the site. I will try and install it now and see if it all works and let you know.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Tue Apr 05, 2016 10:40 pm
by reececropley
Could this same error be caused by the shipping_code as well? it appears the amazon order still throw the same issue.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Wed Apr 06, 2016 2:00 am
by bxmas13
I'm not sure, but I wouldn't think so. I have about 300 orders in my database that do not have a shipping_code and everything is working fine.

What is the error you are receiving now?
What payment modules do have enabled and active?

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Wed Apr 06, 2016 11:22 pm
by reececropley
The Fatal Error I am getting on orders that used the OpenBay Amazon payment_code or don't have a value for payment_code is:

Fatal error: Class 'Controllerpayment' not found in /.../vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php on line 28

The payment methods and their payment code, I have installed are:

Paypal (pp_standard)
Sagepay (sagepay_server)
Cash on Delivery (cod)
Bank Transfer (bank_transfer)

OpenBay (amazon.amazon) - payment made on amazon

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Thu Apr 07, 2016 12:50 am
by bxmas13
Any order that has a blank payment_code field is going to cause that error. You should replace the blank payment_code field with the code from an installed payment method.

As for the OpenBay orders causing that problem; it sounds like OpenBay is not installed correctly. Could you have installed the Amazon US version by accident?

Line 28 of the loader.php file is part of a loop that is looking at the payment_code field and trying to find the matching payment controller PHP file. On some order it's finding a payment_code that doesn't have a matching payment controller installed/enabled.

My suggestion would be to query your database and find any payment_code that DOES NOT match 'pp_standard','sagepay_server','cod', and 'bank_transfer'.

A quick query I would use for that would be something like:

Code: Select all

SELECT order_id, payment_code FROM oc_order 
where payment_code NOT LIKE '%pp_standard%' 
AND payment_code NOT LIKE '%sagepay_server%'
AND payment_code NOT LIKE '%cod%'  
AND payment_code NOT LIKE '%bank_transfer%'
/*AND payment_code NOT LIKE '%amazon.amazon%' */
The commented line is there if you want to include the OpenBay Amazon code. Just uncomment it to include it in the query. First time I would leave it out and see what payment_codes show up in the query result.

I hope that helps.

Good luck!

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Thu Apr 07, 2016 3:25 pm
by reececropley
Thanks, Ill give that a go. Unfortunately I have caused another error on the site from trying to fix something else. Ill have a crack at this once i've finished fixing this.

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Mon Apr 11, 2016 11:37 pm
by reececropley
Hello, I have changed all the blank lines and updated the old payment codes to the new. The only payment code that it doesn't work on now is OpenBay's 'amazon.amazon'.

OpenBay's support team have logged in and installed the latest version for me. Ill ask the same question to them and show them the error code. But any thoughts from this thread?

Re: Fatal error: Class 'Controllerpayment' not found

Posted: Mon Apr 11, 2016 11:55 pm
by pm-netti
There is correct payment_codes to version 2.2.

https://github.com/opencart/opencart/tr ... er/payment

( filenames without '.php')