Page 1 of 1
OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:21 am
by meoit
I am refresh installing OC 3.0.3.0b on XAMPP. Test myself order by buying iPhone, then problem occur:
Notice: Undefined variable: data in C:\xampp\htdocs\OC3030b\catalog\controller\extension\payment\cod.php on line 4
How to fix it ?
Thanks.
Re: OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:24 am
by straightlight
How to fix it ?
By first posting what's on line 4 of the cod.php file
Re: OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:31 am
by meoit
public function index() {
return $this->load->view('extension/payment/cod', $data); // this is line 4 on cod.php
}
Re: OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:42 am
by straightlight
Bug confirmed.
Replace with:
Code: Select all
return $this->load->view('extension/payment/cod');
This should resolved the problem. Thanks for reporting the issue.
Re: OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:52 am
by meoit
Thanks. It is working fine.

Re: OC 3.0.3.0b with ERROR - Undefined variable: data
Posted: Mon Feb 26, 2018 8:55 am
by straightlight
Thanks for the feedback. The issue has now been reported on Github.