本文整理汇总了PHP中Mage::fireLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::fireLog方法的具体用法?PHP Mage::fireLog怎么用?PHP Mage::fireLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage
的用法示例。
在下文中一共展示了Mage::fireLog方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareCollection
protected function _prepareCollection()
{
$collection = Mage::getModel('mailinglist/subscription')->getCollection();
Mage::fireLog($collection, "Collection");
$this->setCollection($collection);
return parent::_prepareCollection();
}
示例2: initForm
public function initForm()
{
$form = new Varien_Data_Form();
$form->setHtmlIdPrefix('_mailinglist');
$customer = Mage::registry('current_customer');
Mage::register('lex_customer', $customer);
Mage::fireLog($customer, "Set Customer");
$helper = Mage::helper('mailinglist');
$helper->setSelectedCustomer($customer);
$subscriber = Mage::getModel('newsletter/subscriber')->loadByCustomer($customer);
//Mage::register('subscriber', $subscriber);
if ($customer->getWebsiteId() == 0) {
$this->setForm($form);
return $this;
}
$fieldset->addField('subscription', 'checkbox', array('label' => Mage::helper('customer')->__('Subscribed to Newsletter?'), 'name' => 'subscription'));
if ($customer->isReadonly()) {
$form->getElement('subscription')->setReadonly(true, true);
}
// $form->getElement('subscription')->setIsChecked($subscriber->isSubscribed());
/*
if($changedDate = $this->getStatusChangedDate()) {
$fieldset->addField('change_status_date', 'label',
array(
'label' => $subscriber->isSubscribed() ? Mage::helper('customer')->__('Last Date Subscribed') : Mage::helper('customer')->__('Last Date Unsubscribed'),
'value' => $changedDate,
'bold' => true
)
);
}
*/
$this->setForm($form);
return $this;
}
示例3: addSubscriber
public function addSubscriber(Varien_Event_Observer $observer)
{
//Mage::fireLog("Add Subscriber", "Observer");
$helper = Mage::helper('core');
$controller = $observer->getEvent()->getControllerAction();
//$controller = $observer->getEvent();
Mage::fireLog($controller);
Mage::fireLog("It Works!", "Observer");
$request = $controller->getRequest();
$params = $request->getParams();
Mage::fireLog($params, "Params");
}
示例4: categoriesJsonAction
/**
* Categories tree node (Ajax version)
*/
public function categoriesJsonAction()
{
if ($categoryId = (int) $this->getRequest()->getPost('id')) {
Mage::fireLog($categoryId);
$category = Mage::getModel('catalog/category')->load($categoryId);
if ($category->getId()) {
Mage::register('category', $category);
Mage::register('current_category', $category);
}
$this->getResponse()->setBody($this->_getCategoryTreeBlock()->getTreeJson($category));
}
}
示例5: loadByCustomer
public function loadByCustomer(Mage_Customer_Model_Customer $customer)
{
$data = $this->getResource()->loadByCustomer($customer);
$this->addData($data);
if (!empty($data) && $customer->getId() && !$this->getCustomerId()) {
$this->setCustomerId($customer->getId());
Mage::fireLog($customer->getId());
$this->setSubscriberConfirmCode($this->randomSequence());
if ($this->getStatus() == self::STATUS_NOT_ACTIVE) {
$this->setStatus($customer->getIsSubscribed() ? self::STATUS_SUBSCRIBED : self::STATUS_UNSUBSCRIBED);
}
$this->save();
}
return $this;
}
示例6: loadByCustomer
/**
* Load subscriber by customer
*
* @param Mage_Customer_Model_Customer $customer
* @return array
*/
public function loadByCustomer(Mage_Customer_Model_Customer $customer)
{
$select = $this->_read->select()->from($this->getMainTable())->where('customer_id=:customer_id');
Mage::fireLog($customer->getId(), "loadByCustomer");
$result = $this->_read->fetchRow($select, array('customer_id' => $customer->getId()));
if ($result) {
return $result;
}
$select = $this->_read->select()->from($this->getMainTable())->where('subscriber_email=:subscriber_email');
$result = $this->_read->fetchRow($select, array('subscriber_email' => $customer->getEmail()));
if ($result) {
return $result;
}
return array();
}
示例7: unsubscribeAction
public function unsubscribeAction()
{
$helper = Mage::helper('mailinglist');
$customer = $helper->getSelectedCustomer();
$subscribers = $this->getRequest()->getParam('id');
//print_r($subscribersIds);
//die();
// $subscribers = explode(",", $subscribersIds);
$helper = Mage::helper('mailinglist');
foreach ($subscribers as $subscriber) {
$split = explode(":", $subscriber);
$customer_id = $split[0];
$email = $split[1];
$lid = $split[2];
Mage::fireLog($email . ":" . $lid, "Unsubscribe Subscriber");
$options = array('email' => $email, 'listid' => $lid);
$helper->unsubscribeSubscriber($options);
}
$this->_redirect("*/customer/edit/id/{$customer_id}");
}
示例8: ajaxsubscribeAction
public function ajaxsubscribeAction()
{
$form_values = $_REQUEST;
Mage::fireLog($form_values, "Lexiconn_Mailinglist_IndexController - subscribeAction()");
$email = $form_values['email'];
$lid = $form_values['listid'];
$helper = Mage::helper('mailinglist');
$options = array("email" => $email, "listid" => $lid);
if ($helper->subscriberExists($email)) {
Mage::fireLog("Subscriber Exists", "Lexiconn_Mailinglist_IndexController");
$output = array("success" => "false", "message" => "Subscriber Exists");
echo json_encode($output);
} else {
if ($helper->addSubscriber($form_values)) {
Mage::fireLog("Subscriber Does Not Exist", "Lexiconn_Mailinglist_IndexController");
$output = array("success" => "true", "message" => "Added Subscriber");
echo json_encode($output);
} else {
$output = array("success" => "false", "message" => "Error");
echo json_encode($output);
}
}
}
示例9: changeSubscriber
public function changeSubscriber(Varien_Event_Observer $observer)
{
$event = $observer->getEvent();
Mage::fireLog($event, "changeSubscriber");
return $this;
}
示例10: getCategoryCollection
/**
* Adds some extra params to categories collection
*
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
*/
public function getCategoryCollection()
{
Mage::fireLog(parent::getCategoryCollection()->addAttributeToSelect('url_key')->addAttributeToSelect('is_anchor'), "Lexiconn_Mailinglist_Block_Adminhtml_Catalog_Category_Widget_Chooser");
return parent::getCategoryCollection()->addAttributeToSelect('url_key')->addAttributeToSelect('is_anchor');
}