Opencart and Opebay Pro Error with Ebay,Amazon,Etsy, on Viewing Order
I was Getting this error on Viewing Order on Openbay Pro
Fatal error: Class 'Controllerpayment' not found in /home/xxxx/public_html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php on line 36
This error was coming Opencart Version 2.1.0.2 . so I found this is opencart default error. and its solution is already given in Openart Latest Version 2.3.02. It was Default Opencart Error for Openbay Pro. This error has been solved in Opencart Version 2.3.0.2
so I modified the code according to that. See Code Details here
OLD CODE:
---------------------------------
// Additional Tabs
$data['tabs'] = array();
$this->load->model('extension/extension');
$content = $this->load->controller('payment/' . $order_info['payment_code'] . '/order');
if ($content) {
$this->load->language('payment/' . $order_info['payment_code']);
$data['tabs'][] = array(
'code' => $order_info['payment_code'],
'title' => $this->language->get('heading_title'),
'content' => $content
);
}
-----------------------------
Latest Version Code:
------------------------------
// Additional Tabs
$data['tabs'] = array();
$this->load->model('extension/extension');
if ($this->user->hasPermission('access', 'payment/' . $order_info['payment_code'])) {
if (is_file(DIR_CATALOG . 'controller/payment/' . $order_info['payment_code'] . '.php')) {
$content = $this->load->controller('extension/payment/' . $order_info['payment_code'] . '/order');
} else {
$content = null;
}
if ($content) {
$this->load->language('payment/' . $order_info['payment_code']);
$data['tabs'][] = array(
'code' => $order_info['payment_code'],
'title' => $this->language->get('heading_title'),
'content' => $content
);
}
}