get customer details in opencart 3

Add this code in PHP file

$this->load->model('account/customer');
$data['customer_firstname']=$this->customer->getFirstName();
		$data['customer_lastname'] = $this->customer->getLastName();
		$data['customer_email']=$this->customer->getEmail();
		$data['customer_telephone']=$this->customer->getTelephone();

Add this code in TWIG file

<div class="col-md-12">
        {{ customer_firstname }} {{ customer_lastname }}
        {{ customer_email }}
        {{ customer_telephone }}
      </div>

Leave a Reply