Page 1 of 1

All orders are going automaticly to missing Orders

Posted: Sat Oct 14, 2017 7:22 pm
by Coffee2sugars
All my orders end up with a cancelled status and are only visible to me by using the filtering option to display Missing orders in the orders section of the admin area of the site. If I use the filter to only show cancelled orders no orders will be displayed.

Everything looks and works fine on the customers end including them getting an order success message after the Payal returns them to my site. After that though they have no order history and receive no email to confirm their orders.

I do get paid ok through Paypal.

I also noticed that if I try to edit the order status to make it "Pending" I receive an internal server error message.

I have read a few topics that sugest checking the payment module settings.
I am using Paypal Payments Standard. All the statuses have been made to match and the relevant settings and are correct.
Please see attached screenshots

Desperatly need some help with this.

Thanks

Shaun

Re: All orders are going automaticly to missing Orders

Posted: Sat Oct 14, 2017 7:36 pm
by straightlight
Which OC version are you using? Check your admin error logs to see what might be the source of the error regarding the Internal Server Error message. Do you see any errors in the logs?

Re: All orders are going automaticly to missing Orders

Posted: Sat Oct 14, 2017 7:38 pm
by straightlight
In the mean time, see this solution: viewtopic.php?f=199&p=694206#p694206

Re: All orders are going automaticly to missing Orders

Posted: Sun Oct 15, 2017 12:44 am
by Coffee2sugars
2017-10-14 14:48:47 - PP_STANDARD :: TOTAL PAID MISMATCH! 0.30

This is the error message I am receiving

All order statuses are there on the site.

Re: All orders are going automaticly to missing Orders

Posted: Sun Oct 15, 2017 12:56 am
by Coffee2sugars
I just tried to make a manual order in the admin back office and still get the message internal server error. No error message is added to the log though.

Re: All orders are going automaticly to missing Orders

Posted: Sun Oct 15, 2017 1:12 am
by straightlight
A clue. Let's test the following tweak.

In catalog/controller/extension/payment/pp_standard.php file,

find:

Code: Select all

$total_paid_match = ((float)$this->request->post['mc_gross'] == $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false));
replace with:

Code: Select all

$total_paid_match = ((float)$this->request->post['mc_gross'] == number_format($order_info['total'], 2, '.', ''));
Test another PayPal standard transaction and see if that resolves the issue.

Re: All orders are going automaticly to missing Orders

Posted: Sun Oct 15, 2017 5:15 pm
by Coffee2sugars
straightlight wrote:
Sun Oct 15, 2017 1:12 am
A clue. Let's test the following tweak.

In catalog/controller/extension/payment/pp_standard.php file,

find:

Code: Select all

$total_paid_match = ((float)$this->request->post['mc_gross'] == $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false));
replace with:

Code: Select all

$total_paid_match = ((float)$this->request->post['mc_gross'] == number_format($order_info['total'], 2, '.', ''));
Test another PayPal standard transaction and see if that resolves the issue.
I have sent you a PM but I have also noticed this message appears very often in my error log

2017-10-15 7:00:02 - PHP Warning: Invalid argument supplied for foreach() in /home/WEBSITe URL/system/framework.php on line 59

Along with this one ocasionally

PHP Warning: Cannot modify header information - headers already sent by (output started at /home/kinkylif/kinkyshop.kinkylifestyle.co.uk/system/framework.php:42) in /home/WEBWITE URL/system/framework.php on line 108

Does this help?

Re: All orders are going automaticly to missing Orders

Posted: Sun Oct 15, 2017 7:45 pm
by straightlight
In system/framework.php file,

find:

Code: Select all

// Event Register
if ($config->has('action_event')) {
	foreach ($config->get('action_event') as $key => $value) {
		foreach ($value as $priority => $action) {
			$event->register($key, new Action($action), $priority);
		}
	}
}
replace with:

Code: Select all

// Event Register
if ($config->has('action_event')) {
	foreach ($config->get('action_event') as $key => $value) {
		if (!empty($value) && is_array($value)) {
			foreach ($value as $priority => $action) {
				$event->register($key, new Action($action), $priority);
			}
		}
	}
}
Then, find:

Code: Select all

if ($config->get('error_display')) {
replace with:

Code: Select all

if ($config->get('error_display') && !headers_sent()) {
In admin/controller/startup/error.php file,

find:

Code: Select all

if ($this->config->get('config_error_display')) {
replace with:

Code: Select all

if ($this->config->get('config_error_display') && !headers_sent()) {
In catalog/controller/startup/error.php file,

find:

Code: Select all

if ($this->config->get('config_error_display')) {
replace with:

Code: Select all

if ($this->config->get('config_error_display') && !headers_sent()) {
See if the error persists with the logs after trying your next PayPal transactions or other transactions on your site.

Re: All orders are going automaticly to missing Orders

Posted: Tue Oct 17, 2017 1:13 am
by Coffee2sugars
After making those changes the site totally crashed and I had to re install restore from a backup.