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


PHP Mage_Core_Block_Template::__construct方法代码示例

本文整理汇总了PHP中Mage_Core_Block_Template::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Template::__construct方法的具体用法?PHP Mage_Core_Block_Template::__construct怎么用?PHP Mage_Core_Block_Template::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Block_Template的用法示例。


在下文中一共展示了Mage_Core_Block_Template::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $customer_id = (int) Mage::getSingleton("customer/session")->getCustomer()->getId();
     $invitations = Mage::getModel('affiliate/affiliateinvitation')->getCollection()->addFieldtoFilter('customer_id', $customer_id)->addFieldToFilter('status', array('in' => array(MW_Affiliate_Model_Statusinvitation::CLICKLINK, MW_Affiliate_Model_Statusinvitation::REGISTER, MW_Affiliate_Model_Statusinvitation::SUBSCRIBE, MW_Affiliate_Model_Statusinvitation::PURCHASE)))->setOrder('invitation_time', 'DESC');
     $this->setInvitationHistory($invitations);
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:7,代码来源:Transaction.php

示例2: __construct

 /**
  * __construct Contructor that prepare the collection for assign product list
  * @var Int $userId Current logged seller id
  * @var String $filter Search query string
  * @var String $filter_prostatus product status query string
  * @var String filter_data_frm product creation from date query string
  * @var String filter_data_to product creation to date query string
  * @var Object $collection Catalog product collection object
  * @var Array $products Catalog product ids
  * @var Object $collection Assign product collection object
  */
 public function __construct()
 {
     parent::__construct();
     $userId = Mage::getSingleton('customer/session')->getCustomerId();
     $filter = $this->getRequest()->getParam('s') != "" ? $this->getRequest()->getParam('s') : "";
     $filter_prostatus = $this->getRequest()->getParam('prostatus') != "" ? $this->getRequest()->getParam('prostatus') : "";
     $filter_data_frm = $this->getRequest()->getParam('from_date') != "" ? $this->getRequest()->getParam('from_date') : "";
     $filter_data_to = $this->getRequest()->getParam('to_date') != "" ? $this->getRequest()->getParam('to_date') : "";
     $from = null;
     $to = null;
     if ($filter_data_to) {
         $todate = date_create($filter_data_to);
         $to = date_format($todate, 'Y-m-d H:i:s');
     }
     if ($filter_data_frm) {
         $fromdate = date_create($filter_data_frm);
         $from = date_format($fromdate, 'Y-m-d H:i:s');
     }
     $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addFieldToFilter('name', array('like' => "%" . $filter . "%"))->setOrder('entity_id', 'AESC');
     $products = array();
     foreach ($collection as $data) {
         array_push($products, $data->getEntityId());
     }
     $collection = Mage::getModel('mpassignproduct/mpassignproduct')->getCollection()->addFieldToFilter('product_id', array('in' => $products))->addFieldToFilter('created_at', array('datetime' => true, 'from' => $from, 'to' => $to))->addFieldToFilter('seller_id', array('eq' => $userId));
     if ($filter_prostatus != "") {
         $collection->addFieldToFilter('flag', array('eq' => $filter_prostatus));
     }
     $this->setCollection($collection);
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:40,代码来源:Mpassignproductlist.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     //TODO: add full name logic
     $orders = Mage::getResourceModel('sales/order_collection')->addAttributeToSelect('*')->joinAttribute('shipping_firstname', 'order_address/firstname', 'shipping_address_id', null, 'left')->joinAttribute('shipping_lastname', 'order_address/lastname', 'shipping_address_id', null, 'left')->addAttributeToFilter('customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId())->addAttributeToFilter('state', array('in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()))->addAttributeToSort('created_at', 'desc')->setPageSize('5')->load();
     $this->setOrders($orders);
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:7,代码来源:Recent.php

示例4: __construct

 public function __construct()
 {
     $this->_loadData();
     $this->setStores(array());
     $this->setLanguages(array());
     return parent::__construct();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:7,代码来源:Switcher.php

示例5: __construct

 /**
  * initialize
  * @access public
  * @author Ultimate Module Creator
  */
 public function __construct()
 {
     parent::__construct();
     $vouchers = Mage::getResourceModel('instapago_voucher/voucher_collection')->addStoreFilter(Mage::app()->getStore())->addFieldToFilter('status', 1);
     $vouchers->setOrder('ordernumber', 'asc');
     $this->setVouchers($vouchers);
 }
开发者ID:jamylguimaraes,项目名称:magento-extension,代码行数:12,代码来源:List.php

示例6: __construct

 public function __construct()
 {
     $params = $this->getRequest()->getParams();
     $action = Mage::app()->getRequest()->getActionName();
     // could be: index, foto, video or foto-video
     //Zend_Debug::dump($params); die();
     parent::__construct();
     $collection = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('furnizor_account_type')->addAttributeToSelect('furnizor_company_name')->addAttributeToSelect('furnizor_company_type')->addAttributeToSelect('furnizor_company_services')->addAttributeToSelect('furnizor_company_cstzone')->addAttributeToSelect('furnizor_location_province')->addAttributeToSelect('furnizor_location_city')->addAttributeToSelect('business_images_logo')->addAttributeToSelect('business_descriptions_slogan')->addAttributeToSelect('business_descriptions_exp')->addAttributeToSelect('business_descriptions_slogan')->addAttributeToSelect('business_descriptions_desc')->addAttributeToSelect('furnizor_company_zone')->addAttributeToSelect('provider_reputation')->addAttributeToSelect('provider_views')->addAttributeToSelect('business_descriptions_title')->addAttributeToFilter('group_id', 4)->addAttributeToFilter('furnizor_account_status', array('in' => array(1, 2)))->addAttributeToFilter('furnizor_account_online_status', 1)->addAttributeToFilter('ac_op_afisare_profil', 1);
     //$collection->getSelect()->order('e.provider_reputation DESC');
     // add region filter to collection
     if (isset($params['judet'])) {
         $collection->addAttributeToFilter('furnizor_location_province', $params['judet']);
     }
     // add service type filter to collection
     switch ($action) {
         case 'foto':
             $collection->addAttributeToFilter('furnizor_company_services', 1);
             break;
         case 'video':
             $collection->addAttributeToFilter('furnizor_company_services', 2);
             break;
         case 'fotovideo':
             $collection->addAttributeToFilter('furnizor_company_services', 3);
             break;
     }
     // Zend_Debug::dump($collection->getSize());
     $collection->setOrder('provider_reputation', 'DESC');
     $this->setCollection($collection);
 }
开发者ID:picode-eu,项目名称:nti_mage,代码行数:29,代码来源:Furnizori.php

示例7: __construct

 public function __construct()
 {
     $storeId = Mage::app()->getStore()->getStoreId();
     parent::__construct();
     $collection = Mage::getModel('blogmate/blogmate')->getCollection()->addAttributeToSelect('*')->setStoreId($storeId);
     $this->setCollection($collection);
 }
开发者ID:newedge-media,项目名称:medpage-easylink,代码行数:7,代码来源:Bloglist.php

示例8: __construct

 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     parent::__construct($attributes);
     if ($this->hasData("template") && $this->getData("template")) {
         $my_template = $this->getData("template");
     } else {
         $my_template = "ves/blockbuilder/page_head.phtml";
     }
     $this->setTemplate($my_template);
     /*Cache Block*/
     $enable_cache = $this->getConfig("enable_cache", 1);
     if (!$enable_cache) {
         $cache_lifetime = null;
     } else {
         $cache_lifetime = $this->getConfig("cache_lifetime", 86400);
         $cache_lifetime = (int) $cache_lifetime > 0 ? $cache_lifetime : 86400;
     }
     $this->addData(array('cache_lifetime' => $cache_lifetime));
     $magento_version = Mage::getVersion();
     $magento_version = str_replace(".", "", $magento_version);
     if ((int) $magento_version >= 1900) {
         $this->addCacheTag(array(Mage_Core_Model_Store::CACHE_TAG, Mage_Cms_Model_Block::CACHE_TAG, Ves_BlockBuilder_Model_Block::CACHE_MEDIA_TAG));
     }
     /*End Cache Block*/
 }
开发者ID:booklein,项目名称:bookle,代码行数:28,代码来源:Media.php

示例9: __construct

 public function __construct()
 {
     $storeId = Mage::app()->getStore()->getStoreId();
     parent::__construct();
     $collection = Mage::getModel('blogmate/blog')->getCollection()->addFieldToFilter('status', array('eq' => '1'))->addFieldToFilter('stores_selected', array(array('like' => '%' . $storeId . '%'), array('like' => '%0%')))->addOrder('display_order', 'ASC');
     $this->setCollection($collection);
 }
开发者ID:newedge-media,项目名称:medpage-easylink,代码行数:7,代码来源:Index.php

示例10: __construct

 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $session = Mage::getSingleton('customer/session');
     $purchased = Mage::getResourceModel('downloadable/link_purchased_collection')
         ->addFieldToFilter('customer_id', $session->getCustomerId())
         ->addOrder('created_at', 'desc');
     $this->setPurchased($purchased);
     $purchasedIds = array();
     foreach ($purchased as $_item) {
         $purchasedIds[] = $_item->getId();
     }
     if (empty($purchasedIds)) {
         $purchasedIds = array(null);
     }
     $purchasedItems = Mage::getResourceModel('downloadable/link_purchased_item_collection')
         ->addFieldToFilter('purchased_id', array('in' => $purchasedIds))
         ->addFieldToFilter('status',
             array(
                 'nin' => array(
                     Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_PENDING_PAYMENT,
                     Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_PAYMENT_REVIEW,
                     ICC_Ecodes_Helper_Downloadable::LINK_STATUS_DELETED
                 )
             )
         )
         ->setOrder('item_id', 'desc');
     $this->setItems($purchasedItems);
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:32,代码来源:Mage_Downloadable_Block_Customer_Products_List.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('referafriend/points.phtml');
     $points = Mage::getModel('rewardpoints/stats')->getCollection()->addClientFilter(Mage::getSingleton('customer/session')->getCustomer()->getId());
     $this->setPoints($points);
 }
开发者ID:ntnhan220488,项目名称:ggm,代码行数:7,代码来源:Points.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->showMoreButton()) {
         $this->setTemplate('gomage/navigation/catalog/product/list/more.phtml');
     }
 }
开发者ID:vstorm83,项目名称:ausport,代码行数:7,代码来源:More.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $collection = Mage::getModel('evidencija/evidencija')->getCollection();
     $collection->setOrder('entity_id', 'DESC');
     $this->setCollection($collection);
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $ids = $this->latestEvents();
     $collection = Mage::getModel("eventmanager/eventmanager")->getCollection()->addFieldToFilter("status", "1")->addFieldToFilter("event_id", array("in" => $ids))->setOrder("edate", "ASC");
     $this->setCollection($collection);
 }
开发者ID:sshegde123,项目名称:wmp8,代码行数:7,代码来源:Latestevents.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $customerId = Mage::getSingleton('customer/session')->getCustomerId();
     $collection = Mage::getModel('marketplace/question')->getCollection()->addFieldToFilter('customer_id', $customerId)->setOrder('entity_id', 'DESC');
     $this->setCollection($collection);
 }
开发者ID:DeveshKumarThakur,项目名称:cosmetics,代码行数:7,代码来源:Myquestions.php


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