AW_Onpulse - Version 1.0.14

Version Notes

+ currency formatting
* minor bug fixes

Download this release

Release Info

Developer AW_Core_Team
Extension AW_Onpulse
Version 1.0.14
Comparing to
See all releases


Code changes from version 1.0.13 to 1.0.14

app/code/local/AW/Onpulse/Helper/Data.php CHANGED
@@ -162,6 +162,7 @@ class AW_Onpulse_Helper_Data extends Mage_Core_Helper_Abstract
162
 
163
  return array(
164
  'connector_version' => (string)Mage::getConfig()->getNode()->modules->AW_Onpulse->version,
 
165
  'clients' => $processedClients,
166
  'orders' => $processedOrders,
167
  'dashboard' => $dashboard,
162
 
163
  return array(
164
  'connector_version' => (string)Mage::getConfig()->getNode()->modules->AW_Onpulse->version,
165
+ 'price_format' =>Mage::app()->getLocale()->getJsPriceFormat(),
166
  'clients' => $processedClients,
167
  'orders' => $processedOrders,
168
  'dashboard' => $dashboard,
app/code/local/AW/Onpulse/Model/Aggregator/Components/Statistics.php CHANGED
@@ -116,7 +116,8 @@ class AW_Onpulse_Model_Aggregator_Components_Statistics extends AW_Onpulse_Model
116
  unset($orders);
117
 
118
  $orders = Mage::getModel('sales/order_item')->getCollection()
119
- ->addFieldToFilter('order_id',array('in'=>$orderIds));
 
120
  $orders = Mage::getSingleton('core/resource')->getConnection('sales_read')->query($orders->getSelect()->resetJoinLeft())->fetchAll();
121
 
122
  $items = array();
@@ -240,7 +241,7 @@ class AW_Onpulse_Model_Aggregator_Components_Statistics extends AW_Onpulse_Model
240
  }
241
  $daysFrom1st=$copyDate->get(Zend_Date::DAY);
242
  $orders = Mage::getModel('sales/order')->getCollection();
243
- $orders->addAttributeToFilter('created_at', array('from' => $copyDate->addDay(-$daysFrom1st)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT),'to'=>$copyDate->addDay($daysFrom1st-1)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)))
244
  ->addAttributeToSelect('*')
245
  ->addAttributeToFilter('status', array('in' => $ordersstatus));
246
  $thisMonthSoFar = 0;
@@ -251,7 +252,7 @@ class AW_Onpulse_Model_Aggregator_Components_Statistics extends AW_Onpulse_Model
251
  }
252
  $thisMonthForecast = 0;
253
  $numberDaysInMonth = $copyDate->get(Zend_Date::MONTH_DAYS);
254
- $thisMonthAvg = $thisMonthSoFar /($daysFrom1st - 1);
255
  $thisMonthForecast = $thisMonthAvg * $numberDaysInMonth;
256
  $thisMonth = array();
257
  $thisMonth['thisMonthSoFar'] = Mage::helper('awonpulse')->getPriceFormat($thisMonthSoFar);
116
  unset($orders);
117
 
118
  $orders = Mage::getModel('sales/order_item')->getCollection()
119
+ ->addFieldToFilter('order_id',array('in'=>$orderIds))
120
+ ->addFieldToFilter('parent_item_id', array('null'=> true));
121
  $orders = Mage::getSingleton('core/resource')->getConnection('sales_read')->query($orders->getSelect()->resetJoinLeft())->fetchAll();
122
 
123
  $items = array();
241
  }
242
  $daysFrom1st=$copyDate->get(Zend_Date::DAY);
243
  $orders = Mage::getModel('sales/order')->getCollection();
244
+ $orders->addAttributeToFilter('created_at', array('from' => $copyDate->addDay(-($daysFrom1st-1))->toString(Varien_Date::DATETIME_INTERNAL_FORMAT),'to'=>$copyDate->addDay($daysFrom1st)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)))
245
  ->addAttributeToSelect('*')
246
  ->addAttributeToFilter('status', array('in' => $ordersstatus));
247
  $thisMonthSoFar = 0;
252
  }
253
  $thisMonthForecast = 0;
254
  $numberDaysInMonth = $copyDate->get(Zend_Date::MONTH_DAYS);
255
+ $thisMonthAvg = $thisMonthSoFar /($daysFrom1st-1);
256
  $thisMonthForecast = $thisMonthAvg * $numberDaysInMonth;
257
  $thisMonth = array();
258
  $thisMonth['thisMonthSoFar'] = Mage::helper('awonpulse')->getPriceFormat($thisMonthSoFar);
app/code/local/AW/Onpulse/controllers/IndexController.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class AW_Onpulse_IndexController extends Mage_Core_Controller_Front_Action {
3
+
4
+ //TODO Remove before publish
5
+ public function indexAction()
6
+ {
7
+ $this->loadLayout();
8
+ $aggregator = Mage::getSingleton('awonpulse/aggregator')->Aggregate();
9
+ $output = Mage::helper('awonpulse')->processOutput($aggregator);
10
+ echo serialize($output);
11
+
12
+ }
13
+ }
app/code/local/AW/Onpulse/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <AW_Onpulse>
5
- <version>1.0.13</version>
6
  </AW_Onpulse>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <AW_Onpulse>
5
+ <version>1.0.14</version>
6
  </AW_Onpulse>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AW_Onpulse</name>
4
- <version>1.0.13</version>
5
  <stability>stable</stability>
6
  <license uri="http://onpulse.info/TOS.pdf">EULA</license>
7
  <channel>community</channel>
@@ -9,11 +9,12 @@
9
  <summary>Mobile administration for Magento</summary>
10
  <description>OnPulse provides you with an access to your sales statistics, the latest orders, and the clients list through any iOS or Android powered mobile device.&#xD;
11
  </description>
12
- <notes>+ performance improvements</notes>
 
13
  <authors><author><name>AW_Core_Team</name><user>aheadworks</user><email>no-reply@aheadworks.com</email></author></authors>
14
- <date>2013-07-29</date>
15
- <time>09:12:23</time>
16
- <contents><target name="magelocal"><dir name="AW"><dir name="Onpulse"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Onpulse"><file name="Settings.php" hash="6ba04d380ea7140b42c54f00a0acc452"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="08b4ef40a59046502997acfde2bf4d03"/><file name="Data.php.orig" hash="fb2ab95d3268d3d8a689143dff7ffdb8"/></dir><dir name="Model"><dir name="Aggregator"><file name="Component.php" hash="721719d0df46da388b229c10d137864b"/><dir name="Components"><file name="Customer.php" hash="52df2d3be2d6196ee957b2e2c0d92cb2"/><file name="Order.php" hash="a9a23d8f678a68f1b245b97126cc3116"/><file name="Statistics.php" hash="e64a74103ab7b6c9cd93267b00dd5f79"/><file name="Statistics.php.orig" hash="919ccaa59b981eb624387937fa4390f1"/></dir></dir><file name="Aggregator.php" hash="fcb4342d583403a99ca7bc245115854f"/><file name="Credentials.php" hash="526d3b476480552ae03f38696bd6fc93"/></dir><dir name="etc"><file name="config.xml" hash="5f74ee63e9bb1ea38089125622df0d0a"/><file name="system.xml" hash="11fa0896cc56063c5c572d992622e224"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="aw_onpulse"><file name="settings.phtml" hash="10c6eea6457de53e501360b25eb50f1d"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="AW_Onpulse.xml" hash="de39a5ffebb31ee697fbaf56bb1bfb8a"/></dir></dir><dir name="locale"><dir name="en_US"><file name="AW_Onpulse.csv" hash="23f7bee483404129d0f811a2f53cf38d"/></dir></dir></dir><dir><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="aw_onpulse.xml" hash="5036d3b89b9a204c9420f40f3983d987"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AW_Onpulse</name>
4
+ <version>1.0.14</version>
5
  <stability>stable</stability>
6
  <license uri="http://onpulse.info/TOS.pdf">EULA</license>
7
  <channel>community</channel>
9
  <summary>Mobile administration for Magento</summary>
10
  <description>OnPulse provides you with an access to your sales statistics, the latest orders, and the clients list through any iOS or Android powered mobile device.&#xD;
11
  </description>
12
+ <notes>+ currency formatting&#xD;
13
+ * minor bug fixes</notes>
14
  <authors><author><name>AW_Core_Team</name><user>aheadworks</user><email>no-reply@aheadworks.com</email></author></authors>
15
+ <date>2013-09-03</date>
16
+ <time>06:22:41</time>
17
+ <contents><target name="magelocal"><dir name="AW"><dir name="Onpulse"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Onpulse"><file name="Settings.php" hash="6ba04d380ea7140b42c54f00a0acc452"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="88a0b32ce2c65c1850d072f41bb521e6"/><file name="Data.php.orig" hash="fb2ab95d3268d3d8a689143dff7ffdb8"/></dir><dir name="Model"><dir name="Aggregator"><file name="Component.php" hash="721719d0df46da388b229c10d137864b"/><dir name="Components"><file name="Customer.php" hash="52df2d3be2d6196ee957b2e2c0d92cb2"/><file name="Order.php" hash="a9a23d8f678a68f1b245b97126cc3116"/><file name="Statistics.php" hash="c2ee05f14c1d6b4ff27b910ecb3c0649"/><file name="Statistics.php.orig" hash="919ccaa59b981eb624387937fa4390f1"/></dir></dir><file name="Aggregator.php" hash="fcb4342d583403a99ca7bc245115854f"/><file name="Credentials.php" hash="526d3b476480552ae03f38696bd6fc93"/></dir><dir name="controllers"><file name="IndexController.php" hash="b37753e87cfb6a18045cf9af7a255a84"/></dir><dir name="etc"><file name="config.xml" hash="9e5b3dd18372f8d7a573d86614536956"/><file name="system.xml" hash="11fa0896cc56063c5c572d992622e224"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="aw_onpulse"><file name="settings.phtml" hash="10c6eea6457de53e501360b25eb50f1d"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="AW_Onpulse.xml" hash="de39a5ffebb31ee697fbaf56bb1bfb8a"/></dir></dir><dir name="locale"><dir name="en_US"><file name="AW_Onpulse.csv" hash="23f7bee483404129d0f811a2f53cf38d"/></dir></dir></dir><dir><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="aw_onpulse.xml" hash="5036d3b89b9a204c9420f40f3983d987"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>