righTune_Conversion - Version 1.0.0

Version Notes

No Notes

Download this release

Release Info

Developer righTune
Extension righTune_Conversion
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/RighTune/Conversion/Block/Conversion.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * righTune Conversion for Magento
5
+ *
6
+ * @package righTune Conversion
7
+ * @author Tzvi Rabinovitch(http://10bit.co.il/)
8
+ * @copyright Copyright (c) 2013 righTune (http://www.righTune.com/)
9
+ * @license Open Source License (OSL)
10
+ */
11
+
12
+
13
+ class RighTune_Conversion_Block_Conversion extends Mage_Core_Block_Template
14
+ {
15
+ /**
16
+ * Get the Conversion script
17
+ *
18
+ * @return string
19
+ */
20
+ public function getScript()
21
+ {
22
+ return $script;
23
+ }
24
+ public function isEnabled(){
25
+ return Mage::helper('conversion')->getRighTuneConversionStoreConfig('active',true);
26
+ }
27
+ public function getScriptCode(){
28
+ return Mage::helper('conversion')->getRighTuneConversionStoreConfig('code');
29
+ }
30
+ public function isTrackEnabled(){
31
+ return Mage::helper('conversion')->getRighTuneConversionStoreConfig('track',true);
32
+ }
33
+ /**
34
+ * Get the Conversion tracking script
35
+ *
36
+ * @return string
37
+ */
38
+ public function getTrackingScript()
39
+ {
40
+ $script="<script>";
41
+ $script.="var _mgage = _mgage || [];";
42
+ $script.="_mgage.push(['custom', 'magento_conversion']);";
43
+ $script.="</script>";
44
+
45
+ return $script;
46
+ }
47
+
48
+ }
app/code/community/RighTune/Conversion/Helper/Data.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RighTune_Conversion_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ const XML_PATH_RIGHTUNECONVERSION_SETTINGS = 'rightune_options/rightune_general/';
7
+
8
+ /**
9
+ * Return store config value for key
10
+ *
11
+ * @param string $key
12
+ * @return string
13
+ */
14
+ public function getRighTuneConversionStoreConfig ($key, $flag=false)
15
+ {
16
+ $path = self::XML_PATH_RIGHTUNECONVERSION_SETTINGS . $key;
17
+ if ($flag) {
18
+ return Mage::getStoreConfigFlag($path);
19
+ } else {
20
+ return Mage::getStoreConfig($path);
21
+ }
22
+ }
23
+ }
app/code/community/RighTune/Conversion/etc/config.xml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <RighTune_Conversion>
5
+ <version>1.0.0</version>
6
+ </RighTune_Conversion>
7
+ </modules>
8
+
9
+ <global>
10
+ <models>
11
+ <conversion>
12
+ <class>RighTune_Conversion_Model</class>
13
+ </conversion>
14
+ </models>
15
+ <helpers>
16
+ <conversion>
17
+ <class>RighTune_Conversion_Helper</class>
18
+ </conversion>
19
+ </helpers>
20
+ <blocks>
21
+ <conversion>
22
+ <class>RighTune_Conversion_Block</class>
23
+ </conversion>
24
+ </blocks>
25
+ </global>
26
+
27
+ <frontend>
28
+ <layout>
29
+ <updates>
30
+ <conversion>
31
+ <file>rightuneconversion.xml</file>
32
+ </conversion>
33
+ </updates>
34
+ </layout>
35
+ </frontend>
36
+ <adminhtml>
37
+ <acl>
38
+ <resources>
39
+ <admin>
40
+ <children>
41
+ <system>
42
+ <children>
43
+ <config>
44
+ <children>
45
+ <rightune_options>
46
+ <title>Store Hello World Module Section</title>
47
+ </rightune_options>
48
+ </children>
49
+ </config>
50
+ </children>
51
+ </system>
52
+ </children>
53
+ </admin>
54
+ </resources>
55
+ </acl>
56
+ </adminhtml>
57
+ </config>
app/code/community/RighTune/Conversion/etc/system.xml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <tabs>
5
+ <righTuneConfig translate="label">
6
+ <label>righTune</label>
7
+ <sort_order>99999</sort_order>
8
+ </righTuneConfig>
9
+ </tabs>
10
+ <sections>
11
+ <rightune_options translate="label">
12
+ <label>Conversion</label>
13
+ <tab>righTuneConfig</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>1000</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
+ <rightune_general>
21
+ <label>General</label>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>300</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <comment><![CDATA[ <p>Play to your visitors' emotion and convert them into loyal customers by playing relevant, personalized background music. More than 20% increase in conversions. Used by over 1,000 websites. Measurable, proven, quick results.</p>
28
+ <p><strong>Follow this steps</strong> to generate your own unique player:</p>
29
+ 1. Go to righTune's <a href="http://dashboard.rightune.com/signup?tag=magento" target="_blank">sign up page</a> to customize your player.<br>
30
+ 2. Copy the code you'll get at the last step.<br>
31
+ 3. Paste code at this box and Click the Save Changes button below.<br>
32
+ ]]>
33
+ </comment>
34
+ <fields>
35
+ <active translate="label">
36
+ <label>Enabled</label>
37
+ <frontend_type>select</frontend_type>
38
+ <source_model>adminhtml/system_config_source_yesno</source_model>
39
+ <comment>Turn this module on/off</comment>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </active>
45
+
46
+ <code translate="label">
47
+ <label>Script</label>
48
+ <frontend_type>textarea</frontend_type>
49
+ <comment>Paste script code here</comment>
50
+ <sort_order>2</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </code>
55
+
56
+ <track translate="label">
57
+ <label>Conversion tracking</label>
58
+ <frontend_type>select</frontend_type>
59
+ <source_model>adminhtml/system_config_source_yesno</source_model>
60
+ <comment>Enable conversion tracking by righTune</comment>
61
+ <sort_order>3</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>1</show_in_store>
65
+ </track>
66
+
67
+
68
+
69
+ </fields>
70
+ </rightune_general>
71
+ </groups>
72
+ </rightune_options>
73
+ </sections>
74
+ </config>
app/design/frontend/base/default/layout/rightuneconversion.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="before_body_end">
5
+ <block type="conversion/conversion" ifconfig="rightune_options/rightune_general/active" name="rightune_conversion" template="rightuneconversion/rightune_conversion.phtml" />
6
+ </reference>
7
+ <!--<action method="addJs" ifconfig="google/analyticsplus/firstouch"><script>GoogleAnalyticsPlus/distilled.FirstTouch.js</script></action>
8
+ <block type="core/text_list" name="before_head_end" as="before_head_end"/>-->
9
+ <!-- <reference name="before_head_end">
10
+ <block type="googleanalytics/ga" name="google_analytics" as="google_analytics" />
11
+ </reference>
12
+ <reference name="after_body_start">
13
+ <action method="unsetChild"><name>google_analytics</name></action>
14
+ </reference>
15
+ <reference name="before_body_end">
16
+ <action method="unsetChild"><name>google_analytics</name></action>
17
+ </reference>-->
18
+ </default>
19
+ <checkout_onepage_success>
20
+ <reference name="before_body_end">
21
+ <block type="conversion/conversion" ifconfig="rightune_options/rightune_general/active" name="rightune_conversion" template="rightuneconversion/rightune_success.phtml" />
22
+ </reference>
23
+ </checkout_onepage_success>
24
+ <checkout_multishipping_success>
25
+ <reference name="before_body_end">
26
+ <block type="conversion/conversion" ifconfig="rightune_options/rightune_general/active" name="rightune_conversion" template="rightuneconversion/rightune_success.phtml" />
27
+ </reference>
28
+ </checkout_multishipping_success>
29
+ </layout>
app/design/frontend/base/default/template/rightuneconversion/rightune_conversion.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php if($this->isEnabled()):?>
2
+ <?php if($this->isTrackEnabled()):?>
3
+ <?php echo $this->getScriptCode() ?>
4
+ <?php endif; ?>
5
+ <?php endif; ?>
app/design/frontend/base/default/template/rightuneconversion/rightune_success.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php if($this->isEnabled()):?>
2
+ <?php if($this->isTrackEnabled()):?>
3
+ <?php echo $this->getTrackingScript() ?>
4
+ <?php endif; ?>
5
+ <?php endif; ?>
app/etc/modules/RighTune_Conversion.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <RighTune_Conversion>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </RighTune_Conversion>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>righTune_Conversion</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>righTune conversion</summary>
10
+ <description>righTune conversion</description>
11
+ <notes>No Notes</notes>
12
+ <authors><author><name>righTune</name><user>righTune</user><email>info@righTune.com</email></author></authors>
13
+ <date>2013-12-15</date>
14
+ <time>21:10:29</time>
15
+ <contents><target name="magecommunity"><dir name="RighTune"><dir name="Conversion"><dir name="Block"><file name="Conversion.php" hash="2cc250bdf7a79484e8e9d71c1fd94382"/></dir><dir name="Helper"><file name="Data.php" hash="e17037affc7d3eb3b5b0fec3ae30f312"/></dir><dir name="etc"><file name="config.xml" hash="38c5a7fd91a31e60ce9c45ec933abb30"/><file name="system.xml" hash="e1e5bd1c743ef1403cbd849c875c8c20"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rightuneconversion.xml" hash="cefc63062ce57377e11ab613022ca92b"/></dir><dir name="template"><dir name="rightuneconversion"><file name="rightune_conversion.phtml" hash="36f5e44d41ffe19f73a5ee59d42d3783"/><file name="rightune_success.phtml" hash="35c84b02e722e47edab369d4dfcfed1e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RighTune_Conversion.xml" hash="794b99013b901cd686b048aab206c5fd"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package><extension><name>gd</name><min>2.0.28</min><max>3.0</max></extension></required></dependencies>
18
+ </package>