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


PHP Mage_Core_Model_Resource_Db_Collection_Abstract::_initSelect方法代码示例

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


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

示例1: _initSelect

 /**
  * Initialize select object
  *
  * @return Mage_Directory_Model_Resource_Region_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $locale = Mage::app()->getLocale()->getLocaleCode();
     $this->addBindParam(':region_locale', $locale);
     $this->getSelect()->joinLeft(array('rname' => $this->_regionNameTable), 'main_table.region_id = rname.region_id AND rname.locale = :region_locale', array('name'));
     return $this;
 }
开发者ID:test3metizsoft,项目名称:test,代码行数:13,代码来源:Collection.php

示例2: _initSelect

 /**
  * Initialize select, add country iso3 code and region name
  *
  * @return void
  */
 public function _initSelect()
 {
     parent::_initSelect();
     $this->_select->joinLeft(array('country_table' => $this->_countryTable), 'country_table.country_id = main_table.dest_country_id', array('dest_country' => 'iso3_code'))->joinLeft(array('region_table' => $this->_regionTable), 'region_table.region_id = main_table.dest_region_id', array('dest_region' => 'code'));
     $this->addOrder('dest_country', self::SORT_ORDER_ASC);
     $this->addOrder('dest_region', self::SORT_ORDER_ASC);
     $this->addOrder('dest_zip', self::SORT_ORDER_ASC);
     $this->addOrder('condition_value', self::SORT_ORDER_ASC);
 }
开发者ID:okite11,项目名称:frames21,代码行数:14,代码来源:Collection.php

示例3: _initSelect

 /**
  * Join reports info table
  *
  * @return Mage_Paypal_Model_Resource_Report_Settlement_Row_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(array('report' => $this->getTable('paypal/settlement_report')), 'report.report_id = main_table.report_id', array('report.account_id', 'report.report_date'));
     return $this;
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:11,代码来源:Collection.php

示例4: _initSelect

 /**
  * Initialize collection select
  *
  * @return Mage_XmlConnect_Model_Resource_Queue_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinNames();
     return $this;
 }
开发者ID:Airmal,项目名称:Magento-Em,代码行数:11,代码来源:Collection.php

示例5: _initSelect

 /**
  * init select
  *
  * @return Mage_Review_Model_Resource_Review_Product_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(array('detail' => $this->_reviewDetailTable), 'main_table.review_id = detail.review_id', array('detail_id', 'title', 'detail', 'nickname', 'customer_id'));
     return $this;
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:11,代码来源:Collection.php

示例6: _initSelect

 /**
  * Init collection select
  *
  *
  * @return Mage_SalesRule_Model_Resource_Rule_Collection
  */
 public function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->joinLeft(array('rule_coupons' => $this->getTable('salesrule/coupon')), 'main_table.rule_id = rule_coupons.rule_id AND rule_coupons.is_primary = 1', array('code'));
     return $this;
 }
开发者ID:njaeger,项目名称:magento_github,代码行数:12,代码来源:Collection.php

示例7: _initSelect

 /**
  * Instantiate select joined to balance
  *
  * @return Enterprise_CustomerBalance_Model_Resource_Balance_History_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->joinInner(array('b' => $this->getTable('enterprise_customerbalance/balance')), 'main_table.balance_id = b.balance_id', array('customer_id' => 'b.customer_id', 'website_id' => 'b.website_id', 'base_currency_code' => 'b.base_currency_code'));
     return $this;
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:11,代码来源:Collection.php

示例8: _initSelect

 /**
  * Init collection select
  *
  * @return Mage_Api_Model_Resource_Roles_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where('main_table.role_type = ?', Mage_Api_Model_Acl::ROLE_TYPE_GROUP);
     return $this;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:11,代码来源:Collection.php

示例9: _initSelect

 /**
  * Init collection select
  *
  * @return Mage_GoogleShopping_Model_Resource_Type_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinAttributeSet();
     return $this;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:11,代码来源:Collection.php

示例10: _initSelect

 /**
  * Initialize select object
  *
  * @return Mage_Eav_Model_Resource_Form_Fieldset_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $select = $this->getSelect();
     $select->join(array('default_label' => $this->getTable('eav/form_fieldset_label')), 'main_table.fieldset_id = default_label.fieldset_id AND default_label.store_id = 0', array());
     if ($this->getStoreId() == 0) {
         $select->columns('label', 'default_label');
     } else {
         $labelExpr = $select->getAdapter()->getIfNullSql('store_label.label', 'default_label.label');
         $joinCondition = $this->getConnection()->quoteInto('main_table.fieldset_id = store_label.fieldset_id AND store_label.store_id = ?', (int) $this->getStoreId());
         $select->joinLeft(array('store_label' => $this->getTable('eav/form_fieldset_label')), $joinCondition, array('label' => $labelExpr));
     }
     return $this;
 }
开发者ID:ksaltik,项目名称:tooldexlive,代码行数:19,代码来源:Collection.php

示例11: _initSelect

 /**
  * Initialize select object
  *
  * @return Mage_CatalogInventory_Model_Resource_Stock_Item_Collection
  */
 protected function _initSelect()
 {
     return parent::_initSelect()->getSelect()->join(array('cp_table' => $this->getTable('catalog/product')), 'main_table.product_id = cp_table.entity_id', array('type_id'));
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:9,代码来源:Collection.php

示例12: _initSelect

 /**
  * Init select
  *
  * @return Mage_Admin_Model_Resource_Roles_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where("main_table.role_type = ?", 'G');
     return $this;
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:11,代码来源:Collection.php

示例13: _initSelect

 /**
  * Init collection select
  *
  * @return Mage_Api_Model_Resource_Roles_User_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where("user_id > 0");
     return $this;
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:11,代码来源:Collection.php

示例14: _initSelect

 /**
  * Add status column based on dates
  *
  * @return Enterprise_CatalogEvent_Model_Resource_Event_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->columns(array('status' => $this->_getStatusColumnExpr()));
     return $this;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:11,代码来源:Collection.php

示例15: _initSelect

 /**
  * Add selected data
  *
  * @return Enterprise_Wishlist_Model_Resource_Item_Report_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $select = $this->getSelect();
     $select->reset(Zend_Db_Select::COLUMNS)->columns(array('item_qty' => 'qty', 'added_at', 'description', 'product_id'));
     $adapter = $this->getSelect()->getAdapter();
     $defaultWishlistName = Mage::helper('wishlist')->getDefaultWishlistName();
     $this->getSelect()->join(array('wishlist_table' => $this->getTable('wishlist/wishlist')), 'main_table.wishlist_id = wishlist_table.wishlist_id', array('visibility' => 'visibility', 'wishlist_name' => $adapter->getIfNullSql('name', $adapter->quote($defaultWishlistName))));
     $this->addFilterToMap('wishlist_name', $adapter->getIfNullSql('name', $adapter->quote($defaultWishlistName)))->addFilterToMap('item_qty', 'main_table.qty')->_addCustomerInfo()->_addProductInfo();
     return $this;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:16,代码来源:Collection.php


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