Mage_Customer_Model_Convert_Adapter_Customer Class Reference

Inheritance diagram for Mage_Customer_Model_Convert_Adapter_Customer:

Mage_Eav_Model_Convert_Adapter_Entity Mage_Dataflow_Model_Convert_Adapter_Abstract Mage_Dataflow_Model_Convert_Container_Abstract Mage_Dataflow_Model_Convert_Adapter_Interface Mage_Dataflow_Model_Convert_Container_Interface

List of all members.

Public Member Functions

 getCustomerModel ()
 getBillingAddressModel ()
 getShippingAddressModel ()
 getStoreByCode ($store)
 getWebsiteByCode ($websiteCode)
 getAttribute ($code)
 getRegionId ($country, $regionName)
 getCustomerGoups ()
 __construct ()
 load ()
 parse ()
 setCustomer (Mage_Customer_Model_Customer $customer)
 getCustomer ()
 save ()
 saveRow ($importData)
 getCustomerId ()
 saveRow__OLD ()

Public Attributes

const MULTI_DELIMITER = ' , '

Protected Attributes

 $_customerModel
 $_stores
 $_attributes = array()
 $_customerGroups
 $_billingAddressModel
 $_shippingAddressModel
 $_requiredFields = array()
 $_ignoreFields = array()
 $_billingFields = array()
 $_billingMappedFields = array()
 $_billingStreetFields = array()
 $_billingRequiredFields = array()
 $_shippingFields = array()
 $_shippingMappedFields = array()
 $_shippingStreetFields = array()
 $_shippingRequiredFields = array()
 $_addressFields = array()
 $_regions
 $_websites
 $_customer = null
 $_address = null
 $_customerId = ''


Detailed Description

Definition at line 29 of file Customer.php.


Constructor & Destructor Documentation

__construct (  ) 

Definition at line 218 of file Customer.php.

00219     {
00220         $this->setVar('entity_type', 'customer/customer');
00221 
00222         if (!Mage::registry('Object_Cache_Customer')) {
00223             $this->setCustomer(Mage::getModel('customer/customer'));
00224         }
00225         //$this->setAddress(Mage::getModel('catalog/'))
00226 
00227         foreach (Mage::getConfig()->getFieldset('customer_dataflow', 'admin') as $code=>$node) {
00228             if ($node->is('ignore')) {
00229                 $this->_ignoreFields[] = $code;
00230             }
00231             if ($node->is('billing')) {
00232                 $this->_billingFields[] = 'billing_'.$code;
00233             }
00234             if ($node->is('shipping')) {
00235                 $this->_shippingFields[] = 'shipping_'.$code;
00236             }
00237 
00238             if ($node->is('billing') && $node->is('shipping')) {
00239                 $this->_addressFields[] = $code;
00240             }
00241 
00242             if ($node->is('mapped') || $node->is('billing_mapped')) {
00243                 $this->_billingMappedFields['billing_'.$code] = $code;
00244             }
00245             if ($node->is('mapped') || $node->is('shipping_mapped')) {
00246                 $this->_shippingMappedFields['shipping_'.$code] = $code;
00247             }
00248             if ($node->is('street')) {
00249                 $this->_billingStreetFields[] = 'billing_'.$code;
00250                 $this->_shippingStreetFields[] = 'shipping_'.$code;
00251             }
00252             if ($node->is('required')) {
00253                 $this->_requiredFields[] = $code;
00254             }
00255             if ($node->is('billing_required')) {
00256                 $this->_billingRequiredFields[] = 'billing_'.$code;
00257             }
00258             if ($node->is('shipping_required')) {
00259                 $this->_shippingRequiredFields[] = 'shipping_'.$code;
00260             }
00261         }
00262     }


Member Function Documentation

getAttribute ( code  ) 

Retrieve eav entity attribute model

Parameters:
string $code
Returns:
Mage_Eav_Model_Entity_Attribute

Definition at line 159 of file Customer.php.

00160     {
00161         if (!isset($this->_attributes[$code])) {
00162             $this->_attributes[$code] = $this->getCustomerModel()->getResource()->getAttribute($code);
00163         }
00164         return $this->_attributes[$code];
00165     }

getBillingAddressModel (  ) 

Retrieve customer address model cache

Returns:
Mage_Customer_Model_Address

Definition at line 96 of file Customer.php.

00097     {
00098         if (is_null($this->_billingAddressModel)) {
00099             $object = Mage::getModel('customer/address');
00100             $this->_billingAddressModel = Mage::objects()->save($object);
00101         }
00102         return Mage::objects()->load($this->_billingAddressModel);
00103     }

getCustomer (  ) 

Definition at line 349 of file Customer.php.

00350     {
00351         return Mage::objects()->load(Mage::registry('Object_Cache_Customer'));
00352     }

getCustomerGoups (  ) 

Retrieve customer group collection array

Returns:
array

Definition at line 202 of file Customer.php.

00203     {
00204         if (is_null($this->_customerGroups)) {
00205             $this->_customerGroups = array();
00206             $collection = Mage::getModel('customer/group')
00207                 ->getCollection()
00208                 ->addFieldToFilter('customer_group_id', array('gt'=> 0));
00209             foreach ($collection as $group) {
00210                 $this->_customerGroups[$group->getCustomerGroupCode()] = $group->getId();
00211             }
00212         }
00213         return $this->_customerGroups;
00214     }

getCustomerId (  ) 

Definition at line 709 of file Customer.php.

00710     {
00711         return $this->_customerId;
00712     }

getCustomerModel (  ) 

Retrieve customer model cache

Returns:
Mage_Customer_Model_Customer

Definition at line 82 of file Customer.php.

00083     {
00084         if (is_null($this->_customerModel)) {
00085             $object = Mage::getModel('customer/customer');
00086             $this->_customerModel = Mage::objects()->save($object);
00087         }
00088         return Mage::objects()->load($this->_customerModel);
00089     }

getRegionId ( country,
regionName 
)

Retrieve region id by country code and region name (if exists)

Parameters:
string $country
string $region
Returns:
int

Definition at line 174 of file Customer.php.

00175     {
00176         if (is_null($this->_regions)) {
00177             $this->_regions = array();
00178 
00179             $collection = Mage::getModel('directory/region')
00180                 ->getCollection();
00181             foreach ($collection as $region) {
00182                 if (!isset($this->_regions[$region->getCountryId()])) {
00183                     $this->_regions[$region->getCountryId()] = array();
00184                 }
00185 
00186                 $this->_regions[$region->getCountryId()][$region->getDefaultName()] = $region->getId();
00187             }
00188         }
00189 
00190         if (isset($this->_regions[$country][$regionName])) {
00191             return $this->_regions[$country][$regionName];
00192         }
00193 
00194         return 0;
00195     }

getShippingAddressModel (  ) 

Retrieve customer address model cache

Returns:
Mage_Customer_Model_Address

Definition at line 110 of file Customer.php.

00111     {
00112         if (is_null($this->_shippingAddressModel)) {
00113             $object = Mage::getModel('customer/address');
00114             $this->_shippingAddressModel = Mage::objects()->save($object);
00115         }
00116         return Mage::objects()->load($this->_shippingAddressModel);
00117     }

getStoreByCode ( store  ) 

Retrieve store object by code

Parameters:
string $store
Returns:
Mage_Core_Model_Store

Definition at line 125 of file Customer.php.

00126     {
00127         if (is_null($this->_stores)) {
00128             $this->_stores = Mage::app()->getStores(true, true);
00129         }
00130         if (isset($this->_stores[$store])) {
00131             return $this->_stores[$store];
00132         }
00133         return false;
00134     }

getWebsiteByCode ( websiteCode  ) 

Retrieve website model by code

Parameters:
int $websiteId
Returns:
Mage_Core_Model_Website

Definition at line 142 of file Customer.php.

00143     {
00144         if (is_null($this->_websites)) {
00145             $this->_websites = Mage::app()->getWebsites(true, true);
00146         }
00147         if (isset($this->_websites[$websiteCode])) {
00148             return $this->_websites[$websiteCode];
00149         }
00150         return false;
00151     }

load (  ) 

Reimplemented from Mage_Eav_Model_Convert_Adapter_Entity.

Definition at line 264 of file Customer.php.

00265     {
00266         $addressType = $this->getVar('filter/addressType');
00267         if ($addressType=='both') {
00268            $addressType = array('default_billing','default_shipping');
00269         }
00270         $attrFilterArray = array();
00271         $attrFilterArray ['firstname']                  = 'like';
00272         $attrFilterArray ['lastname']                   = 'like';
00273         $attrFilterArray ['email']                      = 'like';
00274         $attrFilterArray ['group']                      = 'eq';
00275         $attrFilterArray ['customer_address/telephone'] = array(
00276             'type'  => 'like',
00277             'bind'  => $addressType
00278         );
00279         $attrFilterArray ['customer_address/postcode']  = array(
00280             'type'  => 'like',
00281             'bind'  => $addressType
00282         );
00283         $attrFilterArray ['customer_address/country']   = array(
00284             'type'  => 'eq',
00285             'bind'  => $addressType
00286         );
00287         $attrFilterArray ['customer_address/region']    = array(
00288             'type'  => 'like',
00289             'bind'  => $addressType
00290         );
00291         $attrFilterArray ['created_at']                 = 'datetimeFromTo';
00292 
00293         /*
00294          * Fixing date filter from and to
00295          */
00296         if ($var = $this->getVar('filter/created_at/from')) {
00297             $this->setVar('filter/created_at/from', $var . ' 00:00:00');
00298         }
00299 
00300         if ($var = $this->getVar('filter/created_at/to')) {
00301             $this->setVar('filter/created_at/to', $var . ' 23:59:59');
00302         }
00303 
00304         $attrToDb = array(
00305             'group'                     => 'group_id',
00306             'customer_address/country'  => 'customer_address/country_id',
00307         );
00308 
00309         // Added store filter
00310         if ($storeId = $this->getStoreId()) {
00311             $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
00312             if ($websiteId) {
00313                 $this->_filter[] = array(
00314                     'attribute' => 'website_id',
00315                     'eq'        => $websiteId
00316                 );
00317             }
00318         }
00319 
00320         parent::setFilter($attrFilterArray, $attrToDb);
00321         return parent::load();
00322     }

parse (  ) 

Not use :(

Definition at line 327 of file Customer.php.

00328     {
00329         $batchModel = Mage::getSingleton('dataflow/batch');
00330         /* @var $batchModel Mage_Dataflow_Model_Batch */
00331 
00332         $batchImportModel = $batchModel->getBatchImportModel();
00333         $importIds = $batchImportModel->getIdCollection();
00334 
00335         foreach ($importIds as $importId) {
00336             $batchImportModel->load($importId);
00337             $importData = $batchImportModel->getBatchData();
00338 
00339             $this->saveRow($importData);
00340         }
00341     }

save (  ) 

Reimplemented from Mage_Eav_Model_Convert_Adapter_Entity.

Definition at line 354 of file Customer.php.

00355     {
00356         $stores = array();
00357         foreach (Mage::getConfig()->getNode('stores')->children() as $storeNode) {
00358             $stores[(int)$storeNode->system->store->id] = $storeNode->getName();
00359         }
00360 
00361         $collections = $this->getData();
00362         if ($collections instanceof Mage_Customer_Model_Entity_Customer_Collection) {
00363             $collections = array($collections->getEntity()->getStoreId()=>$collections);
00364         } elseif (!is_array($collections)) {
00365             $this->addException(Mage::helper('customer')->__('No product collections found'), Mage_Dataflow_Model_Convert_Exception::FATAL);
00366         }
00367 
00368         foreach ($collections as $storeId=>$collection) {
00369             $this->addException(Mage::helper('customer')->__('Records for "'.$stores[$storeId].'" store found'));
00370 
00371             if (!$collection instanceof Mage_Customer_Model_Entity_Customer_Collection) {
00372                 $this->addException(Mage::helper('customer')->__('Customer collection expected'), Mage_Dataflow_Model_Convert_Exception::FATAL);
00373             }
00374             try {
00375                 $i = 0;
00376                 foreach ($collection->getIterator() as $model) {
00377                     $new = false;
00378                     // if product is new, create default values first
00379                     if (!$model->getId()) {
00380                         $new = true;
00381                         $model->save();
00382                         #Mage::getResourceSingleton('catalog_entity/convert')->addProductToStore($model->getId(), 0);
00383                     }
00384                     if (!$new || 0!==$storeId) {
00385 
00386 //                        if (0!==$storeId) {
00387 //                            Mage::getResourceSingleton('catalog_entity/convert')->addProductToStore($model->getId(), $storeId);
00388 //                        }
00389 
00390                         $model->save();
00391                     }
00392                     $i++;
00393                 }
00394                 $this->addException(Mage::helper('customer')->__("Saved ".$i." record(s)"));
00395             } catch (Exception $e) {
00396                 if (!$e instanceof Mage_Dataflow_Model_Convert_Exception) {
00397                     $this->addException(Mage::helper('customer')->__('Problem saving the collection, aborting. Error: %s', $e->getMessage()),
00398                         Mage_Dataflow_Model_Convert_Exception::FATAL);
00399                 }
00400             }
00401         }
00402         return $this;
00403     }

saveRow ( importData  ) 

Check customer group

Check customer group

Check Billing address required fields

Check Sipping address required fields

Check addresses

Import billing address

Import shipping address

Definition at line 411 of file Customer.php.

00412     {
00413         $customer = $this->getCustomerModel();
00414         $customer->setId(null);
00415         $customer->setImportMode(true);
00416 
00417         if (empty($importData['website'])) {
00418             $message = Mage::helper('customer')->__('Skip import row, required field "%s" not defined', 'website');
00419             Mage::throwException($message);
00420         }
00421 
00422         $website = $this->getWebsiteByCode($importData['website']);
00423 
00424         if ($website === false) {
00425             $message = Mage::helper('customer')->__('Skip import row, website "%s" field not exists', $importData['website']);
00426             Mage::throwException($message);
00427         }
00428         if (empty($importData['email'])) {
00429             $message = Mage::helper('customer')->__('Skip import row, required field "%s" not defined', 'email');
00430             Mage::throwException($message);
00431         }
00432 
00433         $customer->setWebsiteId($website->getId())
00434             ->loadByEmail($importData['email']);
00435         if (!$customer->getId()) {
00436             $customerGroups = $this->getCustomerGoups();
00437             /**
00438              * Check customer group
00439              */
00440             if (empty($importData['group_id']) || !isset($customerGroups[$importData['group_id']])) {
00441                 $value = isset($importData['group_id']) ? $importData['group_id'] : '';
00442                 $message = Mage::helper('catalog')->__('Skip import row, is not valid value "%s" for field "%s"', $value, 'group_id');
00443                 Mage::throwException($message);
00444             }
00445             $customer->setGroupId($customerGroups[$importData['group_id']]);
00446 
00447             foreach ($this->_requiredFields as $field) {
00448                 if (!isset($importData[$field])) {
00449                     $message = Mage::helper('catalog')->__('Skip import row, required field "%s" for new customer not defined', $field);
00450                     Mage::throwException($message);
00451                 }
00452             }
00453 
00454             $customer->setWebsiteId($website->getId());
00455 
00456             if (empty($importData['created_in']) || !$this->getStoreByCode($importData['created_in'])) {
00457                 $customer->setStoreId(0);
00458             }
00459             else {
00460                 $customer->setStoreId($this->getStoreByCode($importData['created_in'])->getId());
00461             }
00462 
00463             if (empty($importData['password_hash'])) {
00464                 $customer->setPasswordHash($customer->hashPassword($customer->generatePassword(8)));
00465             }
00466         }
00467         elseif (!empty($importData['group_id'])) {
00468             $customerGroups = $this->getCustomerGoups();
00469             /**
00470              * Check customer group
00471              */
00472             if (isset($customerGroups[$importData['group_id']])) {
00473                 $customer->setGroupId($customerGroups[$importData['group_id']]);
00474             }
00475         }
00476 
00477         foreach ($this->_ignoreFields as $field) {
00478             if (isset($importData[$field])) {
00479                 unset($importData[$field]);
00480             }
00481         }
00482 
00483         foreach ($importData as $field => $value) {
00484             if (in_array($field, $this->_billingFields)) {
00485                 continue;
00486             }
00487             if (in_array($field, $this->_shippingFields)) {
00488                 continue;
00489             }
00490 
00491             $attribute = $this->getAttribute($field);
00492             if (!$attribute) {
00493                 continue;
00494             }
00495 
00496             $isArray = false;
00497             $setValue = $value;
00498 
00499             if ($attribute->getFrontendInput() == 'multiselect') {
00500                 $value = split(self::MULTI_DELIMITER, $value);
00501                 $isArray = true;
00502                 $setValue = array();
00503             }
00504 
00505             if ($attribute->usesSource()) {
00506                 $options = $attribute->getSource()->getAllOptions(false);
00507 
00508                 if ($isArray) {
00509                     foreach ($options as $item) {
00510                         if (in_array($item['label'], $value)) {
00511                             $setValue[] = $item['value'];
00512                         }
00513                     }
00514                 }
00515                 else {
00516                     $setValue = null;
00517                     foreach ($options as $item) {
00518                         if ($item['label'] == $value) {
00519                             $setValue = $item['value'];
00520                         }
00521                     }
00522                 }
00523             }
00524 
00525             $customer->setData($field, $setValue);
00526         }
00527 
00528         if (isset($importData['is_subscribed'])) {
00529             $customer->setData('is_subscribed', $importData['is_subscribed']);
00530         }
00531 
00532         $importBillingAddress = $importShippingAddress = true;
00533         $savedBillingAddress = $savedShippingAddress = false;
00534 
00535         /**
00536          * Check Billing address required fields
00537          */
00538         foreach ($this->_billingRequiredFields as $field) {
00539             if (empty($importData[$field])) {
00540                 $importBillingAddress = false;
00541             }
00542         }
00543 
00544         /**
00545          * Check Sipping address required fields
00546          */
00547         foreach ($this->_shippingRequiredFields as $field) {
00548             if (empty($importData[$field])) {
00549                 $importShippingAddress = false;
00550             }
00551         }
00552 
00553         $onlyAddress = false;
00554 
00555         /**
00556          * Check addresses
00557          */
00558         if ($importBillingAddress && $importShippingAddress) {
00559             $onlyAddress = true;
00560             foreach ($this->_addressFields as $field) {
00561                 if (!isset($importData['billing_'.$field]) && !isset($importData['shipping_'.$field])) {
00562                     continue;
00563                 }
00564                 if (!isset($importData['billing_'.$field]) || !isset($importData['shipping_'.$field])) {
00565                     $onlyAddress = false;
00566                     break;
00567                 }
00568                 if ($importData['billing_'.$field] != $importData['shipping_'.$field]) {
00569                     $onlyAddress = false;
00570                     break;
00571                 }
00572             }
00573 
00574             if ($onlyAddress) {
00575                 $importShippingAddress = false;
00576             }
00577         }
00578 
00579         /**
00580          * Import billing address
00581          */
00582         if ($importBillingAddress) {
00583             $billingAddress = $this->getBillingAddressModel();
00584             if ($customer->getDefaultBilling()) {
00585                 $billingAddress->load($customer->getDefaultBilling());
00586             }
00587             else {
00588                 $billingAddress->setData(array());
00589             }
00590 
00591             foreach ($this->_billingFields as $field) {
00592                 $cleanField = Mage::helper('core/string')->substr($field, 8);
00593 
00594                 if (isset($importData[$field])) {
00595                     $billingAddress->setDataUsingMethod($cleanField, $importData[$field]);
00596                 }
00597                 elseif (isset($this->_billingMappedFields[$field])
00598                     && isset($importData[$this->_billingMappedFields[$field]])) {
00599                     $billingAddress->setDataUsingMethod($cleanField, $importData[$this->_billingMappedFields[$field]]);
00600                 }
00601             }
00602 
00603             $street = array();
00604             foreach ($this->_billingStreetFields as $field) {
00605                 if (!empty($importData[$field])) {
00606                     $street[] = $importData[$field];
00607                 }
00608             }
00609             if ($street) {
00610                 $billingAddress->setDataUsingMethod('street', $street);
00611             }
00612 
00613             $billingAddress->setCountryId($importData['billing_country']);
00614             $regionName = isset($importData['billing_region']) ? $importData['billing_region'] : '';
00615             if ($regionName) {
00616                 $regionId = $this->getRegionId($importData['billing_country'], $regionName);
00617                 $billingAddress->setRegionId($regionId);
00618             }
00619 
00620             if ($customer->getId()) {
00621                 $billingAddress->setCustomerId($customer->getId());
00622 
00623                 $billingAddress->save();
00624                 $customer->setDefaultBilling($billingAddress->getId());
00625 
00626                 if ($onlyAddress) {
00627                     $customer->setDefaultShipping($billingAddress->getId());
00628                 }
00629 
00630                 $savedBillingAddress = true;
00631             }
00632         }
00633 
00634         /**
00635          * Import shipping address
00636          */
00637         if ($importShippingAddress) {
00638             $shippingAddress = $this->getShippingAddressModel();
00639             if ($customer->getDefaultShipping() && $customer->getDefaultBilling() != $customer->getDefaultShipping()) {
00640                 $shippingAddress->load($customer->getDefaultShipping());
00641             }
00642             else {
00643                 $shippingAddress->setData(array());
00644             }
00645 
00646             foreach ($this->_shippingFields as $field) {
00647                 $cleanField = Mage::helper('core/string')->substr($field, 9);
00648 
00649                 if (isset($importData[$field])) {
00650                     $shippingAddress->setDataUsingMethod($cleanField, $importData[$field]);
00651                 }
00652                 elseif (isset($this->_shippingMappedFields[$field])
00653                     && isset($importData[$this->_shippingMappedFields[$field]])) {
00654                     $shippingAddress->setDataUsingMethod($cleanField, $importData[$this->_shippingMappedFields[$field]]);
00655                 }
00656             }
00657 
00658             $street = array();
00659             foreach ($this->_shippingStreetFields as $field) {
00660                 if (!empty($importData[$field])) {
00661                     $street[] = $importData[$field];
00662                 }
00663             }
00664             if ($street) {
00665                 $shippingAddress->setDataUsingMethod('street', $street);
00666             }
00667 
00668             $shippingAddress->setCountryId($importData['shipping_country']);
00669             $regionName = isset($importData['shipping_region']) ? $importData['shipping_region'] : '';
00670             if ($regionName) {
00671                 $regionId = $this->getRegionId($importData['shipping_country'], $regionName);
00672                 $shippingAddress->setRegionId($regionId);
00673             }
00674 
00675             if ($customer->getId()) {
00676                 $shippingAddress->setCustomerId($customer->getId());
00677                 $shippingAddress->save();
00678                 $customer->setDefaultShipping($shippingAddress->getId());
00679 
00680                 $savedShippingAddress = true;
00681             }
00682         }
00683 
00684         $customer->save();
00685         $saveCustomer = false;
00686 
00687         if ($importBillingAddress && !$savedBillingAddress) {
00688             $saveCustomer = true;
00689             $billingAddress->setCustomerId($customer->getId());
00690             $billingAddress->save();
00691             $customer->setDefaultBilling($billingAddress->getId());
00692             if ($onlyAddress) {
00693                 $customer->setDefaultShipping($billingAddress->getId());
00694             }
00695         }
00696         if ($importShippingAddress && !$savedShippingAddress) {
00697             $saveCustomer = true;
00698             $shippingAddress->setCustomerId($customer->getId());
00699             $shippingAddress->save();
00700             $customer->setDefaultShipping($shippingAddress->getId());
00701         }
00702         if ($saveCustomer) {
00703             $customer->save();
00704         }
00705 
00706         return $this;
00707     }

saveRow__OLD (  ) 

Definition at line 716 of file Customer.php.

00717     {
00718 
00719         $mem = memory_get_usage(); $origMem = $mem; $memory = $mem;
00720         $customer = $this->getCustomer();
00721         @set_time_limit(240);
00722         $row = $args;
00723         $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;
00724         $customer->importFromTextArray($row);
00725 
00726         if (!$customer->getData()) {
00727             return;
00728         }
00729 
00730         $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;
00731         try {
00732             $customer->save();
00733             $this->_customerId = $customer->getId();
00734             $customer->unsetData();
00735             $customer->cleanAllAddresses();
00736             $customer->unsetSubscription();
00737             $newMem = memory_get_usage(); $memory .= ', '.($newMem-$mem); $mem = $newMem;
00738 
00739         } catch (Exception $e) {
00740         }
00741         unset($row);
00742         return array('memory'=>$memory);
00743     }

setCustomer ( Mage_Customer_Model_Customer customer  ) 

Definition at line 343 of file Customer.php.

00344     {
00345         $id = Mage::objects()->save($customer);
00346         Mage::register('Object_Cache_Customer', $id);
00347     }


Member Data Documentation

$_address = null [protected]

Definition at line 73 of file Customer.php.

$_addressFields = array() [protected]

Definition at line 67 of file Customer.php.

$_attributes = array() [protected]

Definition at line 41 of file Customer.php.

$_billingAddressModel [protected]

Definition at line 44 of file Customer.php.

$_billingFields = array() [protected]

Definition at line 51 of file Customer.php.

$_billingMappedFields = array() [protected]

Definition at line 53 of file Customer.php.

$_billingRequiredFields = array() [protected]

Definition at line 57 of file Customer.php.

$_billingStreetFields = array() [protected]

Definition at line 55 of file Customer.php.

$_customer = null [protected]

Definition at line 72 of file Customer.php.

$_customerGroups [protected]

Definition at line 42 of file Customer.php.

$_customerId = '' [protected]

Definition at line 75 of file Customer.php.

$_customerModel [protected]

Definition at line 39 of file Customer.php.

$_ignoreFields = array() [protected]

Definition at line 49 of file Customer.php.

$_regions [protected]

Definition at line 69 of file Customer.php.

$_requiredFields = array() [protected]

Definition at line 47 of file Customer.php.

$_shippingAddressModel [protected]

Definition at line 45 of file Customer.php.

$_shippingFields = array() [protected]

Definition at line 59 of file Customer.php.

$_shippingMappedFields = array() [protected]

Definition at line 61 of file Customer.php.

$_shippingRequiredFields = array() [protected]

Definition at line 65 of file Customer.php.

$_shippingStreetFields = array() [protected]

Definition at line 63 of file Customer.php.

$_stores [protected]

Definition at line 40 of file Customer.php.

$_websites [protected]

Definition at line 70 of file Customer.php.

const MULTI_DELIMITER = ' , '

Definition at line 32 of file Customer.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:03 2009 for Magento by  doxygen 1.5.8