Esempio n. 1
0
 /**
  * Saving information about url
  *
  * @param   Mage_Log_Model_Visitor $visitor
  * @return  Mage_Log_Model_Resource_Visitor
  */
 protected function _saveUrlInfo($visitor)
 {
     $adapter = $this->_getWriteAdapter();
     $data = new Varien_Object(array('url' => Mage::helper('core/string')->substr($visitor->getUrl(), 0, 250), 'referer' => Mage::helper('core/string')->substr($visitor->getHttpReferer(), 0, 250)));
     $bind = $this->_prepareDataForTable($data, $this->getTable('log/url_info_table'));
     $adapter->insert($this->getTable('log/url_info_table'), $bind);
     $visitor->setLastUrlId($adapter->lastInsertId($this->getTable('log/url_info_table')));
     return $this;
 }
Esempio n. 2
0
 /**
  * Saving information about url
  *
  * @param   Mage_Log_Model_Visitor $visitor
  * @return  Mage_Log_Model_Mysql4_Visitor
  */
 protected function _saveUrlInfo($visitor)
 {
     $this->_getWriteAdapter()->insert($this->getTable('log/url_info_table'), array('url' => Mage::helper('core/string')->substr($visitor->getUrl(), 0, 250), 'referer' => Mage::helper('core/string')->substr($visitor->getHttpReferer(), 0, 250)));
     $visitor->setLastUrlId($this->_getWriteAdapter()->lastInsertId());
     return $this;
 }