Password restore page
The Password restore page allows customers to reset their passwords. The password restore page contains a simple form with only one field – email address. After entering their email address and submitting the form, the customer receives an email message with their new password.
To create the password restore page, create a new page and assign it a name and URL. The values of the name and URL can be anything. Click the Action tab and select the shop:password_restore action in the action drop-down menu.
The following code contains an example of a simple password restore form.
<h2>Password Restore</h2> <?= open_form() ?> <?= flash_message() ?> <label for="email">Email</label> <input id="email" type="text" name="email" value="<?= h(post('email')) ?>" class="text"/><br/> <input type="submit" name="password_restore" value="Submit"/> <input type="hidden" name="redirect" value="/password_restore_success"/> </form>
The code outputs the HTML FORM element using the open_form function. The flash_message function outputs the form processing errors. Please note you should not change the input field and submit button element names and Ids. The optional hidden field with the name redirect can be used for redirecting a visitor's browser to the confirmation page after submitting the password restore form.
Customizing the password restore email message
You can customize the text of the default LemonStand password restore email message. Go to the Settings/Email Templates page and click the shop:password_reset message template.
Next: Change Password page
Previous: Customer registration page
Return to Building your online store
Comments
No comments posted so far.
Add your comment
Loading form...