shop:change_password
The shop:change_password action is designed for creating the Change Password page. On this page a customer can change a password she use for logging into the online store. Please refer to the Creating the Change Password page article for details about the action usage.
Please note that the action requires a logged in customer, so a page, the action is assigned to, must has the Customers Only security mode enabled.
Supported form fields
- old_password – old customer's password. Required.
- password – new password. Required.
- password_confirm – password confirmation. Required.
- redirect - an optional field containing an URL for redirecting a visitor's browser after the successful password change. Note: if your copy of LemonStand is installed in a subdirectory, you need to use the root_url() function to generate correct URLs referring to LemonStand pages.
- flash - an optional field, containing a message to display after the redirection. Please use the flash_message() function on the target page to display the message.
Generated PHP variables
- $customer – an object of the Shop_Customer class, representing a currently logged in customer.
Supported AJAX handlers
- shop:on_changePassword – handles the change password request. Use this handler to create the AJAX driven Change Password page. Example: The code creates a Submit link which sends an AJAX request to the server.
<a href="#" onclick="return $(this).getForm().sendRequest('shop:on_changePassword')">Submit</a>
See also:
Next: shop:checkout
Previous: shop:category
Return to Reference

