Member Accounts
Overview
CartThrob will both read and write member data to EE's member system. It can also create members during checkout or block purchases by guests. It also saves all orders and purchased item entries with the registered member set as the author. Using EE's built in member system, you can create member account areas, and control the flow of member registration and purchases.
Table of Contents
Saving Member Data
CartThrob stores customer data in temporary memory while a customer is going through the purchase process. If the customer is just a guest their entered data will be saved temporarily in the cart, and can be saved to the order entry. If the customer is logged in when they begin their purchase process, their member data will be used to preload their cart data. You can also optionally save any captured customer data directly to EE's member fields.
Setup
To read to and from EE's member data
- Create any EE member data fields you need to store customer information (name, address, city, state, zip)
- Go to CT's member settings and map CT's customer storage to EE's member fields
- On the same settings page, enable data saving to member fields.
When a member logs in during checkout, any customer information already entered will not be overwritten.
Creating Members
You can create members using EE's standard member system, or you can register users during checkout. CT's member settings respect your EE member settings. If you have auto-login enabled, when customer's register during checkout they will be automatically logged in. User data is only stored when an order is complete. If your user's transaction is not complete, their recently created account will be set to pending in EE's system until the transaction completes, or the member data is automatically deleted.
Please remember, if you are already logged in, you will not be able to register a new user, the "create_user
" parameter is ignored.
Ouputting data for the current member (creating an account page)
It's easy to output data that's been generated by the current user. Use the "CURRENT_USER
" constant in a channel entries loop to ouput purchases and orders for the current logged in user.
Example
{exp:channel:entries channel="orders" author_id="CURRENT_USER" }
Past order id: {title} {order_total}
{/exp:channel:entries}
Add-ons for member management
In addition to using EE's built in member module, CartThrob is also compatible with Solspace User, Zoo Visitor, and our own product Profile:Edit. When Profile:Edit is installed CartThrob will can save customer data to your member channel entries automatically, in similar fashion to how it works with EE's member system.