Show customer id in header.tpl on Opencart 2
<p>How to display customer id in header.tpl on Opencart 2?</p>

<pre><code>    if ($this-&gt;customer-&gt;isLogged()) {
    $data['customer_id'] = $this-&gt;customer-&gt;getId(); // customer ID
    $data['customer_fname'] = $this-&gt;customer-&gt;getFirstName(); // customer email
    }
</code></pre>

<p>doesn`t work.</p>