简体   繁体   中英

open cart how to get current customer info?

I have created following controller:

class ControllerCommonTestSMS extends Controller
{
    function index()
    {
       //  action
    }
}

But if I add the following line, it throws an error that the function is undefined:

$this->customer->isLogged();
class ControllerCommonTestSMS extends Controller
{
    function index()
    {
       if (!$this->customer->isLogged()) {

        //code to be execu

        }
    }
}

this is working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM