Version Notes
Initial release.
Download this release
Release Info
Developer | StoreFront Consulting |
Extension | sfc_visistat |
Version | 1.0.2 |
Comparing to | |
See all releases |
Version 1.0.2
- app/code/local/SFC/VisiStat/Block/Adminhtml/System/Config/Form/Field/Didhelp.php +30 -0
- app/code/local/SFC/VisiStat/Helper/Data.php +14 -0
- app/code/local/SFC/VisiStat/controllers/IframeController.php +60 -0
- app/code/local/SFC/VisiStat/etc/config.xml +79 -0
- app/code/local/SFC/VisiStat/etc/system.xml +93 -0
- app/design/adminhtml/default/visistat/template/dashboard/index.phtml +136 -0
- app/design/frontend/base/default/layout/sfcvisistat.xml +8 -0
- app/design/frontend/base/default/template/sfcvisistat/tracking.phtml +31 -0
- app/etc/modules/SFC_VisiStat.xml +9 -0
- package.xml +20 -0
- skin/adminhtml/base/default/sfcvisistat/img/didhelp.png +0 -0
app/code/local/SFC/VisiStat/Block/Adminhtml/System/Config/Form/Field/Didhelp.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreFront Consulting VisiStat Module
|
4 |
+
*
|
5 |
+
* @category SFC
|
6 |
+
* @package SFC_VisiStat
|
7 |
+
* @author StoreFront Consulting, Inc.
|
8 |
+
* @website http://www.storefrontconsulting.com
|
9 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class SFC_VisiStat_Block_Adminhtml_System_Config_Form_Field_Didhelp extends Mage_Adminhtml_Block_System_Config_Form_Field
|
13 |
+
{
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Override method to output our custom HTML with JavaScript
|
17 |
+
*
|
18 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
19 |
+
* @return String
|
20 |
+
*/
|
21 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
22 |
+
{
|
23 |
+
// Help image
|
24 |
+
$sHtml = '<p>Your DID Number is located in your VisiStat account, under the <a href="http://www.visistat.com/tracking/tracking-snippet.php" target="_blank">Account Options</a>.';
|
25 |
+
$sHtml .= '<img src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/base/default/sfcvisistat/img/didhelp.png" title="Where is my API Key?" alt="Where is my API Key?" style="margin: 10px 0 0 0; border: 1px solid #D6D6D6" />';
|
26 |
+
//
|
27 |
+
// Return
|
28 |
+
return $sHtml;
|
29 |
+
}
|
30 |
+
}
|
app/code/local/SFC/VisiStat/Helper/Data.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreFront Consulting VisiStat Module
|
4 |
+
*
|
5 |
+
* @category SFC
|
6 |
+
* @package SFC_VisiStat
|
7 |
+
* @author StoreFront Consulting, Inc.
|
8 |
+
* @website http://www.storefrontconsulting.com
|
9 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class SFC_Visistat_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
+
{
|
14 |
+
}
|
app/code/local/SFC/VisiStat/controllers/IframeController.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreFront Consulting VisiStat Module
|
4 |
+
*
|
5 |
+
* @category SFC
|
6 |
+
* @package SFC_VisiStat
|
7 |
+
* @author StoreFront Consulting, Inc.
|
8 |
+
* @website http://www.storefrontconsulting.com
|
9 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class SFC_VisiStat_IframeController extends Mage_Adminhtml_Controller_action
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Constants
|
16 |
+
*/
|
17 |
+
const URL_LOGGEDIN = 'https://www.visistat.com/index.php?Log=1&DID=%d&login=%s&pwd=%s&sfcvisistat=1';
|
18 |
+
const URL_SETUP = 'https://www.visistat.com/magento-visistat.php';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Index action
|
22 |
+
*/
|
23 |
+
public function indexAction()
|
24 |
+
{
|
25 |
+
// Nothing to do here
|
26 |
+
$this->getResponse()->setRedirect(Mage::helper('adminhtml')->getUrl('sfcvisistat/iframe/login'));
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Login action
|
31 |
+
*/
|
32 |
+
public function loginAction()
|
33 |
+
{
|
34 |
+
// Get config values
|
35 |
+
$sDomain = Mage::getStoreConfig('sfcvisistat/configs/domain');
|
36 |
+
$sPassword = Mage::helper('core')->decrypt(Mage::getStoreConfig('sfcvisistat/configs/password'));
|
37 |
+
$iDidNum = intval(Mage::getStoreConfig('sfcvisistat/configs/did'));
|
38 |
+
|
39 |
+
// Valid?
|
40 |
+
if (!$sDomain || !$sPassword || $iDidNum <= 0 || !strlen(trim($sDomain)) || !strlen(trim($sPassword))) {
|
41 |
+
$this->getResponse()->setRedirect(Mage::helper('adminhtml')->getUrl('sfcvisistat/iframe/nosetup'));
|
42 |
+
}
|
43 |
+
else {
|
44 |
+
$this->getResponse()->setRedirect(sprintf(self::URL_LOGGEDIN, $iDidNum, $sDomain, $sPassword));
|
45 |
+
}
|
46 |
+
|
47 |
+
// Send response
|
48 |
+
$this->getResponse()->sendResponse();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* No setup action
|
53 |
+
*/
|
54 |
+
public function noSetupAction()
|
55 |
+
{
|
56 |
+
// Load layout
|
57 |
+
$this->getResponse()->setRedirect(self::URL_SETUP);
|
58 |
+
$this->getResponse()->sendResponse();
|
59 |
+
}
|
60 |
+
}
|
app/code/local/SFC/VisiStat/etc/config.xml
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* StoreFront Consulting VisiStat Module
|
5 |
+
*
|
6 |
+
* @category SFC
|
7 |
+
* @package SFC_VisiStat
|
8 |
+
* @author StoreFront Consulting, Inc.
|
9 |
+
* @website http://www.storefrontconsulting.com
|
10 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
11 |
+
*/
|
12 |
+
-->
|
13 |
+
<config>
|
14 |
+
<modules>
|
15 |
+
<SFC_VisiStat>
|
16 |
+
<version>1.0.0</version>
|
17 |
+
</SFC_VisiStat>
|
18 |
+
</modules>
|
19 |
+
<default>
|
20 |
+
<sfcvisistat>
|
21 |
+
<configs>
|
22 |
+
<addtrackingcode>1</addtrackingcode>
|
23 |
+
</configs>
|
24 |
+
</sfcvisistat>
|
25 |
+
</default>
|
26 |
+
<stores>
|
27 |
+
<admin>
|
28 |
+
<design>
|
29 |
+
<theme>
|
30 |
+
<default>visistat</default>
|
31 |
+
</theme>
|
32 |
+
</design>
|
33 |
+
</admin>
|
34 |
+
</stores>
|
35 |
+
<admin>
|
36 |
+
<routers>
|
37 |
+
<sfcvisistat>
|
38 |
+
<use>admin</use>
|
39 |
+
<args>
|
40 |
+
<module>SFC_VisiStat</module>
|
41 |
+
<frontName>sfcvisistat</frontName>
|
42 |
+
</args>
|
43 |
+
</sfcvisistat>
|
44 |
+
</routers>
|
45 |
+
</admin>
|
46 |
+
<frontend>
|
47 |
+
<layout>
|
48 |
+
<updates>
|
49 |
+
<sfcvisistat>
|
50 |
+
<file>sfcvisistat.xml</file>
|
51 |
+
</sfcvisistat>
|
52 |
+
</updates>
|
53 |
+
</layout>
|
54 |
+
</frontend>
|
55 |
+
<adminhtml>
|
56 |
+
<acl>
|
57 |
+
<resources>
|
58 |
+
<all>
|
59 |
+
<title>Allow Everything</title>
|
60 |
+
</all>
|
61 |
+
<admin>
|
62 |
+
<children>
|
63 |
+
<system>
|
64 |
+
<children>
|
65 |
+
<config>
|
66 |
+
<children>
|
67 |
+
<sfcvisistat>
|
68 |
+
<title>VisiStat Connector</title>
|
69 |
+
</sfcvisistat>
|
70 |
+
</children>
|
71 |
+
</config>
|
72 |
+
</children>
|
73 |
+
</system>
|
74 |
+
</children>
|
75 |
+
</admin>
|
76 |
+
</resources>
|
77 |
+
</acl>
|
78 |
+
</adminhtml>
|
79 |
+
</config>
|
app/code/local/SFC/VisiStat/etc/system.xml
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* StoreFront Consulting VisiStat Module
|
5 |
+
*
|
6 |
+
* @category SFC
|
7 |
+
* @package SFC_VisiStat
|
8 |
+
* @author StoreFront Consulting, Inc.
|
9 |
+
* @website http://www.storefrontconsulting.com
|
10 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
11 |
+
*/
|
12 |
+
-->
|
13 |
+
<config>
|
14 |
+
<tabs>
|
15 |
+
<sfcvisistat translate="label">
|
16 |
+
<label>VisiStat Connector</label>
|
17 |
+
<sort_order>99999</sort_order>
|
18 |
+
</sfcvisistat>
|
19 |
+
</tabs>
|
20 |
+
<sections>
|
21 |
+
<sfcvisistat translate="label">
|
22 |
+
<label>VisiStat Connector Options</label>
|
23 |
+
<tab>sfcvisistat</tab>
|
24 |
+
<frontend_type>text</frontend_type>
|
25 |
+
<sort_order>1000</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>0</show_in_website>
|
28 |
+
<show_in_store>0</show_in_store>
|
29 |
+
<groups>
|
30 |
+
<configs translate="label">
|
31 |
+
<label>VisiStat Account Information</label>
|
32 |
+
<frontend_type>text</frontend_type>
|
33 |
+
<sort_order>1</sort_order>
|
34 |
+
<show_in_default>1</show_in_default>
|
35 |
+
<show_in_website>0</show_in_website>
|
36 |
+
<show_in_store>0</show_in_store>
|
37 |
+
<fields>
|
38 |
+
<addtrackingcode>
|
39 |
+
<label>Add Tracking Code</label>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
42 |
+
<sort_order>0</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>0</show_in_website>
|
45 |
+
<show_in_store>0</show_in_store>
|
46 |
+
<comment>Automatically add tracking code to public facing pages of your Magento store.</comment>
|
47 |
+
</addtrackingcode>
|
48 |
+
<domain>
|
49 |
+
<label>Domain</label>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<sort_order>1</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>0</show_in_website>
|
54 |
+
<show_in_store>0</show_in_store>
|
55 |
+
<validate>required-entry</validate>
|
56 |
+
<comment>Your Domain associated with your VisiStat account.</comment>
|
57 |
+
</domain>
|
58 |
+
<password>
|
59 |
+
<label>Password</label>
|
60 |
+
<frontend_type>obscure</frontend_type>
|
61 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
62 |
+
<sort_order>1</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>0</show_in_website>
|
65 |
+
<show_in_store>0</show_in_store>
|
66 |
+
<validate>required-entry</validate>
|
67 |
+
<comment>Your Password associated with your VisiStat account.</comment>
|
68 |
+
</password>
|
69 |
+
<did>
|
70 |
+
<label>DID Number</label>
|
71 |
+
<frontend_type>text</frontend_type>
|
72 |
+
<sort_order>2</sort_order>
|
73 |
+
<show_in_default>1</show_in_default>
|
74 |
+
<show_in_website>0</show_in_website>
|
75 |
+
<show_in_store>0</show_in_store>
|
76 |
+
<validate>validate-digits</validate>
|
77 |
+
<comment>Your DID Number associated with your VisiStat account.</comment>
|
78 |
+
</did>
|
79 |
+
<did_where>
|
80 |
+
<label>Where Is My DID Number?</label>
|
81 |
+
<frontend_type>button</frontend_type>
|
82 |
+
<frontend_model>SFC_VisiStat_Block_Adminhtml_System_Config_Form_Field_Didhelp</frontend_model>
|
83 |
+
<sort_order>3</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>0</show_in_website>
|
86 |
+
<show_in_store>0</show_in_store>
|
87 |
+
</did_where>
|
88 |
+
</fields>
|
89 |
+
</configs>
|
90 |
+
</groups>
|
91 |
+
</sfcvisistat>
|
92 |
+
</sections>
|
93 |
+
</config>
|
app/design/adminhtml/default/visistat/template/dashboard/index.phtml
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreFront Consulting VisiStat Module
|
4 |
+
*
|
5 |
+
* @category SFC
|
6 |
+
* @package SFC_VisiStat
|
7 |
+
* @author StoreFront Consulting, Inc.
|
8 |
+
* @website http://www.storefrontconsulting.com
|
9 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
10 |
+
*/
|
11 |
+
?>
|
12 |
+
|
13 |
+
<?php if (is_array($this->getChild('diagrams')->getTabsIds())) : ?>
|
14 |
+
<script type="text/javascript">
|
15 |
+
//<![CDATA[
|
16 |
+
function changeDiagramsPeriod(periodObj) {
|
17 |
+
periodParam = periodObj.value ? 'period/' + periodObj.value + '/' : '';
|
18 |
+
<?php foreach ($this->getChild('diagrams')->getTabsIds() as $tabId): ?>
|
19 |
+
ajaxBlockParam = 'block/tab_<?php echo $tabId ?>/';
|
20 |
+
ajaxBlockUrl = '<?php echo $this->getUrl('*/*/ajaxBlock', array('_current' => true, 'block' => '', 'period' => '')) ?>' + ajaxBlockParam + periodParam;
|
21 |
+
new Ajax.Request(ajaxBlockUrl, {
|
22 |
+
parameters: {isAjax: 'true', form_key: FORM_KEY},
|
23 |
+
onSuccess: function(transport) {
|
24 |
+
tabContentElementId = '<?php echo $this->getChild('diagrams')->getId() ?>_<?php echo $tabId ?>_content';
|
25 |
+
try {
|
26 |
+
if (transport.responseText.isJSON()) {
|
27 |
+
var response = transport.responseText.evalJSON()
|
28 |
+
if (response.error) {
|
29 |
+
alert(response.message);
|
30 |
+
}
|
31 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
32 |
+
setLocation(response.ajaxRedirect);
|
33 |
+
}
|
34 |
+
} else {
|
35 |
+
$(tabContentElementId).update(transport.responseText);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
catch (e) {
|
39 |
+
$(tabContentElementId).update(transport.responseText);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
});
|
43 |
+
<?php endforeach; ?>
|
44 |
+
ajaxBlockUrl = '<?php echo $this->getUrl('*/*/ajaxBlock', array('_current' => true, 'block' => 'totals', 'period' => '')) ?>' + periodParam;
|
45 |
+
new Ajax.Request(ajaxBlockUrl, {
|
46 |
+
parameters: {isAjax: 'true', form_key: FORM_KEY},
|
47 |
+
onSuccess: function(transport) {
|
48 |
+
tabContentElementId = 'dashboard_diagram_totals';
|
49 |
+
try {
|
50 |
+
if (transport.responseText.isJSON()) {
|
51 |
+
var response = transport.responseText.evalJSON()
|
52 |
+
if (response.error) {
|
53 |
+
alert(response.message);
|
54 |
+
}
|
55 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
56 |
+
setLocation(response.ajaxRedirect);
|
57 |
+
}
|
58 |
+
} else {
|
59 |
+
$(tabContentElementId).replace(transport.responseText);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
catch (e) {
|
63 |
+
$(tabContentElementId).replace(transport.responseText);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
});
|
67 |
+
}
|
68 |
+
|
69 |
+
function toggleCal(id) {
|
70 |
+
$('dashboard_'+id+'_cal_div').toggle();
|
71 |
+
$('dashboard_'+id+'_range_div').toggle();
|
72 |
+
}
|
73 |
+
function switchTabsSFC() {
|
74 |
+
$('sfc_visistat').toggle();
|
75 |
+
$('sfc_dashboard').toggle();
|
76 |
+
}
|
77 |
+
|
78 |
+
//]]>
|
79 |
+
</script>
|
80 |
+
<?php endif; ?>
|
81 |
+
<div class="entry-edit" style="border:1px solid #ccc;">
|
82 |
+
<ul class="tabs-horiz" id="diagram_tab">
|
83 |
+
<li>
|
84 |
+
<a class="tab-item-link active" title="VisiStat" id="diagram_tab_orders" href="#" onclick="switchTabsSFC();">
|
85 |
+
<span>VisiStat</span>
|
86 |
+
</a>
|
87 |
+
|
88 |
+
</li>
|
89 |
+
<li>
|
90 |
+
<a class="tab-item-link" title="Magento Dashboard" id="diagram_tab_amounts" href="#" onclick="switchTabsSFC();">
|
91 |
+
<span>Magento Dashboard</span>
|
92 |
+
</a>
|
93 |
+
|
94 |
+
</li>
|
95 |
+
</ul>
|
96 |
+
<div id="sfc_dashboard" style="display: none;">
|
97 |
+
<?php echo $this->getChildHtml('store_switcher') ?>
|
98 |
+
<table cellspacing="25" width="100%">
|
99 |
+
<tr>
|
100 |
+
<td><?php echo $this->getChildHtml('sales') ?>
|
101 |
+
<div class="entry-edit">
|
102 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Orders') ?></h4></div>
|
103 |
+
<fieldset class="np"><?php echo $this->getChildHtml('lastOrders'); ?></fieldset>
|
104 |
+
</div>
|
105 |
+
<div class="entry-edit">
|
106 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Search Terms') ?></h4></div>
|
107 |
+
<fieldset class="np"><?php echo $this->getChildHtml('lastSearches'); ?></fieldset>
|
108 |
+
</div>
|
109 |
+
<div class="entry-edit">
|
110 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Top 5 Search Terms') ?></h4></div>
|
111 |
+
<fieldset class="np"><?php echo $this->getChildHtml('topSearches'); ?></fieldset>
|
112 |
+
</div>
|
113 |
+
</td>
|
114 |
+
<td>
|
115 |
+
<div class="entry-edit" style="border:1px solid #ccc;">
|
116 |
+
<?php echo $this->getChildHtml('diagrams') ?>
|
117 |
+
<?php if (is_array($this->getChild('diagrams')->getTabsIds())) : ?>
|
118 |
+
<div id="diagram_tab_content"></div>
|
119 |
+
<?php endif; ?>
|
120 |
+
<div style="margin:20px;">
|
121 |
+
<?php echo $this->getChildHtml('totals') ?>
|
122 |
+
</div>
|
123 |
+
<div style="margin:20px;">
|
124 |
+
<?php echo $this->getChildHtml('grids') ?>
|
125 |
+
<div id="grid_tab_content"></div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
</td>
|
129 |
+
</tr>
|
130 |
+
</table>
|
131 |
+
</div>
|
132 |
+
<div id="sfc_visistat">
|
133 |
+
<iframe id="visistatiframe" src="<?php echo($this->getUrl('sfcvisistat/iframe/login', array('_forced_secure' => Mage::app()->getStore()->isCurrentlySecure()))); ?>" height="600" width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto"></iframe>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
app/design/frontend/base/default/layout/sfcvisistat.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="after_body_start">
|
5 |
+
<block type="page/html_footer" name="footer" template="sfcvisistat/tracking.phtml"/>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/base/default/template/sfcvisistat/tracking.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreFront Consulting VisiStat Module
|
4 |
+
*
|
5 |
+
* @category SFC
|
6 |
+
* @package SFC_VisiStat
|
7 |
+
* @author StoreFront Consulting, Inc.
|
8 |
+
* @website http://www.storefrontconsulting.com
|
9 |
+
* @copyright Copyright © 2009-2012 StoreFront Consulting, Inc. All Rights Reserved.
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Have DID and add tracking?
|
13 |
+
$iDidNum = intval(Mage::getStoreConfig('sfcvisistat/configs/did'));
|
14 |
+
$bAddTracking = (bool) Mage::getStoreConfig('sfcvisistat/configs/addtrackingcode');
|
15 |
+
if ($iDidNum > 0 && $bAddTracking === true) :
|
16 |
+
?>
|
17 |
+
<!-- VisiStat -->
|
18 |
+
<script type="text/javascript">
|
19 |
+
//<![CDATA[
|
20 |
+
var DID=<?php echo($iDidNum); ?>;
|
21 |
+
var pcheck=(window.location.protocol == "https:") ? "https://sniff.visistat.com/live.js":"http://stats.visistat.com/live.js";
|
22 |
+
document.writeln('<scr'+'ipt src="'+pcheck+'" type="text\/javascript"><\/scr'+'ipt>');
|
23 |
+
//]]>
|
24 |
+
</script>
|
25 |
+
<!-- VisiStat -->
|
26 |
+
<? else: ?>
|
27 |
+
<!-- VisiStat -->
|
28 |
+
<!-- Not set or auto add tracking turned off in Magento Admin -->
|
29 |
+
<!-- VisiStat -->
|
30 |
+
<? endif; ?>
|
31 |
+
|
app/etc/modules/SFC_VisiStat.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<SFC_VisiStat>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</SFC_VisiStat>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>sfc_visistat</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>VisiStat is an easy-to-use analytics/customer intelligence platform and captures detailed information on your customers and their behavior, and provides
|
10 |
+
valuable information on your overall marketing and sales strategies.</summary>
|
11 |
+
<description>VisiStat is a robust, easy-to-use analytics/customer intelligence platform that provides unparalleled e-commerce insights across ALL your customer touch-points – including your website, social media, marketing campaigns, and more. VisiStat captures detailed information on your customers and their behavior, and provides
|
12 |
+
valuable information on your overall marketing and sales strategies. As a single, integrated SaaS platform, VisiStat captures and simplifies complex data from across your entire web presence, enabling you to make better decisions that help optimize your online effectiveness and increase sales.</description>
|
13 |
+
<notes>Initial release.</notes>
|
14 |
+
<authors><author><name>StoreFront Consulting</name><user>SF_Consulting</user><email>support@storefrontconsulting.com</email></author></authors>
|
15 |
+
<date>2012-02-14</date>
|
16 |
+
<time>23:03:54</time>
|
17 |
+
<contents><target name="magelocal"><dir name="SFC"><dir name="VisiStat"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Didhelp.php" hash="d40306bdc93f93ccd49f68288dc5592f"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7710d5f184b0dac76dce1b2344950dce"/></dir><dir name="controllers"><file name="IframeController.php" hash="330394194f56aa57cc99bef5b6d71026"/></dir><dir name="etc"><file name="config.xml" hash="017080cc5070bd60e1ee13bb0070d40f"/><file name="system.xml" hash="32fb220a40bf1c466b5e0b853f75394f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SFC_VisiStat.xml" hash="a3e1a26b20b4c5f5a4754ac46047bcda"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="visistat"><dir name="template"><dir name="dashboard"><file name="index.phtml" hash="f601e148a1ccfec90657821b62a277ca"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sfcvisistat.xml" hash="d810b4eb465b550e2d43afa6ec65083c"/></dir><dir name="template"><dir name="sfcvisistat"><file name="tracking.phtml" hash="9b2f74880a30b509c87a5ae72fbb8ea5"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="sfcvisistat"><dir name="img"><file name="didhelp.png" hash="6147e00db4d3c72c751969cef6c0a11e"/></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>
|
skin/adminhtml/base/default/sfcvisistat/img/didhelp.png
ADDED
Binary file
|