S
S
Space2014-11-05 18:19:47
CMS
Space, 2014-11-05 18:19:47

How to know if a user is logged into opencart?

Good day to all. How to know if a user is logged into opencart via php? So that later, starting from this, to show the desired content.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sydorenko, 2014-11-05
@ruslite

in controller

if($this->customer->isLogged()) {
    echo "Customer is logged in and his ID is " . $this->customer->isLogged();
} else {
    echo "Customer is not logged in";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question