About Us
Company Blog
- 2011 Mobile Internet workshop of Hubei Province
- Our company attended the 2011 Annual Party of WSOA & WHSIA
- Two Drupal websites are delivered by EveBit Digital
- EveBit employees participate "HTML5 Workshop" in Wuhan
- EveBit Digital moves toward CMMI Level 3 Certification
- EveBit becomes IT service provider of China Wanderer
- EveBit participated "Cloud Computing Era of Process Improvement and Outsourcing Policy Announcement of Wuhan"
- EveBit helps clients to mobile!
- EveBit delivered Facebook Application for client
- EveBit attended Shanghai World Expo as outsourcing service provider
- How to upgrade big Magento site to v1.4 or higher version
- Some considerations about Zend Server
- Integration between Zend Studio and SVN
- Can Magento use Amazon S3?
- How to fix a strange image displaying error on Joomla!
EveBit fixes bug, contributing Magento development
As a professional development team o
f Magento, EveBit recently fixes a bug exsting on the latest version of Magento: v1.4.0.1, it's about a problem in Lifetime Sales calculation.
The full disscusion can be seen at: http://www.magentocommerce.com/boards/viewthread/198624/, and following is the general description about this bug:
----------------------------------------------------------------------------------------------
I have a problem in Lifetime Sales calculation.
All orders grand total sum together is $6.2. But in the Dashboard, the Lifetime Sales is almost $238.80!!!! that is very strange,
so I checked the core code.
/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php
the Lifetime Sales SQL statement is as below:
the problem I thought is in the SUM function in the SQL statement. the e.base_discount_amount in the SQL statement is a negative number(-59.4000). so negative negative is positive. so here, actually, is e.base_subtotal(60.0000) - discount_amount(-59.4000). I have 7 orders, 5 orders are free, not need to pay. the two paid orders are the same.
finally:
Lifetime Sales = (e.base_subtotal(60.0000) - discount_amount(-59.4000)) * 2;
Average Orders = Lifetime Sales / 7
I also check the Shipping Cart Price Rules, action tab, the Discount amount is a positive value, and the Apply is set to percentage of product price discount
so, does anyone can tell me why the Lifetime Sales is so far to the actually grand total?
Do I misunderstanding the meaning of Lifetime Sales or set the wrong Shipping Cart Price Rules?
Thanks in advance.
----------------------------------------------------------------------------------------------




----------------------------------------------------------------------------------------------
Solution:
In the file:
/app/code/local/Mage/Reports/Model/Mysql4/Order/Collection.php
line 204:
Original:
({{base_subtotal}}-IFNULL({{
Modified:
({{base_subtotal}}-IFNULL({{
line 205:
Original:
array('base_subtotal', 'base_to_global_rate', 'base_subtotal_refunded', 'base_subtotal_canceled','
Modified:
array('base_subtotal', 'base_to_global_rate', 'base_subtotal_refunded', 'base_tax_amount', 'base_subtotal_canceled','
line 209:
Original:
({{base_subtotal}}-IFNULL({{
修改后:
({{base_subtotal}}-IFNULL({{
line 210:
Original:
array('base_subtotal', 'base_subtotal_refunded', 'base_subtotal_canceled','
Modified:
array('base_subtotal', 'base_subtotal_refunded', 'base_tax_amount', 'base_subtotal_canceled','








