当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage::fireLog方法代码示例

本文整理汇总了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();
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:7,代码来源:Grid.php

示例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;
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:34,代码来源:Mailinglist.php

示例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");
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:12,代码来源:Subscribe.php

示例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));
     }
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:15,代码来源:WidgetController.php

示例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;
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:15,代码来源:Subscriber.php

示例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();
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:21,代码来源:Subscriber.php

示例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}");
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:20,代码来源:SubscriberController.php

示例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);
         }
     }
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:23,代码来源:IndexController.php

示例9: changeSubscriber

 public function changeSubscriber(Varien_Event_Observer $observer)
 {
     $event = $observer->getEvent();
     Mage::fireLog($event, "changeSubscriber");
     return $this;
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:6,代码来源:Observer.php

示例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');
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:10,代码来源:Chooser.php


注:本文中的Mage::fireLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。