本文整理汇总了PHP中Mage_Newsletter_Model_Subscriber::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Newsletter_Model_Subscriber::getId方法的具体用法?PHP Mage_Newsletter_Model_Subscriber::getId怎么用?PHP Mage_Newsletter_Model_Subscriber::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Newsletter_Model_Subscriber
的用法示例。
在下文中一共展示了Mage_Newsletter_Model_Subscriber::getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUnsubscribeUrl
/**
* Retrieve unsubsription url
*
* @param Mage_Newsletter_Model_Subscriber $subscriber
* @return string
*/
public function getUnsubscribeUrl($subscriber)
{
return Mage::getModel('Mage_Core_Model_Url')->setStore($subscriber->getStoreId())->getUrl('newsletter/subscriber/unsubscribe', array('id' => $subscriber->getId(), 'code' => $subscriber->getCode(), '_nosid' => true));
}
示例2: addSubscriberData
/**
* Add Subscriber Data
*
* @param Mage_Newsletter_Model_Subscriber $subscriber
* @return Mage_Newsletter_Model_Problem
*/
public function addSubscriberData(Mage_Newsletter_Model_Subscriber $subscriber)
{
$this->setSubscriberId($subscriber->getId());
return $this;
}
示例3: received
/**
* Updates data when subscriber received
*
* @param Mage_Newsletter_Model_Subscriber $subscriber
* @param Mage_Newsletter_Model_Queue $queue
* @return Mage_Newsletter_Model_Resource_Subscriber
*/
public function received(Mage_Newsletter_Model_Subscriber $subscriber, Mage_Newsletter_Model_Queue $queue)
{
$this->_write->beginTransaction();
try {
$data['letter_sent_at'] = Mage::getSingleton('Mage_Core_Model_Date')->gmtDate();
$this->_write->update($this->_subscriberLinkTable, $data, array('subscriber_id = ?' => $subscriber->getId(), 'queue_id = ?' => $queue->getId()));
$this->_write->commit();
} catch (Exception $e) {
$this->_write->rollBack();
Mage::throwException(Mage::helper('Mage_Newsletter_Helper_Data')->__('Cannot mark as received subscriber.'));
}
return $this;
}
示例4: received
public function received(Mage_Newsletter_Model_Subscriber $subscriber, Mage_Newsletter_Model_Queue $queue)
{
$this->_write->beginTransaction();
try {
$data['letter_sent_at'] = now();
$this->_write->update($this->_subscriberLinkTable, $data, array($this->_write->quoteInto('subscriber_id=?', $subscriber->getId()), $this->_write->quoteInto('queue_id=?', $queue->getId())));
$this->_write->commit();
} catch (Exception $e) {
$this->_write->rollBack();
Mage::throwException(Mage::helper('newsletter')->__('Cannot mark as received subscriber'));
}
return $this;
}
示例5: getUnsubscribeUrl
/**
* Retrieve unsubsription url
*
* @param Mage_Newsletter_Model_Subscriber $subscriber
* @return string
*/
public function getUnsubscribeUrl($subscriber)
{
$params = array('id' => $subscriber->getId(), 'code' => $subscriber->getCode());
return $this->_getUrl('newsletter/subscriber/unsubscribe', $params);
}