Ridhi09 Posted September 6, 2019 Share Posted September 6, 2019 Hi, I want to get login user id in prestashop 1.6. I have used several methods like $id = $this->context->customer->id; $id = (int)$this->context->customer->id; $id_customer = null; if ($this->context->customer->isLogged()) { // code to execute if i am logued $id_customer = $this->context->customer->id; } But no data. Can anyone help me with this. Thanks Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted September 7, 2019 Share Posted September 7, 2019 Hi.. use context object $this->context =Context::getContext() ; $this->context->customer->id; http://doc.prestashop.com/display/PS15/Using+the+Context+Object Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now