Fatal error
Fatal error
Good day
I am getting this error:
“Fatal error: Call to undefined method Model_Payment::get_banktrstatus()”
When I enable the Offline Bank Transfer.
Can this be fixed?.
I am getting this error:
“Fatal error: Call to undefined method Model_Payment::get_banktrstatus()”
When I enable the Offline Bank Transfer.
Can this be fixed?.
Re: Fatal error
Open catalog/model/payment/model_payment.php and add
Code: Select all
function get_banktrstatus(){
$result = $this->database->getRows("select * from zone_to_geo_zone where geo_zone_id = '" . (int)$this->config->get('banktr_geo_zone_id') . "' and country_id = '" . (int)$this->address->getCountryId($this->session->get('payment_address_id')) . "' and (zone_id = '" . (int)$this->address->getZoneId($this->session->get('payment_address_id')) . "' or zone_id = '0')");
return $result;
}
Re: Fatal error
leo wrote:Open catalog/model/payment/model_payment.php and addCode: Select all
function get_banktrstatus(){ $result = $this->database->getRows("select * from zone_to_geo_zone where geo_zone_id = '" . (int)$this->config->get('banktr_geo_zone_id') . "' and country_id = '" . (int)$this->address->getCountryId($this->session->get('payment_address_id')) . "' and (zone_id = '" . (int)$this->address->getZoneId($this->session->get('payment_address_id')) . "' or zone_id = '0')"); return $result; }
Hi
Thanks for the code.
Can I just copy and past it at the bottom in. Or is there a specific place it must go in.
Re: Fatal error
Simple copy it after the last function.
Re: Fatal error
Hi
I am struggling with this now I am getting this error
Fatal error: Call to undefined method Model_Payment::get_banktrstatus()
…………………………………. catalog/extension/payment/banktr.php on line 24
If I understand correctly the problem is in here..
function getMethod() {
if ($this->config->get('banktr_status')) {
if (!$this->config->get('banktr_geo_zone_id')) {
$status = true;
} elseif ($this->modelPayment->get_banktrstatus()) {
$status = true;
} else {
$status = false;
}
} else {
$status = false;
}
$method_data = array();
if ($status) {
$method_data = array(
'id' => 'banktr',
'title' => $this->language->get('text_banktr_title'),
'message' => $this->language->get('text_banktr_message'),
'sort_order' => $this->config->get('banktr_sort_order')
);
}
return $method_data;
}
I am struggling with this now I am getting this error
Fatal error: Call to undefined method Model_Payment::get_banktrstatus()
…………………………………. catalog/extension/payment/banktr.php on line 24
If I understand correctly the problem is in here..
function getMethod() {
if ($this->config->get('banktr_status')) {
if (!$this->config->get('banktr_geo_zone_id')) {
$status = true;
} elseif ($this->modelPayment->get_banktrstatus()) {
$status = true;
} else {
$status = false;
}
} else {
$status = false;
}
$method_data = array();
if ($status) {
$method_data = array(
'id' => 'banktr',
'title' => $this->language->get('text_banktr_title'),
'message' => $this->language->get('text_banktr_message'),
'sort_order' => $this->config->get('banktr_sort_order')
);
}
return $method_data;
}
Re: Fatal error
Just to help you. The end of your /catalog/model/payment/model_payment.php is:
Change it to
Code: Select all
function get_google_order($orderNumber){
$result = $this->database->getRow("select order_reference, total from order_google where order_number = '" . $orderNumber . "'");
return $result;
}
}
?>
Code: Select all
function get_google_order($orderNumber){
$result = $this->database->getRow("select order_reference, total from order_google where order_number = '" . $orderNumber . "'");
return $result;
}
function get_banktrstatus(){
$result = $this->database->getRows("select * from zone_to_geo_zone where geo_zone_id = '" . (int)$this->config->get('banktr_geo_zone_id') . "' and country_id = '" . (int)$this->address->getCountryId($this->session->get('payment_address_id')) . "' and (zone_id = '" . (int)$this->address->getZoneId($this->session->get('payment_address_id')) . "' or zone_id = '0')");
return $result;
}
}
?>