Properties

$id

$id : 

Type

$id_shop

$id_shop : 

Type

$id_shop_group

$id_shop_group : 

Type

$secure_key

$secure_key : string

Type

string — Secure key

$note

$note : string

Type

string — protected note

$id_gender

$id_gender : integer

Type

integer — Gender ID

$id_default_group

$id_default_group : integer

Type

integer — Default group ID

$id_lang

$id_lang : integer

Type

integer — Current language used by the customer

$lastname

$lastname : string

Type

string — Lastname

$firstname

$firstname : string

Type

string — Firstname

$birthday

$birthday : string

Type

string — Birthday (yyyy-mm-dd)

$email

$email : string

Type

string — e-mail

$newsletter

$newsletter : boolean

Type

boolean — Newsletter subscription

$ip_registration_newsletter

$ip_registration_newsletter : string

Type

string — Newsletter ip registration

$newsletter_date_add

$newsletter_date_add : string

Type

string — Newsletter ip registration

$optin

$optin : boolean

Type

boolean — Opt-in subscription

$website

$website : string

Type

string — WebSite *

$company

$company : string

Type

string — Company

$siret

$siret : string

Type

string — SIRET

$ape

$ape : string

Type

string — APE

$outstanding_allow_amount

$outstanding_allow_amount : float

Type

float — Outstanding allow amount (B2B opt)

$show_public_prices

$show_public_prices : integer

Type

integer — Show public prices (B2B opt)

$id_risk

$id_risk : integer

Type

integer — Risk ID (B2B opt)

$max_payment_days

$max_payment_days : integer

Type

integer — Max payment day

$passwd

$passwd : integer

Type

integer — Password

$last_passwd_gen

$last_passwd_gen : string

Type

string — Datetime Password

$active

$active : boolean

Type

boolean — Status

$is_guest

$is_guest : boolean

Type

boolean — Status

$deleted

$deleted : boolean

Type

boolean — True if carrier has been deleted (staying in database as deleted)

$date_add

$date_add : string

Type

string — Object creation date

$date_upd

$date_upd : string

Type

string — Object last modification date

$years

$years : 

Type

$days

$days : 

Type

$months

$months : 

Type

$geoloc_id_country

$geoloc_id_country : integer

Type

integer — customer id_country as determined by geolocation

$geoloc_id_state

$geoloc_id_state : integer

Type

integer — customer id_state as determined by geolocation

$geoloc_postcode

$geoloc_postcode : string

Type

string — customer postcode as determined by geolocation

$logged

$logged : boolean

Type

boolean — is the customer logged in

$id_guest

$id_guest : integer

Type

integer — id_guest meaning the guest table, not the guest customer

$groupBox

$groupBox : 

Type

$definition

$definition : 

Type

$webserviceParameters

$webserviceParameters : 

Type

$_defaultGroupId

$_defaultGroupId : 

Type

$_customerHasAddress

$_customerHasAddress : 

Type

$_customer_groups

$_customer_groups : 

Type

Methods

__construct()

__construct(  $id = null) 

Parameters

$id

add()

add(  $autodate = true,   $null_values = true) 

Parameters

$autodate
$null_values

update()

update(  $nullValues = false) 

Parameters

$nullValues

delete()

delete() 

getCustomers()

getCustomers() : array

Return customers list

Returns

array —

Customers

getByEmail()

getByEmail(string  $email, string  $passwd = null,   $ignore_guest = true) : \Customer

Return customer instance from its e-mail (optionnaly check password)

Parameters

string $email

e-mail

string $passwd

Password is also checked if specified

$ignore_guest

Returns

\Customer —

instance

getCustomersByEmail()

getCustomersByEmail(  $email) : array

Retrieve customers by email address

Parameters

$email

Returns

array

isBanned()

isBanned(  $id_customer) : boolean

Check id the customer is active or not

Parameters

$id_customer

Returns

boolean —

customer validity

customerExists()

customerExists(string  $email,   $return_id = false,   $ignore_guest = true) : \Customer

Check if e-mail is already registered in database

Parameters

string $email

e-mail

$return_id

boolean

$ignore_guest

boolean, to exclude guest customer

Returns

\Customer —

ID if found, false otherwise

customerHasAddress()

customerHasAddress(integer  $id_customer, integer  $id_address) : boolean

Check if an address is owned by a customer

Parameters

integer $id_customer

Customer ID

integer $id_address

Address ID

Returns

boolean —

result

resetAddressCache()

resetAddressCache(  $id_customer,   $id_address) 

Parameters

$id_customer
$id_address

getAddresses()

getAddresses(integer  $id_lang) : array

Return customer addresses

Parameters

integer $id_lang

Language ID

Returns

array —

Addresses

getAddressesTotalById()

getAddressesTotalById(integer  $id_customer) : integer

Count the number of addresses for a customer

Parameters

integer $id_customer

Customer ID

Returns

integer —

Number of addresses

checkPassword()

checkPassword(  $id_customer, string  $passwd) : boolean

Check if customer password is the right one

Parameters

$id_customer
string $passwd

Password

Returns

boolean —

result

searchByName()

searchByName(string  $query) : array

Light back office search for customers

Parameters

string $query

Searched string

Returns

array —

Corresponding customers

searchByIp()

searchByIp(string  $ip) 

Search for customers by ip address

Parameters

string $ip

Searched string

getStats()

getStats() : array

Return several useful statistics about customer

Returns

array —

Stats

getLastEmails()

getLastEmails() 

getLastConnections()

getLastConnections() 

customerIdExists()

customerIdExists(  $id_customer) 

Parameters

$id_customer

customerIdExistsStatic()

customerIdExistsStatic(  $id_customer) 

Parameters

$id_customer

updateGroup()

updateGroup(array  $list) 

Update customer groups associated to the object

Parameters

array $list

groups

cleanGroups()

cleanGroups() 

addGroups()

addGroups(  $groups) 

Parameters

$groups

getGroupsStatic()

getGroupsStatic(  $id_customer) 

Parameters

$id_customer

getGroups()

getGroups() 

isUsed()

isUsed() 

getBoughtProducts()

getBoughtProducts() 

getDefaultGroupId()

getDefaultGroupId(  $id_customer) 

Parameters

$id_customer

getCurrentCountry()

getCurrentCountry(  $id_customer, \Cart  $cart = null) 

Parameters

$id_customer
\Cart $cart

toggleStatus()

toggleStatus() 

isGuest()

isGuest() 

transformToCustomer()

transformToCustomer(  $id_lang,   $password = null) 

Parameters

$id_lang
$password

setWsPasswd()

setWsPasswd(  $passwd) 

Parameters

$passwd

isLogged()

isLogged(boolean  $with_guest = false) : boolean

Check customer informations and return customer validity

Parameters

boolean $with_guest

Returns

boolean —

customer validity

logout()

logout() 

Logout

mylogout()

mylogout() 

Soft logout, delete everything links to the customer but leave there affiliate's informations

getLastCart()

getLastCart(  $with_order = true) 

Parameters

$with_order

getOutstanding()

getOutstanding() 

getWsGroups()

getWsGroups() 

setWsGroups()

setWsGroups(  $result) 

Parameters

$result

getWebserviceObjectList()

getWebserviceObjectList(  $sql_join,   $sql_filter,   $sql_sort,   $sql_limit) 

Parameters

$sql_join
$sql_filter
$sql_sort
$sql_limit