Created
September 22, 2014 22:42
-
-
Save davefreiman/554da1cadade958c9896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Model_Subscriber extends Mage_Core_Model_Abstract | |
{ | |
protected function _construct() | |
{ | |
$this->_init('demac_casl/subscriber'); | |
} | |
public function addCaslData() | |
{ | |
$ip = Mage::helper('core/http')->getRemoteAddr(); | |
$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); | |
$currentDate = date('Y-m-d', $currentTimestamp); | |
$referrerUrl = Mage::app()->getRequest()->getServer('HTTP_REFERER'); | |
$this->setIpAddress($ip); | |
$this->setDateSubscribed($currentDate); | |
$this->setReferrerUrl($referrerUrl); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment