0

Hi I have a form that has various inputs. This form is on one of my category pages. I'm trying to prefill one of the inputs with the users email when logged in. Anyone know a way I can achieve this with OpenCart. I'm really new to this and any help or direction is greatly appreciated. Thanks.

INPUT:

<input type="text" name="email" id="email" value="<?php echo $email;?>" >
Mark Rodriguez
  • 125
  • 2
  • 15

1 Answers1

0

There is a library function getEmail() on

system\library\customer.php

Which returns the logged in customer Email

$data['email'] = $this->customer->getEmail();
Ramesh
  • 1,384
  • 2
  • 12
  • 19