analytics-and-reports - Version 1.0.2.1

Version Notes

Freento Analytics & Reports extension for Magento. Allows to analyze live Magento store

Download this release

Release Info

Developer Freento.com
Extension analytics-and-reports
Version 1.0.2.1
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.2.1

app/code/community/Freento/Aconnector/controllers/Adminhtml/Freentoaconnectoradmin/ServiceController.php CHANGED
@@ -15,8 +15,7 @@ class Freento_Aconnector_Adminhtml_Freentoaconnectoradmin_ServiceController exte
15
  $block = $this->getLayout()->createBlock('adminhtml/template', 'freento_aconnector.connection_form')->setTemplate('freento/aconnector/connect.phtml');
16
 
17
  $block->setData(array(
18
- 'store_url' => Mage::getBaseUrl(),
19
- 'admin_url' => Mage::helper('adminhtml')->getUrl('*/*/return'),
20
  'username' => $keyModel->getUser()->getUsername(),
21
  'email' => $keyModel->getUser()->getEmail(),
22
  'user_id' => $keyModel->getUser()->getId(),
@@ -30,20 +29,18 @@ class Freento_Aconnector_Adminhtml_Freentoaconnectoradmin_ServiceController exte
30
  $this->getResponse()->setBody($block->toHtml());
31
  }
32
 
33
- public function returnAction()
34
- {
35
- $helper = Mage::helper('freento_aconnector');
36
-
37
- Mage::getSingleton('adminhtml/session')->addError($helper->__('We were unable to connect you to our service. Please, try again or contact support: <a class="email" href="mailto:support@analytics.freento.com">support@analytics.freento.com</a>'));
38
-
39
- $this->loadLayout();
40
- $this->renderLayout();
41
- }
42
-
43
  protected function _isAllowed()
44
  {
45
  return Mage::getSingleton('admin/session')->isAllowed('report/freento_aconnector');
46
  }
47
 
 
 
 
 
 
 
 
 
48
 
49
  }
15
  $block = $this->getLayout()->createBlock('adminhtml/template', 'freento_aconnector.connection_form')->setTemplate('freento/aconnector/connect.phtml');
16
 
17
  $block->setData(array(
18
+ 'store_url' => $this->_getStoreUrl(),
 
19
  'username' => $keyModel->getUser()->getUsername(),
20
  'email' => $keyModel->getUser()->getEmail(),
21
  'user_id' => $keyModel->getUser()->getId(),
29
  $this->getResponse()->setBody($block->toHtml());
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
32
  protected function _isAllowed()
33
  {
34
  return Mage::getSingleton('admin/session')->isAllowed('report/freento_aconnector');
35
  }
36
 
37
+ protected function _getStoreUrl()
38
+ {
39
+ return Mage::getModel('core/store')->getCollection()
40
+ ->addFieldToFilter('is_active', 1)
41
+ ->getFirstItem()
42
+ ->getBaseUrl()
43
+ ;
44
+ }
45
 
46
  }
app/code/community/Freento/Aconnector/controllers/Adminhtml/Freentoaconnectoradmin/ServiceController.php.orig ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Freento_Aconnector_Adminhtml_Freentoaconnectoradmin_ServiceController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+
6
+ public function connectAction()
7
+ {
8
+ $keyModel = Mage::getModel('freento_aconnector/keys');
9
+
10
+ $publicKey = '';
11
+ if(!$keyModel->isKeysGenerated()) {
12
+ $publicKey = $keyModel->generateKeys();
13
+ }
14
+
15
+ $block = $this->getLayout()->createBlock('adminhtml/template', 'freento_aconnector.connection_form')->setTemplate('freento/aconnector/connect.phtml');
16
+
17
+ $block->setData(array(
18
+ 'store_url' => $this->_getStoreUrl(),
19
+ 'username' => $keyModel->getUser()->getUsername(),
20
+ 'email' => $keyModel->getUser()->getEmail(),
21
+ 'user_id' => $keyModel->getUser()->getId(),
22
+ 'timezone' => Mage::getSingleton('core/date')->getGmtOffset('hours')
23
+ ));
24
+
25
+ if($publicKey) {
26
+ $block->setData('public_key', $publicKey);
27
+ }
28
+
29
+ $this->getResponse()->setBody($block->toHtml());
30
+ }
31
+
32
+ protected function _isAllowed()
33
+ {
34
+ return Mage::getSingleton('admin/session')->isAllowed('report/freento_aconnector');
35
+ }
36
+
37
+ protected function _getStoreUrl()
38
+ {
39
+ return Mage::getModel('core/store')->getCollection()
40
+ ->addFieldToFilter('is_active', 1)
41
+ ->getFirstItem()
42
+ ->getBaseUrl()
43
+ ;
44
+ }
45
+
46
+ }
app/code/community/Freento/Aconnector/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Freento_Aconnector>
5
- <version>1.0.2</version>
6
  </Freento_Aconnector>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Freento_Aconnector>
5
+ <version>1.0.2.1</version>
6
  </Freento_Aconnector>
7
  </modules>
8
  <global>
app/code/community/Freento/Aconnector/sql/freento_aconnector_setup/install-1.0.1.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- $installer = $this;
4
- $installer->startSetup();
5
-
6
- $table = $installer->getConnection()
7
- ->newTable($installer->getTable('freento_aconnector/keys'))
8
- ->addColumn('key_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
9
- 'unsigned' => true,
10
- 'nullable' => false,
11
- 'primary' => true,
12
- 'identity' => true,
13
- ), 'Private Key ID')
14
- ->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
15
- 'nullable' => false,
16
- ), 'Admin User ID')
17
- ->addColumn('private_key', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
18
- 'nullable' => false,
19
- 'default' => '',
20
- ), 'Private Key')
21
- ->addForeignKey(
22
- $installer->getFkName('admin_user', 'user_id', 'freento_aconnector_keys','user_id'),
23
- 'user_id',
24
- $installer->getTable('admin_user'),
25
- 'user_id',
26
- Varien_Db_Ddl_Table::ACTION_CASCADE,
27
- Varien_Db_Ddl_Table::ACTION_CASCADE
28
- )
29
- ->setComment('Aconnector Admin Keys')
30
- ;
31
-
32
- $installer->getConnection()->createTable($table);
33
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>analytics-and-reports</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://freento.com/license.html">Freento.com license</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Freento Analytics &amp; Reports extension for Magento. Allows to analyze live Magento store</description>
11
  <notes>Freento Analytics &amp; Reports extension for Magento. Allows to analyze live Magento store</notes>
12
  <authors><author><name>Freento.com</name><user>Freento</user><email>support@freento.com</email></author></authors>
13
- <date>2016-10-22</date>
14
- <time>19:56:04</time>
15
- <contents><target name="magecommunity"><dir name="Freento"><dir name="Aconnector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Disconnect.php" hash="f2c941c43f56f4a645907edc9b219322"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Abstract.php" hash="c148d0897f0632608342d988ded7679d"/></dir><file name="Crypt.php" hash="7f5383aa5f67a861f5d11506c26a98dd"/><dir name="Helper"><file name="Data.php" hash="2d5fba11d22c37cf1bf76e87bf0890f0"/></dir><dir name="Model"><file name="Aconnector.php" hash="2bfa93dd6895205b5fa16781f343bae7"/><dir name="Customer"><file name="Group.php" hash="b4abaad78527d0e6238b47daa127c4e0"/></dir><file name="Customer.php" hash="751006e79f343a3f6226fef78dcefc51"/><file name="Keys.php" hash="e04ff51afa99f3d8d2dba3e90d85ff19"/><file name="Log.php" hash="a8f927a896b37b755cc7e806527518a6"/><file name="Order.php" hash="18f180332401bbbd9fa9250121594961"/><file name="Product.php" hash="3c6f4d2d16e91c8af6af3c8bfbf8a116"/><dir name="Report"><file name="Abstract.php" hash="ed5263b45f63d8b0d63316dbc2154e0d"/><file name="AllCustomers.php" hash="89795190f055d5f80ab85d9d12749b84"/><file name="AllProducts.php" hash="7cbabab3219575c1b95c298b7e968f50"/><file name="BestCategory.php" hash="0b34a2dc5a215d64e385870acade46ef"/><file name="BestCoupons.php" hash="e7dc3b5ccb587915e9326976c49c018d"/><file name="Bestsellers.php" hash="61598e5629e708cc85c05de2eb7722c1"/><file name="Comparable.php" hash="baf2b5469417dd21a62057c48279fbb4"/><file name="CustomerPurchases.php" hash="cd79762ec0a9b9900eeedd42387d22fb"/><file name="DaysForTheFirstPurchase.php" hash="57ab11f436336886bf223402b065aacc"/><dir name="Grouped"><file name="Abstract.php" hash="dce3a5d4913a2b3be523dc21209c8c2d"/></dir><file name="MostRefunded.php" hash="cde29cc83fd0718db3254e0e1ac2cc17"/><file name="NewCustomersByPeriod.php" hash="49648fa2dbdd7ada7c577bf000db0f88"/><file name="ProductsByCustomer.php" hash="8d62a1238b646112d524f2394ed88019"/><file name="RefundsPercent.php" hash="3e20337b1923088b883ee715409d78af"/><file name="Sales.php" hash="4995e4abd2fc27e9a64e838002989725"/><file name="SalesByCategory.php" hash="80ee21055a58ef9d7025983da84289c9"/><file name="SalesByCountry.php" hash="2fd1d9e5869081e102aff12bc33abaff"/><file name="SalesByCustomer.php" hash="684b892193a28cfafebf1b6cc1bd2286"/><file name="SalesByCustomerGroup.php" hash="cf78058322a52b640eb0d498d627e1d2"/><file name="SalesByDayOfWeek.php" hash="7905703253012838532bc03e49acc1f9"/><file name="SalesByHour.php" hash="bbb2af36c59e35c907c4eee02de991a7"/><file name="SalesByMonth.php" hash="18b2704c19d6cf36dd3af7268c2a964d"/><file name="SalesByPeriodOfTime.php" hash="e381a045488cd40581ead10feb5f906e"/><file name="SalesByProduct.php" hash="4a0856ade173bf5ec49dc2b5f76e6354"/><file name="SalesByQuarter.php" hash="8a69485150620316a145567e7730160c"/><file name="SalesByState.php" hash="4e85aef8ab322d506aafdb679df538f8"/><file name="SalesByWeek.php" hash="dfa5268f3f52b83697c25aea05c9b9fc"/><file name="SalesByYear.php" hash="21e87b6af89d5a69b1b2827273eafc36"/><file name="SalesDetailed.php" hash="76873c534a0f25ac849133508f462b68"/></dir><dir name="Resource"><dir name="Keys"><file name="Collection.php" hash="809f804e953941c65d66f013d40aebcd"/></dir><file name="Keys.php" hash="5f0521ded6e1e9737928f7506098edb7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Freentoaconnectoradmin"><file name="ServiceController.php" hash="69288bde8d62d168855821816116f52e"/><dir name="System"><file name="ConfigController.php" hash="3c0e78c8a8049ab56fc3224c77574969"/></dir></dir></dir><file name="CustomerController.php" hash="e3214f8885f340dca32d426dd633c508"/><file name="CustomerGroupController.php" hash="72a43f857d480d816a5aa750f9e85681"/><file name="IndexController.php" hash="544d275d3b410e0f7b911f4a41ebe3db"/><file name="OrderController.php" hash="65dba278031a5395b019e247489fd544"/><file name="ProductController.php" hash="4850a1a5734cbf8a842e0496f04fc861"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a1ea66a062b6cd359a9472d319a2cde0"/><file name="config.xml" hash="f699df2ce07523ef4062f1580258b83f"/><file name="system.xml" hash="444a8a52b246e3f2b74a7ef317089f7a"/></dir><dir name="sql"><dir name="freento_aconnector_setup"><file name="install-1.0.0.php" hash="66abb5f00fc54e2f643ab4c059e84cad"/><file name="install-1.0.1.php" hash="4e5a7ee5e5213063bce05badba21e9da"/><file name="upgrade-1.0.0-1.0.1.php" hash="55e5753b95fd1077d6b77510bab52d5e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Freento_Aconnector.xml" hash="6ed931f4a1d7db685e90488895278de7"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="freento"><dir name="aconnector"><file name="connect.phtml" hash="97819d04417b56226ac41898e158d139"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.4.0</min><max>7.1.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>analytics-and-reports</name>
4
+ <version>1.0.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://freento.com/license.html">Freento.com license</license>
7
  <channel>community</channel>
10
  <description>Freento Analytics &amp; Reports extension for Magento. Allows to analyze live Magento store</description>
11
  <notes>Freento Analytics &amp; Reports extension for Magento. Allows to analyze live Magento store</notes>
12
  <authors><author><name>Freento.com</name><user>Freento</user><email>support@freento.com</email></author></authors>
13
+ <date>2016-10-31</date>
14
+ <time>08:05:31</time>
15
+ <contents><target name="magecommunity"><dir name="Freento"><dir name="Aconnector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Disconnect.php" hash="f2c941c43f56f4a645907edc9b219322"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Abstract.php" hash="c148d0897f0632608342d988ded7679d"/></dir><file name="Crypt.php" hash="7f5383aa5f67a861f5d11506c26a98dd"/><dir name="Helper"><file name="Data.php" hash="2d5fba11d22c37cf1bf76e87bf0890f0"/></dir><dir name="Model"><file name="Aconnector.php" hash="2bfa93dd6895205b5fa16781f343bae7"/><dir name="Customer"><file name="Group.php" hash="b4abaad78527d0e6238b47daa127c4e0"/></dir><file name="Customer.php" hash="751006e79f343a3f6226fef78dcefc51"/><file name="Keys.php" hash="e04ff51afa99f3d8d2dba3e90d85ff19"/><file name="Log.php" hash="a8f927a896b37b755cc7e806527518a6"/><file name="Order.php" hash="18f180332401bbbd9fa9250121594961"/><file name="Product.php" hash="3c6f4d2d16e91c8af6af3c8bfbf8a116"/><dir name="Report"><file name="Abstract.php" hash="ed5263b45f63d8b0d63316dbc2154e0d"/><file name="AllCustomers.php" hash="89795190f055d5f80ab85d9d12749b84"/><file name="AllProducts.php" hash="7cbabab3219575c1b95c298b7e968f50"/><file name="BestCategory.php" hash="0b34a2dc5a215d64e385870acade46ef"/><file name="BestCoupons.php" hash="e7dc3b5ccb587915e9326976c49c018d"/><file name="Bestsellers.php" hash="61598e5629e708cc85c05de2eb7722c1"/><file name="Comparable.php" hash="baf2b5469417dd21a62057c48279fbb4"/><file name="CustomerPurchases.php" hash="cd79762ec0a9b9900eeedd42387d22fb"/><file name="DaysForTheFirstPurchase.php" hash="57ab11f436336886bf223402b065aacc"/><dir name="Grouped"><file name="Abstract.php" hash="dce3a5d4913a2b3be523dc21209c8c2d"/></dir><file name="MostRefunded.php" hash="cde29cc83fd0718db3254e0e1ac2cc17"/><file name="NewCustomersByPeriod.php" hash="49648fa2dbdd7ada7c577bf000db0f88"/><file name="ProductsByCustomer.php" hash="8d62a1238b646112d524f2394ed88019"/><file name="RefundsPercent.php" hash="3e20337b1923088b883ee715409d78af"/><file name="Sales.php" hash="4995e4abd2fc27e9a64e838002989725"/><file name="SalesByCategory.php" hash="80ee21055a58ef9d7025983da84289c9"/><file name="SalesByCountry.php" hash="2fd1d9e5869081e102aff12bc33abaff"/><file name="SalesByCustomer.php" hash="684b892193a28cfafebf1b6cc1bd2286"/><file name="SalesByCustomerGroup.php" hash="cf78058322a52b640eb0d498d627e1d2"/><file name="SalesByDayOfWeek.php" hash="7905703253012838532bc03e49acc1f9"/><file name="SalesByHour.php" hash="bbb2af36c59e35c907c4eee02de991a7"/><file name="SalesByMonth.php" hash="18b2704c19d6cf36dd3af7268c2a964d"/><file name="SalesByPeriodOfTime.php" hash="e381a045488cd40581ead10feb5f906e"/><file name="SalesByProduct.php" hash="4a0856ade173bf5ec49dc2b5f76e6354"/><file name="SalesByQuarter.php" hash="8a69485150620316a145567e7730160c"/><file name="SalesByState.php" hash="4e85aef8ab322d506aafdb679df538f8"/><file name="SalesByWeek.php" hash="dfa5268f3f52b83697c25aea05c9b9fc"/><file name="SalesByYear.php" hash="21e87b6af89d5a69b1b2827273eafc36"/><file name="SalesDetailed.php" hash="76873c534a0f25ac849133508f462b68"/></dir><dir name="Resource"><dir name="Keys"><file name="Collection.php" hash="809f804e953941c65d66f013d40aebcd"/></dir><file name="Keys.php" hash="5f0521ded6e1e9737928f7506098edb7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Freentoaconnectoradmin"><file name="ServiceController.php" hash="341de0ace658d4ae9d66b1107b92b537"/><file name="ServiceController.php.orig" hash="341de0ace658d4ae9d66b1107b92b537"/><dir name="System"><file name="ConfigController.php" hash="3c0e78c8a8049ab56fc3224c77574969"/></dir></dir></dir><file name="CustomerController.php" hash="e3214f8885f340dca32d426dd633c508"/><file name="CustomerGroupController.php" hash="72a43f857d480d816a5aa750f9e85681"/><file name="IndexController.php" hash="544d275d3b410e0f7b911f4a41ebe3db"/><file name="OrderController.php" hash="65dba278031a5395b019e247489fd544"/><file name="ProductController.php" hash="4850a1a5734cbf8a842e0496f04fc861"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a1ea66a062b6cd359a9472d319a2cde0"/><file name="config.xml" hash="4abc08db21edbf1b4283f36ee97bb22f"/><file name="system.xml" hash="444a8a52b246e3f2b74a7ef317089f7a"/></dir><dir name="sql"><dir name="freento_aconnector_setup"><file name="install-1.0.0.php" hash="66abb5f00fc54e2f643ab4c059e84cad"/><file name="upgrade-1.0.0-1.0.1.php" hash="55e5753b95fd1077d6b77510bab52d5e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Freento_Aconnector.xml" hash="6ed931f4a1d7db685e90488895278de7"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="freento"><dir name="aconnector"><file name="connect.phtml" hash="97819d04417b56226ac41898e158d139"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.4.0</min><max>7.1.0</max></php></required></dependencies>
18
  </package>