
Public Member Functions | |
| updateCustomerType ($visitorId, $customerId, $types=null) | |
| clean () | |
Public Attributes | |
| const | EVENT_PRODUCT_VIEW = 1 |
| const | EVENT_PRODUCT_SEND = 2 |
| const | EVENT_PRODUCT_COMPARE = 3 |
| const | EVENT_PRODUCT_TO_CART = 4 |
| const | EVENT_PRODUCT_TO_WISHLIST = 5 |
| const | EVENT_WISHLIST_SHARE = 6 |
Protected Member Functions | |
| _construct () | |
| _beforeSave () | |
Definition at line 34 of file Event.php.
| _beforeSave | ( | ) | [protected] |
Before Event save process
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 57 of file Event.php.
00058 { 00059 $this->setLoggedAt(Mage::getModel('core/date')->gmtDate()); 00060 return parent::_beforeSave(); 00061 }
| _construct | ( | ) | [protected] |
Initialize resource
Reimplemented from Varien_Object.
Definition at line 47 of file Event.php.
00048 { 00049 $this->_init('reports/event'); 00050 }
| clean | ( | ) |
Clean events (visitors)
Definition at line 90 of file Event.php.
00091 { 00092 $this->getResource()->clean($this); 00093 return $this; 00094 }
| updateCustomerType | ( | $ | visitorId, | |
| $ | customerId, | |||
| $ | types = null | |||
| ) |
Update customer type after customer login
| int | $visitorId | |
| int | $customerId | |
| array | $types |
Definition at line 71 of file Event.php.
00072 { 00073 if (is_null($types)) { 00074 $types = array(); 00075 foreach (Mage::getModel('reports/event_type')->getCollection() as $eventType) { 00076 if ($eventType->getCustomerLogin()) { 00077 $types[$eventType->getId()] = $eventType->getId(); 00078 } 00079 } 00080 } 00081 $this->getResource()->updateCustomerType($this, $visitorId, $customerId, $types); 00082 return $this; 00083 }
| const EVENT_PRODUCT_COMPARE = 3 |
| const EVENT_PRODUCT_SEND = 2 |
| const EVENT_PRODUCT_TO_CART = 4 |
| const EVENT_PRODUCT_TO_WISHLIST = 5 |
| const EVENT_PRODUCT_VIEW = 1 |
| const EVENT_WISHLIST_SHARE = 6 |
1.5.8