Jump to content

How to get login user id prestashop 1.6


Recommended Posts

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.


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...