This is the documentation for LemonStand V1, which has been discontinued. You can learn more and upgrade your store here.

LemonStand Version 1 Has Been Discontinued

This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.

Creating a Customer Account Change Password Page

On the Change Password page your users can change their passwords. The page contains a simple form with 3 fields.

Start with creating a new page and assign it a name and URL. Go to the Action tab and select the shop:change_password action in the drop-down menu. The Change Password page must be available only for logged in customers. Click the Security tab and select Customers Only option in the Access section.

The following code example outputs the Change Password form.

<h2>Change Password</h2>
<?= open_form() ?>
  <?= flash_message() ?>
  <label for="old_password">Old Password</label>
  <input id="old_password" type="password" name="old_password"/><br/>
  
  <label for="password">New Password</label>
  <div><input id="password" type="password" name="password"/><br/>
    
  <label for="password_confirm">Password Confirmation</label>
  <input id="password_confirm" type="password" name="password_confirm"/><br/>
  
  <input type="submit" name="change_password" value="Submit"/>
  <input type="hidden" name="redirect" value="/password_change_success"/>
</form> 
<h2>Change Password</h2>
{{ open_form() }}
  {{ flash_message() }}
  <label for="old_password">Old Password</label>
  <input id="old_password" type="password" name="old_password"/><br/>
  
  <label for="password">New Password</label>
  <div><input id="password" type="password" name="password"/><br/>
    
  <label for="password_confirm">Password Confirmation</label>
  <input id="password_confirm" type="password" name="password_confirm"/><br/>
  
  <input type="submit" name="change_password" value="Submit"/>
  <input type="hidden" name="redirect" value="/password_change_success"/>
</form> 

Please note the INPUT elements names and Ids. You should not change them, otherwise LemonStand will not able to process the form.

The flash_message function used to output form errors (e.g. invalid old password).

The hidden field with name redirect allows you to specify a page URL to redirect the browser after successful password change.

Next: Automatic customer registration
Previous: Creating a Customer Account Password Restore Page
Return to Customer Accounts and Registration