Version Notes
This module enables Woopra for the Magento frontend
Download this release
Release Info
Developer | Magento Core Team |
Extension | Jira_Woopra |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
app/code/community/Jira/Woopra/Block/Script.php
CHANGED
@@ -23,7 +23,7 @@ class Jira_Woopra_Block_Script extends Mage_Core_Block_Template
|
|
23 |
parent::_construct();
|
24 |
|
25 |
// Decide whether the Woopra Plugin has been actived
|
26 |
-
$website_id = Mage::helper('woopra')->
|
27 |
if(Mage::helper('woopra')->enabled() == true && !empty($website_id)) {
|
28 |
$this->setTemplate('woopra/script.phtml');
|
29 |
}
|
@@ -43,7 +43,7 @@ class Jira_Woopra_Block_Script extends Mage_Core_Block_Template
|
|
43 |
|
44 |
// Add generic settings
|
45 |
$data = array(
|
46 |
-
'website_id' => Mage::helper('woopra')->
|
47 |
'enabled' => Mage::helper('woopra')->enabled(), // Plugin status
|
48 |
'test' => Mage::helper('woopra')->test(), // Plugin testing mode
|
49 |
);
|
23 |
parent::_construct();
|
24 |
|
25 |
// Decide whether the Woopra Plugin has been actived
|
26 |
+
$website_id = Mage::helper('woopra')->getApiKey();
|
27 |
if(Mage::helper('woopra')->enabled() == true && !empty($website_id)) {
|
28 |
$this->setTemplate('woopra/script.phtml');
|
29 |
}
|
43 |
|
44 |
// Add generic settings
|
45 |
$data = array(
|
46 |
+
'website_id' => Mage::helper('woopra')->getApiKey(), // Woopra API key
|
47 |
'enabled' => Mage::helper('woopra')->enabled(), // Plugin status
|
48 |
'test' => Mage::helper('woopra')->test(), // Plugin testing mode
|
49 |
);
|
app/code/community/Jira/Woopra/Helper/Data.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
class Jira_Woopra_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
{
|
14 |
-
public function
|
15 |
{
|
16 |
return Mage::getStoreConfig('woopra/settings/website_id');
|
17 |
}
|
11 |
|
12 |
class Jira_Woopra_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
{
|
14 |
+
public function getApiKey()
|
15 |
{
|
16 |
return Mage::getStoreConfig('woopra/settings/website_id');
|
17 |
}
|
app/code/community/Jira/Woopra/etc/config.xml
CHANGED
@@ -11,10 +11,9 @@
|
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
14 |
-
|
15 |
<modules>
|
16 |
<Jira_Woopra>
|
17 |
-
<version>1.0.
|
18 |
</Jira_Woopra>
|
19 |
</modules>
|
20 |
|
@@ -62,5 +61,4 @@
|
|
62 |
</resources>
|
63 |
</acl>
|
64 |
</adminhtml>
|
65 |
-
|
66 |
</config>
|
11 |
*/
|
12 |
-->
|
13 |
<config>
|
|
|
14 |
<modules>
|
15 |
<Jira_Woopra>
|
16 |
+
<version>1.0.7</version>
|
17 |
</Jira_Woopra>
|
18 |
</modules>
|
19 |
|
61 |
</resources>
|
62 |
</acl>
|
63 |
</adminhtml>
|
|
|
64 |
</config>
|
app/code/community/Jira/Woopra/etc/system.xml
CHANGED
@@ -48,7 +48,7 @@
|
|
48 |
<show_in_store>1</show_in_store>
|
49 |
</test>
|
50 |
<website_id translate="label">
|
51 |
-
<label>
|
52 |
<frontend_type>text</frontend_type>
|
53 |
<sort_order>2</sort_order>
|
54 |
<show_in_default>1</show_in_default>
|
48 |
<show_in_store>1</show_in_store>
|
49 |
</test>
|
50 |
<website_id translate="label">
|
51 |
+
<label>API key</label>
|
52 |
<frontend_type>text</frontend_type>
|
53 |
<sort_order>2</sort_order>
|
54 |
<show_in_default>1</show_in_default>
|
app/design/frontend/base/default/template/woopra/script.phtml
CHANGED
@@ -14,20 +14,16 @@
|
|
14 |
alert('Woopra is installed but in test mode');
|
15 |
</script>
|
16 |
<?php } else { ?>
|
17 |
-
<script type="text/javascript" src="http://static.woopra.com/js/woopra.v2.js"></script>
|
18 |
<script type="text/javascript">
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
product_price: '<?php echo $this->getSetting('product_price'); ?>',
|
30 |
-
product_sku: '<?php echo $this->getSetting('product_sku'); ?>'
|
31 |
-
});
|
32 |
</script>
|
33 |
<?php } ?>
|
14 |
alert('Woopra is installed but in test mode');
|
15 |
</script>
|
16 |
<?php } else { ?>
|
|
|
17 |
<script type="text/javascript">
|
18 |
+
var woo_visitor = { name:'<?php echo $this->getSetting('name'); ?>', email:'<?php echo $this->getSetting('email'); ?>', avatar:'<?php echo $this->getSetting('avatar'); ?>', company:'<?php echo $this->getSetting('company'); ?>', city:'<?php echo $this->getSetting('city'); ?>', phone:'<?php echo $this->getSetting('phone'); ?>', cart_items:'<?php echo $this->getSetting('cart_items'); ?>', cart_total:'<?php echo $this->getSetting('cart_total'); ?>'};
|
19 |
+
var woo_actions=[{'type':'pageview','title':document.title,'url':window.location.pathname,'category':'<?php echo $this->getSetting('category'); ?>', 'product_price':'<?php echo $this->getSetting('product_price'); ?>', 'product_sku':'<?php echo $this->getSetting('product_sku'); ?>'}];
|
20 |
+
(function(){
|
21 |
+
var wsc = document.createElement('script');
|
22 |
+
wsc.type = 'text/javascript';
|
23 |
+
wsc.src = document.location.protocol+'//static.woopra.com/js/woopra.js';
|
24 |
+
wsc.async = true;
|
25 |
+
var ssc = document.getElementsByTagName('script')[0];
|
26 |
+
ssc.parentNode.insertBefore(wsc, ssc);
|
27 |
+
})();
|
|
|
|
|
|
|
28 |
</script>
|
29 |
<?php } ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Jira_Woopra</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php/">Open Software License</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>This module enables Woopra for the Magento frontend</description>
|
11 |
<notes>This module enables Woopra for the Magento frontend</notes>
|
12 |
<authors><author><name>Yireo</name><user>auto-converted</user><email>info@yireo.com</email></author></authors>
|
13 |
-
<date>2010-
|
14 |
<time>15:38:57</time>
|
15 |
-
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="woopra"><file name="script.phtml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Jira_Woopra</name>
|
4 |
+
<version>1.0.7</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php/">Open Software License</license>
|
7 |
<channel>community</channel>
|
10 |
<description>This module enables Woopra for the Magento frontend</description>
|
11 |
<notes>This module enables Woopra for the Magento frontend</notes>
|
12 |
<authors><author><name>Yireo</name><user>auto-converted</user><email>info@yireo.com</email></author></authors>
|
13 |
+
<date>2010-11-11</date>
|
14 |
<time>15:38:57</time>
|
15 |
+
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="woopra"><file name="script.phtml" hash="9588d2a8a6c699a40e0d4a4223f0a82c"/></dir></dir><dir name="layout"><file name="woopra.xml" hash="6e7ed0d2716372235a91103ba647a60d"/></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Jira"><dir name="Woopra"><dir name="Block"><file name="Script.php" hash="a1153c86f4f12b42e6f9d35476829e43"/></dir><dir name="etc"><file name="config.xml" hash="7e1e4c6e2c6439122d8c4b2858055401"/><file name="system.xml" hash="bc8ae4a8d643ed3e7f6d5ed1d4a23fea"/></dir><dir name="Helper"><file name="Data.php" hash="6d253c435394c7a9a4b3ce51b50af122"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Jira_Woopra.xml" hash="ace85137f7edb480d4fe170ada584f98"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|