VisionCart.UserManagement
This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.
To be able to complete the order process people need to login, for that we made example resources that contains the Login snippet and we use FormIt to be able to change your profile. (so you need to install these snippets also for it to work)
Account
Create a resource called 'Account' , this will be the container for the following resources.
Login
Create a resource called 'Login' and place this in the content field:
[[!Login]]
And set this page to be the unauthorized resource (this could also be you own login page).
Profile
Create a resource called 'Profile' and place this in the content field:
[[!FormIt?preHooks=`vcFormItGetUser`&hooks=`vcFormItSaveUser`&submitVar=`vc_user_form`&validate=`fullname:required,address:required,zip:required,state:required,country:required,city:required`&clearFieldsOnSuccess=`1`&store=`1`]] <form action="[[~[[*id]]]]" method="post"> <table> <tr> <td colspan="2"><strong>Shipping address</strong></td> <td colspan="2"><strong>Billing address</strong></td> </tr> <tr> <td><strong>Full name</strong></td> <td><input type="text" name="shipping_fullname" value="[[!+fi.shipping_fullname]]" /> [[+fi.error.shipping_fullname]]</td> <td><strong>Full name</strong></td> <td><input type="text" name="billing_fullname" value="[[!+fi.billing_fullname]]" /> [[+fi.error.billing_fullname]]</td> </tr> <tr> <td><strong>Adres</strong></td> <td><input type="text" name="shipping_address" value="[[!+fi.shipping_address]]" /> [[+fi.error.shipping_address]]</td> <td><strong>Adres</strong></td> <td><input type="text" name="billing_address" value="[[!+fi.billing_address]]" /> [[+fi.error.billing_address]]</td> </tr> <tr> <td><strong>Zip code</strong></td> <td><input type="text" name="shipping_zip" value="[[!+fi.shipping_zip]]" /> [[+fi.error.shipping_zip]]</td> <td><strong>Zip code</strong></td> <td><input type="text" name="billing_zip" value="[[!+fi.billing_zip]]" /> [[+fi.error.billing_zip]]</td> </tr> <tr> <td><strong>City</strong></td> <td><input type="text" name="shipping_city" value="[[!+fi.shipping_city]]" /> [[+fi.error.shipping_city]]</td> <td><strong>City</strong></td> <td><input type="text" name="billing_city" value="[[!+fi.billing_city]]" /> [[+fi.error.billing_city]]</td> </tr> <tr> <td><strong>State</strong></td> <td><input type="text" name="shipping_state" value="[[!+fi.shipping_state]]" /> [[+fi.error.shipping_state]]</td> <td><strong>State</strong></td> <td><input type="text" name="billing_state" value="[[!+fi.billing_state]]" /> [[+fi.error.billing_state]]</td> </tr> <tr> <td><strong>Country</strong></td> <td><input type="text" name="shipping_country" value="[[!+fi.shipping_country]]" /> [[+fi.error.shipping_country]]</td> <td><strong>Country</strong></td> <td><input type="text" name="billing_country" value="[[!+fi.billing_country]]" /> [[+fi.error.billing_country]]</td> </tr> <tr> <td colspan="2"><strong>Billing address same as shipping address</strong></td> <td colspan="2"><input type="checkbox" name="billing_as_shipping" value="1" [[!+fi.billing_as_shipping:FormItIsChecked=`1`]] /> (toggle)</td> </tr> <tr> <td colspan="4"><input type="submit" name="vc_user_form" value="Save" /> </tr> </table> </form>
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).