PrestashopUser03 Posted March 1, 2021 Posted March 1, 2021 Bonjour à tous, La question est dans le titre, j'ai tenté ça : $id_customer = (int)$this->context->employee; var_dump($id_customer); ça me retourne 1, ça ne doit pas etre ça. Quelqu'un saurait-il comment faire ? Share this post Link to post Share on other sites More sharing options...
Eolia Posted March 1, 2021 Posted March 1, 2021 $this->context->employee est un objet^^ (et vous le forcez en int) $this->context->employee->id_employee devrait répondre à votre question Share this post Link to post Share on other sites More sharing options...
PrestashopUser03 Posted March 1, 2021 Posted March 1, 2021 J'étais sur que le "id_" était devant... Du coup, j'ai tenté $this->context->employee->id_employee Ca me retourne NULL. A quoi cela peut-il etre dû? Share this post Link to post Share on other sites More sharing options...
Eolia Posted March 1, 2021 Posted March 1, 2021 var_dump(Context::getContext()->employee); vous donne quoi ? 1 Share this post Link to post Share on other sites More sharing options...
PrestashopUser03 Posted March 1, 2021 Posted March 1, 2021 Toutes les informations dont j'ai besoin sur l'employé et du coup, il fallait tout simplement faire ça : $this->context->employee->id; Share this post Link to post 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