[bugfix] orders to "missing", items not subtracting: bug in /catalog/model/checkout/order.php
Posted: Thu Oct 11, 2018 7:44 am
on a fresh 2.3.0.2 install orders were going straight to missing status and item qty was not subtracting.
PHP Fatal error: Call to a member function check() on a non-object in /catalog/model/checkout/order.php on line 267
the fix:
$fraud_status_id = $this->{'model_fraud_' . $extension['code']}->check($order_info);
is wrong.. it should be:
$fraud_status_id = $this->{'model_extension_fraud_' . $extension['code']}->check($order_info);
The first version is based on an older structure. It's calling a function which doesn't exist and throws a fatal error as a result.
PHP Fatal error: Call to a member function check() on a non-object in /catalog/model/checkout/order.php on line 267
the fix:
$fraud_status_id = $this->{'model_fraud_' . $extension['code']}->check($order_info);
is wrong.. it should be:
$fraud_status_id = $this->{'model_extension_fraud_' . $extension['code']}->check($order_info);
The first version is based on an older structure. It's calling a function which doesn't exist and throws a fatal error as a result.