• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mage_Sales_Model_Resource_Report_Collection_Abstract类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _applyCustomFilter

 /**
  * Apply collection custom filter
  *
  * @return Mage_Sales_Model_Resource_Report_Collection_Abstract
  */
 protected function _applyCustomFilter()
 {
     $this->_applyRulesFilter();
     return parent::_applyCustomFilter();
 }
开发者ID:natxetee,项目名称:magento2,代码行数:10,代码来源:Collection.php


示例2: __construct

 /**
  * Initialize custom resource model
  *
  */
 public function __construct()
 {
     parent::_construct();
     $this->setModel('adminhtml/report_item');
     $this->_resource = Mage::getResourceModel('sales/report')->init($this->_aggregationTable);
     $this->setConnection($this->getResource()->getReadConnection());
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:11,代码来源:Collection.php


示例3: __construct

 /**
  * Initialize custom resource model
  *
  */
 public function __construct()
 {
     parent::_construct();
     $this->setModel('Mage_Adminhtml_Model_Report_Item');
     $this->_resource = Mage::getResourceModel('Mage_Sales_Model_Resource_Report')->init('sales_refunded_aggregated_order');
     $this->setConnection($this->getResource()->getReadConnection());
 }
开发者ID:relue,项目名称:magento2,代码行数:11,代码来源:Order.php


示例4: _beforeLoad

 /**
  * Redeclare parent method for applying filters after parent method
  * but before adding unions and calculating totals
  *
  * @return Mage_Sales_Model_Resource_Report_Bestsellers_Collection
  */
 protected function _beforeLoad()
 {
     parent::_beforeLoad();
     $this->_applyStoresFilter();
     if ($this->_period) {
         //
         $selectUnions = array();
         // apply date boundaries (before calling $this->_applyDateRangeFilter())
         $dtFormat = Varien_Date::DATE_INTERNAL_FORMAT;
         $periodFrom = !is_null($this->_from) ? new Zend_Date($this->_from, $dtFormat) : null;
         $periodTo = !is_null($this->_to) ? new Zend_Date($this->_to, $dtFormat) : null;
         if ('year' == $this->_period) {
             if ($periodFrom) {
                 // not the first day of the year
                 if ($periodFrom->toValue(Zend_Date::MONTH) != 1 || $periodFrom->toValue(Zend_Date::DAY) != 1) {
                     $dtFrom = $periodFrom->getDate();
                     // last day of the year
                     $dtTo = $periodFrom->getDate()->setMonth(12)->setDay(31);
                     if (!$periodTo || $dtTo->isEarlier($periodTo)) {
                         $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                         // first day of the next year
                         $this->_from = $periodFrom->getDate()->addYear(1)->setMonth(1)->setDay(1)->toString($dtFormat);
                     }
                 }
             }
             if ($periodTo) {
                 // not the last day of the year
                 if ($periodTo->toValue(Zend_Date::MONTH) != 12 || $periodTo->toValue(Zend_Date::DAY) != 31) {
                     $dtFrom = $periodTo->getDate()->setMonth(1)->setDay(1);
                     // first day of the year
                     $dtTo = $periodTo->getDate();
                     if (!$periodFrom || $dtFrom->isLater($periodFrom)) {
                         $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                         // last day of the previous year
                         $this->_to = $periodTo->getDate()->subYear(1)->setMonth(12)->setDay(31)->toString($dtFormat);
                     }
                 }
             }
             if ($periodFrom && $periodTo) {
                 // the same year
                 if ($periodFrom->toValue(Zend_Date::YEAR) == $periodTo->toValue(Zend_Date::YEAR)) {
                     $dtFrom = $periodFrom->getDate();
                     $dtTo = $periodTo->getDate();
                     $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                     $this->getSelect()->where('1<>1');
                 }
             }
         } else {
             if ('month' == $this->_period) {
                 if ($periodFrom) {
                     // not the first day of the month
                     if ($periodFrom->toValue(Zend_Date::DAY) != 1) {
                         $dtFrom = $periodFrom->getDate();
                         // last day of the month
                         $dtTo = $periodFrom->getDate()->addMonth(1)->setDay(1)->subDay(1);
                         if (!$periodTo || $dtTo->isEarlier($periodTo)) {
                             $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                             // first day of the next month
                             $this->_from = $periodFrom->getDate()->addMonth(1)->setDay(1)->toString($dtFormat);
                         }
                     }
                 }
                 if ($periodTo) {
                     // not the last day of the month
                     if ($periodTo->toValue(Zend_Date::DAY) != $periodTo->toValue(Zend_Date::MONTH_DAYS)) {
                         $dtFrom = $periodTo->getDate()->setDay(1);
                         // first day of the month
                         $dtTo = $periodTo->getDate();
                         if (!$periodFrom || $dtFrom->isLater($periodFrom)) {
                             $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                             // last day of the previous month
                             $this->_to = $periodTo->getDate()->setDay(1)->subDay(1)->toString($dtFormat);
                         }
                     }
                 }
                 if ($periodFrom && $periodTo) {
                     // the same month
                     if ($periodFrom->toValue(Zend_Date::YEAR) == $periodTo->toValue(Zend_Date::YEAR) && $periodFrom->toValue(Zend_Date::MONTH) == $periodTo->toValue(Zend_Date::MONTH)) {
                         $dtFrom = $periodFrom->getDate();
                         $dtTo = $periodTo->getDate();
                         $selectUnions[] = $this->_makeBoundarySelect($dtFrom->toString($dtFormat), $dtTo->toString($dtFormat));
                         $this->getSelect()->where('1<>1');
                     }
                 }
             }
         }
         $this->_applyDateRangeFilter();
         // add unions to select
         if ($selectUnions) {
             $unionParts = array();
             $cloneSelect = clone $this->getSelect();
             $helper = Mage::getResourceHelper('core');
             $unionParts[] = '(' . $cloneSelect . ')';
             foreach ($selectUnions as $union) {
//.........这里部分代码省略.........
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:101,代码来源:Collection.php


示例5: load

 /**
  * Load
  *
  * @param boolean $printQuery
  * @param boolean $logQuery
  * @return Mage_Tax_Model_Resource_Report_Updatedat_Collection
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     $this->_initSelect();
     $this->setApplyFilters(false);
     return parent::load($printQuery, $logQuery);
 }
开发者ID:njaeger,项目名称:magento_github,代码行数:16,代码来源:Collection.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Mage_Shipping_Model_Rate_Request类代码示例发布时间:2022-05-23
下一篇:
PHP Mage_Sales_Model_Resource_Order_Abstract类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap