2015-06-04 19 views
0

我正在使用Opencart擴展(dsociallogin_v2.3)。我已經安裝了它,但是當試圖激活它時,它顯示一個錯誤。致命錯誤:調用未定義的方法ControllerModuleDSocialLogin

Fatal error: Call to undefined method ControllerModuleDSocialLogin::render() 
in /home/.../admin/controller/module/d_social_login.php on line 247 

你能告訴我爲什麼發生這種情況,以及如何解決它?

$this->load->model('sale/customer_group'); 

$this->data['customer_groups'] = $this->model_sale_customer_group->getCustomerGroups(); 

$this->response->setOutput($this->render()); 
} 

protected function validate() { 
    if (!$this->user->hasPermission('modify', 'module/d_social_login')) { 
     $this->error['warning'] = $this->language->get('error_permission'); 
    } 
+0

你最有可能試圖用一個模塊,這是不與您的Opencart版本兼容。 Opencart不再使用$ this-> render()來渲染其頁面。我建議你尋找一個模塊,它與你正在使用的Opencart版本兼容。 –

+0

請指定您正在使用的'opencart'的版本。該代碼顯示版本低於2.0。如果你的'opencart'版本是'2.0'或以上,那麼它將不起作用。 –

回答

0

對於版本低於2.X使用

$this->response->setOutput($this->render()); 

對於Opencart的版本上面2.X然後用戶

$this->response->setOutput($this->load->view('folderName/fileName.tpl', $data)); 
+0

嗨,我正在使用 Opencart版本2.0.2.0我使用 你可以建議我如何解決這個問題? –

+0

@NeerajSharma你的tpl文件名是什麼,也讓我知道它在哪個文件夾中。 –

相關問題