- Class name: CustomerCore
- Parent class: ObjectModel
- Source: classes/Customer.php line 28
- $_customerHasAddress
- $_customer_groups
- $_defaultGroupId
- $active
- $birthday
- $date_add
- $date_upd
- $days
- $deleted
- $fieldsRequired
- $fieldsSize
- $fieldsValidate
- $firstname
- $geoloc_id_country
- $geoloc_id_state
- $geoloc_postcode
- $id
- $id_default_group
- $id_gender
- $id_group_shop
- $id_guest
- $id_shop
- $identifier
- $ip_registration_newsletter
- $is_guest
- $last_passwd_gen
- $lastname
- $logged
- $months
- $newsletter
- $newsletter_date_add
- $note
- $optin
- $passwd
- $secure_key
- $table
- $tables
- $webserviceParameters
- $years
- $_cache
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSizeLang
- $fieldsValidateLang
- $id_lang
- $image_dir
- $image_format
- $langMultiShop
- __construct
- add
- addFieldsRequiredDatabase
- addGroups
- associateTo
- checkPassword
- cleanGroups
- clearCache
- customerExists
- customerHasAddress
- customerIdExists
- customerIdExistsStatic
- delete
- deleteImage
- deleteSelection
- displayFieldName
- duplicateShops
- existsInDatabase
- getAddresses
- getAddressesTotalById
- getBoughtProducts
- getByEmail
- getCurrentCountry
- getCustomers
- getDefaultGroupId
- getFields
- getFieldsRequiredDatabase
- getFieldsValidateLang
- getGroups
- getGroupsStatic
- getIdentifier
- getLastCart
- getLastConnections
- getStats
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- hydrate
- hydrateCollection
- isAssociatedToGroupShop
- isAssociatedToShop
- isBanned
- isCurrentlyUsed
- isGuest
- isLangMultishop
- isLogged
- isUsed
- logout
- makeTranslationFields
- mylogout
- resetAddressCache
- save
- searchByIp
- searchByName
- setWsPasswd
- toggleStatus
- transformToCustomer
- update
- validateControler
- validateController
- validateFields
- validateFieldsLang
protected mixed $_customerHasAddress = array()
- Visibility: protected
- This property is static.
- Source: classes/Customer.php line 147.
protected mixed $_customer_groups = array()
- Visibility: protected
- This property is static.
- Source: classes/Customer.php line 148.
protected mixed $_defaultGroupId = array()
- Visibility: protected
- This property is static.
- Source: classes/Customer.php line 146.
public boolean $active = true
- Visibility: public
- Source: classes/Customer.php line 79.
public string $birthday = null
- Visibility: public
- Source: classes/Customer.php line 55.
public string $date_add
- Visibility: public
- Source: classes/Customer.php line 88.
public string $date_upd
- Visibility: public
- Source: classes/Customer.php line 91.
public mixed $days
- Visibility: public
- Source: classes/Customer.php line 94.
public boolean $deleted
- Visibility: public
- Source: classes/Customer.php line 85.
public string $email
- Visibility: public
- Source: classes/Customer.php line 58.
protected mixed $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email')
- Visibility: protected
- Source: classes/Customer.php line 112.
protected mixed $fieldsSize = array('lastname' => 32, 'passwd' => 32, 'firstname' => 32, 'email' => 128, 'note' => 65000)
- Visibility: protected
- Source: classes/Customer.php line 113.
protected mixed $fieldsValidate = array('secure_key' => 'isMd5', 'lastname' => 'isName', 'firstname' => 'isName', 'email' => 'isEmail', 'passwd' => 'isPasswd', 'id_gender' => 'isUnsignedId', 'birthday' => 'isBirthDate', 'newsletter' => 'isBool', 'optin' => 'isBool', 'active' => 'isBool', 'note' => 'isCleanHtml', 'is_guest' => 'isBool', 'id_shop' => 'isUnsignedId', 'id_group_shop' => 'isUnsignedId')
- Visibility: protected
- Source: classes/Customer.php line 114.
public string $firstname
- Visibility: public
- Source: classes/Customer.php line 52.
public integer $geoloc_id_country
- Visibility: public
- Source: classes/Customer.php line 98.
public integer $geoloc_id_state
- Visibility: public
- Source: classes/Customer.php line 100.
public string $geoloc_postcode
- Visibility: public
- Source: classes/Customer.php line 102.
public mixed $id
- Visibility: public
- Source: classes/Customer.php line 30.
public integer $id_default_group = _PS_DEFAULT_CUSTOMER_GROUP_
- Visibility: public
- Source: classes/Customer.php line 46.
public integer $id_gender
- Visibility: public
- Source: classes/Customer.php line 43.
public mixed $id_group_shop
- Visibility: public
- Source: classes/Customer.php line 34.
public integer $id_guest
- Visibility: public
- Source: classes/Customer.php line 108.
public mixed $id_shop
- Visibility: public
- Source: classes/Customer.php line 32.
protected mixed $identifier = 'id_customer'
- Visibility: protected
- Source: classes/Customer.php line 144.
public string $ip_registration_newsletter
- Visibility: public
- Source: classes/Customer.php line 64.
public boolean $is_guest
- Visibility: public
- Source: classes/Customer.php line 82.
public \datetime $last_passwd_gen
- Visibility: public
- Source: classes/Customer.php line 76.
public string $lastname
- Visibility: public
- Source: classes/Customer.php line 49.
public boolean $logged
- Visibility: public
- Source: classes/Customer.php line 105.
public mixed $months
- Visibility: public
- Source: classes/Customer.php line 95.
public boolean $newsletter
- Visibility: public
- Source: classes/Customer.php line 61.
public string $newsletter_date_add
- Visibility: public
- Source: classes/Customer.php line 67.
public string $note
- Visibility: public
- Source: classes/Customer.php line 40.
public boolean $optin
- Visibility: public
- Source: classes/Customer.php line 70.
public integer $passwd
- Visibility: public
- Source: classes/Customer.php line 73.
public string $secure_key
- Visibility: public
- Source: classes/Customer.php line 37.
protected mixed $table = 'customer'
- Visibility: protected
- Source: classes/Customer.php line 143.
protected mixed $tables = array('customer')
- Visibility: protected
- Source: classes/Customer.php line 110.
protected mixed $webserviceParameters = array('fields' => array('id_default_group' => array('xlink_resource' => 'groups'), 'newsletter_date_add' => array(), 'ip_registration_newsletter' => array(), 'last_passwd_gen' => array('setter' => null), 'secure_key' => array('setter' => null), 'deleted' => array(), 'passwd' => array('setter' => 'setWsPasswd')))
- Visibility: protected
- Source: classes/Customer.php line 131.
public mixed $years
- Visibility: public
- Source: classes/Customer.php line 93.
protected mixed $_cache = array()
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 75.
protected \fieldsRequiredDatabase $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 50.
protected array $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 59.
protected array $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 62.
protected array $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 65.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 34.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 78.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 81.
protected mixed $langMultiShop = false
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
mixed ObjectModelCore::__construct(integer $id, integer $id_lang, $id_shop)
Build object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 115
- $id integer - Existing object id in order to load object (optional)
- $id_lang integer - Required if object is multilingual (optional)
- $id_shop mixed
mixed CustomerCore::add($autodate, $null_values)
- Visibility: public
- Source: classes/Customer.php line 180
- $autodate mixed
- $null_values mixed
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 780
- $fields mixed
mixed CustomerCore::addGroups($groups)
- Visibility: public
- Source: classes/Customer.php line 507
- $groups mixed
boolean ObjectModelCore::associateTo(integer|array $id_shops, string $type)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 828
- $id_shops integer|array
- $type string
boolean CustomerCore::checkPassword($id_customer, string $passwd)
Check if customer password is the right one
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 389
- $id_customer mixed
- $passwd string - Password
mixed CustomerCore::cleanGroups()
- Visibility: public
- Source: classes/Customer.php line 502
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 794
- $all mixed
\Customer CustomerCore::customerExists(string $email, $return_id, $ignore_guest, \Shop $shop)
Check if e-mail is already registered in database
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 303
- $email string - e-mail
- $return_id mixed - boolean
- $ignore_guest mixed - boolean, to exclude guest customer
- $shop Shop
boolean CustomerCore::customerHasAddress(integer $id_customer, integer $id_address)
Check if an address is owned by a customer
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 330
- $id_customer integer - Customer ID
- $id_address integer - Address ID
mixed CustomerCore::customerIdExists($id_customer)
- Visibility: public
- Source: classes/Customer.php line 487
- $id_customer mixed
mixed CustomerCore::customerIdExistsStatic($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 492
- $id_customer mixed
mixed CustomerCore::delete()
- Visibility: public
- Source: classes/Customer.php line 210
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 898
mixed ObjectModelCore::deleteSelection($selection)
Delete several objects from database
return boolean Deletion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 387
- $selection mixed
mixed ObjectModelCore::displayFieldName($field, $className, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 558
- $field mixed
- $className mixed
- $htmlentities mixed
- $context Context
mixed ObjectModelCore::duplicateShops($id)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 868
- $id mixed
boolean ObjectModelCore::existsInDatabase($id_entity, $table)
Specify if an ObjectModel is already in database
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 931
- $id_entity mixed - entity id
- $table mixed
array CustomerCore::getAddresses(integer $id_lang)
Return customer addresses
- Visibility: public
- Source: classes/Customer.php line 356
- $id_lang integer - Language ID
integer CustomerCore::getAddressesTotalById(integer $id_customer)
Count the number of addresses for a customer
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 373
- $id_customer integer - Customer ID
mixed CustomerCore::getBoughtProducts()
- Visibility: public
- Source: classes/Customer.php line 555
\Customer CustomerCore::getByEmail(string $email, string $passwd, \Shop $shop)
Return customer instance from its e-mail (optionnaly check password)
- Visibility: public
- Source: classes/Customer.php line 247
- $email string - e-mail
- $passwd string - Password is also checked if specified
- $shop Shop
mixed CustomerCore::getCurrentCountry($id_customer, \Cart $cart)
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 577
- $id_customer mixed
- $cart Cart
array CustomerCore::getCustomers(\Shop $shop)
Return customers list
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 228
- $shop Shop
mixed CustomerCore::getDefaultGroupId($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 563
- $id_customer mixed
mixed CustomerCore::getFields()
- Visibility: public
- Source: classes/Customer.php line 150
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 772
- $all mixed
array ObjectModelCore::getFieldsValidateLang()
Get list of fields related to language to validate
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 975
mixed CustomerCore::getGroups()
- Visibility: public
- Source: classes/Customer.php line 545
mixed CustomerCore::getGroupsStatic($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 527
- $id_customer mixed
string ObjectModelCore::getIdentifier()
Get object identifier name
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 964
mixed CustomerCore::getLastCart()
- Visibility: public
- Source: classes/Customer.php line 701
mixed CustomerCore::getLastConnections()
- Visibility: public
- Source: classes/Customer.php line 467
array CustomerCore::getStats()
Return several useful statistics about customer
- Visibility: public
- Source: classes/Customer.php line 443
mixed ObjectModelCore::getTranslationsFields(array $fieldsArray)
Prepare multilingual fields for database insertion
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 430
- $fieldsArray array - Multilingual fields to prepare return array Prepared fields for database insertion
array ObjectModelCore::getValidationRules(string $className)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 89
- $className string - Child class name for static use (optional)
mixed ObjectModelCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 747
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($wsParamsAttributeName)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 617
- $wsParamsAttributeName mixed
mixed ObjectModelCore::hydrate(array $data, integer $id_lang)
Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 987
- $data array
- $id_lang integer
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $id_lang)
Fill (hydrate) a list of objects in order to get a collection of these objects
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1006
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer
boolean ObjectModelCore::isAssociatedToGroupShop(integer $id_group_shop)
Check if current object is associated to a group shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 854
- $id_group_shop integer
boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)
Check if current object is associated to a shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 809
- $id_shop integer
boolean CustomerCore::isBanned($id_customer)
Check id the customer is active or not
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 280
- $id_customer mixed
boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)
This method is allow to know if a entity is currently used
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 948
- $table string - name of table linked to entity
- $has_active_column boolean - true if the table has an active column
mixed CustomerCore::isGuest()
- Visibility: public
- Source: classes/Customer.php line 606
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 888
boolean CustomerCore::isLogged(boolean $with_guest)
Check customer informations and return customer validity
- Visibility: public
- Source: classes/Customer.php line 665
- $with_guest boolean
mixed CustomerCore::isUsed()
- Visibility: public
- Source: classes/Customer.php line 550
mixed CustomerCore::logout()
Logout
- Visibility: public
- Source: classes/Customer.php line 681
mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 447
- $fields mixed
- $fieldsArray mixed
- $id_language mixed
mixed CustomerCore::mylogout()
Soft logout, delete everything links to the customer but leave there affiliate's informations
- Visibility: public
- Source: classes/Customer.php line 694
mixed CustomerCore::resetAddressCache($id_customer)
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 344
- $id_customer mixed
mixed ObjectModelCore::save($nullValues, $autodate)
Save current object to database (add or update)
return boolean Insertion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 192
- $nullValues mixed
- $autodate mixed
mixed CustomerCore::searchByIp(string $ip)
Search for customers by ip address
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 428
- $ip string - Searched string
array CustomerCore::searchByName(string $query, \Shop $shop)
Light back office search for customers
- Visibility: public
- This method is static.
- Source: classes/Customer.php line 407
- $query string - Searched string
- $shop Shop
mixed CustomerCore::setWsPasswd($passwd)
- Visibility: public
- Source: classes/Customer.php line 646
- $passwd mixed
mixed CustomerCore::toggleStatus()
- Visibility: public
- Source: classes/Customer.php line 594
mixed CustomerCore::transformToCustomer($id_lang, $password)
- Visibility: public
- Source: classes/Customer.php line 611
- $id_lang mixed
- $password mixed
mixed CustomerCore::update($nullValues)
- Visibility: public
- Source: classes/Customer.php line 202
- $nullValues mixed
mixed ObjectModelCore::validateControler($htmlentities)
TODO: refactor rename all calls to this to validateController
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 571
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 577
- $htmlentities mixed
mixed ObjectModelCore::validateFields($die, $errorReturn)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 481
- $die mixed
- $errorReturn mixed
mixed ObjectModelCore::validateFieldsLang($die, $errorReturn)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 514
- $die mixed
- $errorReturn mixed