This article outlines the database structure for the MMv4 customer database table.
- id
Primary Key of the table.
int(10) | unsigned | auto increment | primary key | indexed
- email
Email address associated with the customer account. Every customer record in the database must have a unique email address. Every customer account must have an email address associated with it.
varcahr(255) | indexed
- password
The password associated with the customer's account.
varchar(255) | encrypted
- bill_first_name
The first name associated with the customer's billing address.
varchar(255) | indexed
- bill_last_name
The last name associated with the customer's billing address.
varchar(255) | indexed
- bill_address_1
The first line of the billing address associated with the customer's account. Note: The name of this field has been changed from "bill_address1" in MMv3.
varchar(255) | indexed
- bill_address_2
The second line of the billing address associated with the customer's account. Note: The name of this field has been changed from "bill_address2" in MMv3.
varchar(255) | indexed
- bill_city
The city associated with the customer's billing address.
varcahr(255) | indexed
- bill_state
The two-character ISO code of the state associated with the customer's billing address, followed by the two-character ISO code of the country. For example, Oregon would be recorded as: OR_US.
varchar(255) | indexed
- bill_zip
The zip/postal code associated with the customer's billing address.
varchar(255) | indexed
- bill_country
The two-character ISO code of the country associated with the customer's billing address.
varchar(255) | indexed
- phone_ac
The area code associated with the customer's phone number.
varchar(255) | indexed
- phone
The customer's phone number.
varchar(255) | indexed
- active
If this field contains a value greater than zero, then the customer account is active. Only active customers may log in to their customer account area or place orders.
int(10) | unsigned | Values: 0/timestamp | Default: 1 | indexed
- use_prev_cc
If the value of this field equals the customer's System ID (SID) number, then the customer is eligible to view a list of their previously used credit cards on the storefront's checkout page. The presence of this credit card list will depend on how the HTML templates for the store's checkout pages are designed.
int(10) | unsigned
- has_tab
If this field contains a value greater than zero, then the customer has been granted a credit account, and may use it to place orders.
int(10) | unsigned | indexed
- tab_terms
The number of days after which an order placed by a customer using their credit account must be paid.
int(10) | unsigned | indexed
- tab_limit
The total dollar value that the customer may apply to their credit account.
double(16,2) | indexed
- tax_exempt
If this field contains a value greater than zero, then taxes will not be applied to the customer's order during the checkout process. This affects all orders; those placed in the storefront, Place an Order tool and the automated billing system.
int(10) | unsigned | indexed
- memo
External memo about the customer account. This memo may be displayed publicly in the storefront by using the specified QuickCode Tag(s).
text
- is_aff
Whether this customer is also an affiliate. All affiliates are also customers.
int(10) | unsigned | indexed
- aff_approved
Whether this affiliate has been approved by a store administrator to be an affiliate.
int(10) | unsigned | indexed
- aff_parent_tid
If the affiliate is a part of a multi-tired affiliate program, this will be which is the next step up the affiliate ladder.
int(10) | unsigned | indexed
- aff_company
The company name in which this affiliate is associated with.
varchar(255) | indexed
- aff_url
The full URL for this affiliate's website.
varchar(255) | indexed
- aff_fax
The fax number for this affiliate.
varchar(255) | indexed
- aff_payable_to
Where the payments will be sent to for this affiliate, an Individual, or a Company
char(1) | default: I | indexed
- aff_tax_class
The tax class for this affiliate, an Individual, Company, or Non-Profit.
char(1) | default: I | indexed
- aff_tax_id
The tax id for the
varchar(255) | indexed
- email_opt_in
If this field contains a value greater than zero, then the customer will receive emails generated by the software's bulk-email tools.
int(10) | unsigned | Values: 0/timestamp | Default: 1 | indexed
- email_bounces
The amount of times emails have bounced while trying to be sent to this customer.
int(10) | unsigned | indexed
- create_date
The date in which this customer was created.
int(10) | unsigned | Values: 0/timestamp | indexed
|