So customer fills in the email on STEP-1 and clicks CONTINUE to STEP-2. On STEP-2 the email should already be filled in so my abandon carts can do its saving...
I almost got it to work except I have to click LOGIN on STEP-1 to pass: name="emailME
I need to pass it to step-2 by clicking CONTINUE, not LOGIN.
What am I doing wrong? (actually probably a lot). Any suggestions are much appreciated. I suck at coding
Here is my code:
login.twig file I added:
Code: Select all
<div class="form-group required">
<label class="control-label" for="input-payment-email">{{ entry_email }}</label>
<input type="text" name="emailME" value="" placeholder="{{ entry_email }}" id="input-payment-email" class="form-control" />
</div>
login.php I added this under public function index():
Code: Select all
if (isset($this->session->data['login']['emailME'])) {
$data['emailME'] = $this->session->data['login']['emailME'];
} else {
$data['emailME'] = '';
}
Code: Select all
$this->session->data['guest']['email'] = $this->request->post['emailME'];
$this->session->data['guest']['emailME'] = $this->request->post['emailME'];
guest.twig I change this:
Code: Select all
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-payment-email" class="form-control" />
Code: Select all
<input type="text" name="email" value="{{ emailME }}" placeholder="{{ entry_email }}" id="input-payment-email" class="form-control" />
Code: Select all
if (isset($this->session->data['guest']['emailME'])) {
$data['emailME'] = $this->session->data['guest']['emailME'];
} else {
$data['emailME'] = '';
}