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


PHP Mage_Adminhtml_Block_Widget_Grid::_prepareCollection方法代码示例

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


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

示例1: _prepareCollection

 protected function _prepareCollection()
 {
     $_205d95c001c842f933e3b55fa4e902d5d2fdd0af = Mage::getModel('sublogin/budget')->getCollection();
     $_205d95c001c842f933e3b55fa4e902d5d2fdd0af->getSelect()->join(array('sublogin' => $_205d95c001c842f933e3b55fa4e902d5d2fdd0af->getTable('sublogin/sublogin')), 'main_table.sublogin_id = sublogin.id', array('sublogin.email'));
     $this->setCollection($_205d95c001c842f933e3b55fa4e902d5d2fdd0af);
     return parent::_prepareCollection();
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:7,代码来源:Grid.php

示例2: _prepareCollection

 /**
  * Setting collection to show
  *
  * @return Mage_Adminhtml_Block_Widget_Grid
  */
 protected function _prepareCollection()
 {
     $collection = Mage::getModel('xmlconnect/queue')->getCollection();
     $collection->addFieldToFilter('main_table.status', array('neq' => Mage_XmlConnect_Model_Queue::STATUS_DELETED));
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:12,代码来源:Grid.php

示例3: _prepareCollection

 protected function _prepareCollection()
 {
     $model = Mage::getModel('review/review');
     $collection = $model->getProductCollection();
     if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) {
         $productId = $this->getProductId();
         if (!$productId) {
             $productId = $this->getRequest()->getParam('productId');
         }
         $this->setProductId($productId);
         $collection->addEntityFilter($this->getProductId());
     }
     if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) {
         $customerId = $this->getCustomerId();
         if (!$customerId) {
             $customerId = $this->getRequest()->getParam('customerId');
         }
         $this->setCustomerId($customerId);
         $collection->addCustomerFilter($this->getCustomerId());
     }
     if (Mage::registry('usePendingFilter') === true) {
         $collection->addStatusFilter($model->getPendingStatus());
     }
     $collection->addStoreData();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:27,代码来源:Grid.php

示例4: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = Mage::getResourceModel('api/role_collection');
     $collection->setRolesFilter();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:7,代码来源:Roles.php

示例5: _prepareCollection

 protected function _prepareCollection()
 {
     //TODO: add full name logic
     $collection = Mage::getResourceModel('sales/order_collection')->addAttributeToSelect('increment_id')->addAttributeToSelect('created_at')->addAttributeToSelect('grand_total')->addAttributeToSelect('order_currency_code')->addAttributeToSelect('store_id')->joinAttribute('billing_firstname', 'order_address/firstname', 'billing_address_id', null, 'left')->joinAttribute('billing_lastname', 'order_address/lastname', 'billing_address_id', null, 'left')->joinAttribute('shipping_firstname', 'order_address/firstname', 'shipping_address_id', null, 'left')->joinAttribute('shipping_lastname', 'order_address/lastname', 'shipping_address_id', null, 'left')->addExpressionAttributeToSelect('billing_name', 'CONCAT({{billing_firstname}}, " ", {{billing_lastname}})', array('billing_firstname', 'billing_lastname'))->addExpressionAttributeToSelect('shipping_name', 'CONCAT({{shipping_firstname}}, " ", {{shipping_lastname}})', array('shipping_firstname', 'shipping_lastname'))->addAttributeToFilter('customer_id', Mage::registry('current_customer')->getEntityId());
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:7,代码来源:Orders.php

示例6: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = Mage::getModel('enterprise_giftregistry/item')->getCollection()->addRegistryFilter($this->getEntity()->getId());
     $collection->updateItemAttributes();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:7,代码来源:Items.php

示例7: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = Mage::getModel('firstdatae4/recurring')->getCollection();
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:7,代码来源:Grid.php

示例8: _prepareCollection

 protected function _prepareCollection()
 {
     //TODO: add full name logic
     $collection = AO::getResourceModel('sales/order_Creditmemo_collection')->addAttributeToSelect('increment_id')->addAttributeToSelect('created_at')->addAttributeToSelect('order_currency_code')->addAttributeToSelect('store_currency_code')->addAttributeToSelect('base_currency_code')->addAttributeToSelect('state')->addAttributeToSelect('grand_total')->addAttributeToSelect('base_grand_total')->joinAttribute('billing_firstname', 'order_address/firstname', 'billing_address_id', null, 'left')->joinAttribute('billing_lastname', 'order_address/lastname', 'billing_address_id', null, 'left')->addExpressionAttributeToSelect('billing_name', 'CONCAT({{billing_firstname}}, " ", {{billing_lastname}})', array('billing_firstname', 'billing_lastname'))->setOrderFilter($this->getOrder());
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:7,代码来源:Sales_Order_View_Tab_Creditmemos.php

示例9: _prepareCollection

 protected function _prepareCollection()
 {
     $store = $this->getRequest()->getParam('store');
     $collection = Mage::getModel('webforms/fieldsets')->setStoreId($store)->getCollection()->addFilter('webform_id', $this->getRequest()->getParam('id'));
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:7,代码来源:Fieldsets.php

示例10: _prepareCollection

 /**
  * Preparation of the data that is displayed by the grid.
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     /** @var Mage_Cron_Model_Resource_Schedule_Collection $collection */
     $collection = Mage::getModel('cron/schedule')->getCollection();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:jerome-breton,项目名称:Aoe_Scheduler,代码行数:12,代码来源:Grid.php

示例11: _prepareCollection

 protected function _prepareCollection()
 {
     // Get collection
     //----------------------------
     $collection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('name');
     //----------------------------
     //----------------------------
     $collection->getSelect()->distinct();
     //----------------------------
     // Set filter store
     //----------------------------
     $store = Mage::app()->getStore((int) $this->listing->getData('store_id'));
     if ($store->getId()) {
         $collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', NULL, 'inner', $store->getId());
         $collection->joinAttribute('thumbnail', 'catalog_product/thumbnail', 'entity_id', NULL, 'left', $store->getId());
     } else {
         $collection->addAttributeToSelect('thumbnail');
     }
     //----------------------------
     //------------------------------
     $productAddIds = (array) json_decode($this->listing->getData('product_add_ids'), true);
     $collection->joinTable(array('lp' => 'M2ePro/Listing_Product'), 'product_id=entity_id', array('id' => 'id'), '{{table}}.listing_id=' . (int) $this->listing->getId());
     $collection->joinTable(array('elp' => 'M2ePro/Ebay_Listing_Product'), 'listing_product_id=id', array('listing_product_id' => 'listing_product_id'));
     $collection->getSelect()->where('lp.id IN (?)', $productAddIds);
     //------------------------------
     //        exit($collection->getSelect()->__toString());
     // Set collection to grid
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:31,代码来源:Grid.php

示例12: _prepareCollection

 protected function _prepareCollection()
 {
     $role = Mage::getSingleton('aitpermissions/role');
     $collection = Mage::getResourceModel('reports/quote_collection');
     if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) {
         $collection->prepareForProductsInCarts()->setSelectCountSqlType(Mage_Reports_Model_Mysql4_Quote_Collection::SELECT_COUNT_SQL_TYPE_CART);
     } else {
         $collection->prepareForProductsInCarts()->setSelectCountSqlType(Mage_Reports_Model_Resource_Quote_Collection::SELECT_COUNT_SQL_TYPE_CART);
     }
     if ($role->isPermissionsEnabled()) {
         if (!Mage::helper('aitpermissions')->isShowingAllProducts()) {
             if ($role->isScopeStore()) {
                 $collection->getSelect()->joinLeft(array('product_cat' => Mage::getSingleton('core/resource')->getTableName('catalog_category_product')), 'product_cat.product_id = e.entity_id', array());
                 $collection->getSelect()->where(' product_cat.category_id in (' . join(',', $role->getAllowedCategoryIds()) . ')
                     or product_cat.category_id IS NULL ');
                 $collection->getSelect()->distinct(true);
             }
             if ($role->isScopeWebsite()) {
                 $collection->addStoreFilter($role->getAllowedStoreviewIds());
             }
         }
     }
     $this->setCollection($collection);
     return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
 }
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:25,代码来源:AdminReportShopcartProductGrid.php

示例13: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = Mage::getModel('affiliateplus/transaction')->getCollection();
     $collection->getSelect()->where('coupon_code = \'\' OR coupon_code IS NULL');
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:7,代码来源:Grid.php

示例14: _prepareCollection

 /**
  * Get collection from commission table
  *
  * Return array of data to with seller commission information
  * 
  * @return array
  */
 protected function _prepareCollection()
 {
     $gid = Mage::helper('marketplace')->getGroupId();
     $collection = Mage::getResourceModel('customer/customer_collection')->addNameToSelect()->addAttributeToSelect('email')->addAttributeToSelect('created_at')->addAttributeToSelect('group_id')->addFieldToFilter('group_id', $gid);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:14,代码来源:Grid.php

示例15: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = AO::getResourceModel('reports/product_collection');
     $collection->getEntity()->setStore(0);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:7,代码来源:Report_Product_Grid.php


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