WebsiteAlive_Connector - Version 1.0.2

Version Notes

Stable

Download this release

Release Info

Developer WebsiteAlive
Extension WebsiteAlive_Connector
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/WebsiteAlive/Connector/Block/Connector.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ */
12
+
13
+ class WebsiteAlive_Connector_Block_Connector extends Mage_Core_Block_Template {
14
+
15
+ protected function _toHtml() {
16
+ $html = "";
17
+ $groupId = Mage::getStoreConfig('waconnector/general/group_id');
18
+ $server = Mage::getStoreConfig('waconnector/general/server');
19
+ if(Mage::getStoreConfig('waconnector/general/is_enabled')
20
+ && $groupId
21
+ && $server
22
+ ){
23
+ $html .= <<<HTML_CONTENT
24
+ <!-- Start WebsiteAlive Embedded Icon/Tracking Code -->
25
+ <script type="text/javascript">
26
+ function wsa_include_js(){
27
+ var wsa_host = (("https:" == document.location.protocol) ? "https://" : "http://");
28
+ var js = document.createElement('script');
29
+ js.setAttribute('language', 'javascript');
30
+ js.setAttribute('type', 'text/javascript');
31
+ js.setAttribute('src',wsa_host + 'tracking.websitealive.com/vTracker_v2.asp?objectref=$server&websiteid=0&groupid=$groupId');
32
+ document.getElementsByTagName('head').item(0).appendChild(js);
33
+ }
34
+
35
+ if (window.attachEvent) {window.attachEvent('onload', wsa_include_js);}
36
+ else if (window.addEventListener) {window.addEventListener('load', wsa_include_js, false);}
37
+ else {document.addEventListener('load', wsa_include_js, false);}
38
+ </script>
39
+ <!-- End WebsiteAlive Embedded Icon/Tracking Code -->
40
+ HTML_CONTENT;
41
+ }
42
+
43
+ return $html;
44
+ }
45
+
46
+ }
app/code/community/WebsiteAlive/Connector/Helper/Data.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ */
12
+
13
+ class WebsiteAlive_Connector_Helper_Data extends Mage_Core_Helper_Data {
14
+
15
+ }
app/code/community/WebsiteAlive/Connector/Model/Observer.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ */
12
+
13
+ class WebsiteAlive_Connector_Model_Observer {
14
+
15
+ public function addBlockBeforeRenderLayout(){
16
+ $layout = Mage::getSingleton('core/layout');
17
+ $targetBlock = $layout->getBlock('before_body_end');
18
+ $targetBlock->append($layout->createBlock('waconnector/connector'));
19
+ }
20
+
21
+ }
app/code/community/WebsiteAlive/Connector/Model/Source/Server.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ */
12
+
13
+ class WebsiteAlive_Connector_Model_Source_Server {
14
+
15
+ /**
16
+ * Options getter
17
+ *
18
+ * @return array
19
+ */
20
+ public function toOptionArray()
21
+ {
22
+ return array(
23
+ array('value' => "", 'label'=>"-- Please Select --"),
24
+ array('value' => "wsa3", 'label'=>"https://www.websitealive3.com"),
25
+ array('value' => "a1", 'label'=>"https://a1.websitealive.com"),
26
+ );
27
+ }
28
+
29
+ /**
30
+ * Get options in "key-value" format
31
+ *
32
+ * @return array
33
+ */
34
+ public function toArray()
35
+ {
36
+ return array(
37
+ "" => "-- Please Select --",
38
+ "wsa3" => "https://www.websitealive3.com",
39
+ "a1" => "https://a1.websitealive.com",
40
+ );
41
+ }
42
+
43
+ }
app/code/community/WebsiteAlive/Connector/etc/config.xml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ *
12
+ -->
13
+ <config>
14
+ <modules>
15
+ <WebsiteAlive_Connector>
16
+ <version>1.0.0</version>
17
+ </WebsiteAlive_Connector>
18
+ </modules>
19
+ <global>
20
+ <blocks>
21
+ <waconnector>
22
+ <class>WebsiteAlive_Connector_Block</class>
23
+ </waconnector>
24
+ </blocks>
25
+ <helpers>
26
+ <waconnector>
27
+ <class>WebsiteAlive_Connector_Helper</class>
28
+ </waconnector>
29
+ </helpers>
30
+ <models>
31
+ <waconnector>
32
+ <class>WebsiteAlive_Connector_Model</class>
33
+ </waconnector>
34
+ </models>
35
+ </global>
36
+ <frontend>
37
+ <events>
38
+ <controller_action_layout_render_before>
39
+ <observers>
40
+ <waconnector_controller_action_layout_render_before>
41
+ <class>waconnector/observer</class>
42
+ <method>addBlockBeforeRenderLayout</method>
43
+ </waconnector_controller_action_layout_render_before>
44
+ </observers>
45
+ </controller_action_layout_render_before>
46
+ </events>
47
+ </frontend>
48
+ <adminhtml>
49
+ <acl>
50
+ <resources>
51
+ <admin>
52
+ <children>
53
+ <system>
54
+ <children>
55
+ <config>
56
+ <children>
57
+ <waconnector translate="title" module="waconnector">
58
+ <title>Website Alive</title>
59
+ </waconnector>
60
+ </children>
61
+ </config>
62
+ </children>
63
+ </system>
64
+ </children>
65
+ </admin>
66
+ </resources>
67
+ </acl>
68
+ </adminhtml>
69
+ <default>
70
+ <waconnector>
71
+ <general>
72
+ <is_enabled>1</is_enabled>
73
+ </general>
74
+ </waconnector>
75
+ </default>
76
+ </config>
app/code/community/WebsiteAlive/Connector/etc/system.xml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ *
12
+ -->
13
+ <config>
14
+ <tabs>
15
+ <waconnector translate="label" module="waconnector">
16
+ <label>WebsiteAlive</label>
17
+ <sort_order>100</sort_order>
18
+ </waconnector>
19
+ </tabs>
20
+ <sections>
21
+ <waconnector translate="label" module="waconnector">
22
+ <class>separator-top</class>
23
+ <label>WebsiteAlive Connector Settings</label>
24
+ <tab>waconnector</tab>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>100</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ <groups>
31
+ <signup translate="label" module="waconnector">
32
+ <label>Sign Up</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>100</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ <expanded>1</expanded>
39
+ <comment><![CDATA[Please use this link to<a target="_blank" style="color: #F79622;" href="https://www.websitealive.com/live-chat-pricing/">Sign Up</a> for our live chat solution.]]></comment>
40
+ </signup>
41
+ <general translate="label" module="waconnector">
42
+ <label>Configuration</label>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>200</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ <expanded>1</expanded>
49
+ <fields>
50
+ <is_enabled translate="label">
51
+ <label>Is Enabled</label>
52
+ <frontend_type>select</frontend_type>
53
+ <source_model>adminhtml/system_config_source_yesno</source_model>
54
+ <sort_order>110</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ </is_enabled>
59
+ <server translate="label">
60
+ <label>Server</label>
61
+ <frontend_type>select</frontend_type>
62
+ <source_model>waconnector/source_server</source_model>
63
+ <sort_order>120</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ <validate>required-entry</validate>
68
+ </server>
69
+ <group_id translate="label">
70
+ <label>Group ID</label>
71
+ <frontend_type>text</frontend_type>
72
+ <sort_order>130</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
+ <validate>validate-number</validate>
77
+ <comment><![CDATA[You can find the Group ID in your sign up email.]]></comment>
78
+ </group_id>
79
+ </fields>
80
+ </general>
81
+ <help translate="label" module="waconnector">
82
+ <label>Need Help?</label>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>300</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ <expanded>1</expanded>
89
+ <comment><![CDATA[Need help? Review our<a target="_blank" style="color: #F79622;" href="https://www.websitealive.com/live-chat-implementation/">Support Knowledgebase</a>.<br/>
90
+ Or<a target="_blank" style="color: #F79622;" href="https://www.websitealive.com/howtovideos/">watch our helpful videos and read our guides</a>.<br/>
91
+ Learn about the<a target="_blank" style="color: #F79622;" href="http://go.websitealive.com/downloads/pdf/AliveChat_Administrator_How_To.pdf">Administrator Console</a> or the<a target="_blank" style="color: #F79622;" href="http://go.websitealive.com/downloads/pdf/AliveChat_Operator_How_To.pdf">Operator Console</a><br/>]]>
92
+ </comment>
93
+ </help>
94
+ </groups>
95
+ </waconnector>
96
+ </sections>
97
+ </config>
app/code/community/WebsiteAlive/Connector/etc/system.xml.bak ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the End User Software Agreement (EULA).
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.harapartners.com/license
8
+ * If you did not receive a copy of the license and are unable to
9
+ * obtain it through the world-wide-web, please send an email
10
+ * to eula@harapartners.com so we can send you a copy immediately.
11
+ *
12
+ -->
13
+ <config>
14
+ <tabs>
15
+ <waconnector translate="label" module="waconnector">
16
+ <label>Website Alive</label>
17
+ <sort_order>100</sort_order>
18
+ </waconnector>
19
+ </tabs>
20
+ <sections>
21
+ <waconnector translate="label" module="waconnector">
22
+ <class>separator-top</class>
23
+ <label>Connector Settings</label>
24
+ <tab>waconnector</tab>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>100</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ <groups>
31
+ <signup translate="label" module="waconnector">
32
+ <label>Sign Up</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>100</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ <comment><![CDATA[Please <a href="https://www.websitealive.com/">Sign Up</a> to start the service.]]></comment>
39
+ </signup>
40
+ <general translate="label" module="waconnector">
41
+ <label>General Settings</label>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>200</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ <fields>
48
+ <is_enabled translate="label">
49
+ <label>Is Enabled</label>
50
+ <frontend_type>select</frontend_type>
51
+ <source_model>adminhtml/system_config_source_yesno</source_model>
52
+ <sort_order>110</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </is_enabled>
57
+ <group_id translate="label">
58
+ <label>Group ID</label>
59
+ <frontend_type>text</frontend_type>
60
+ <sort_order>120</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
+ <comment><![CDATA[Our support team will provide the group ID for integration.]]></comment>
65
+ </group_id>
66
+ </fields>
67
+ </general>
68
+ <help translate="label" module="waconnector">
69
+ <label>Help</label>
70
+ <frontend_type>text</frontend_type>
71
+ <sort_order>300</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>1</show_in_store>
75
+ <comment><![CDATA[Need help? <a href="https://www.websitealive.com/">Let us know</a>]]></comment>
76
+ </help>
77
+ </groups>
78
+ </waconnector>
79
+ </sections>
80
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>WebsiteAlive_Connector</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.harapartners.com/terms/eula">Hara Partners End User License Agreement</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>WebsiteAlive is the easy-to-use Live Chat/Click-To-Call solution for your Magento shopping cart. Visitors can immediately chat or initiate a click-to-call session with someone at your company who can answer their questions, in real-time. This Magento plug-in instantly embeds WebsiteAlive Tracking Code into your shopping cart which tracks visitors in real-time and also displays a call-to-action icon.</description>
11
  <notes>Stable</notes>
12
  <authors><author><name>WebsiteAlive</name><user>websitealive</user><email>magento@websitealive.com</email></author></authors>
13
- <date>2013-10-17</date>
14
- <time>00:26:20</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="WebsiteAlive_Connector" hash=""/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.10.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>WebsiteAlive_Connector</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.harapartners.com/terms/eula">Hara Partners End User License Agreement</license>
7
  <channel>community</channel>
10
  <description>WebsiteAlive is the easy-to-use Live Chat/Click-To-Call solution for your Magento shopping cart. Visitors can immediately chat or initiate a click-to-call session with someone at your company who can answer their questions, in real-time. This Magento plug-in instantly embeds WebsiteAlive Tracking Code into your shopping cart which tracks visitors in real-time and also displays a call-to-action icon.</description>
11
  <notes>Stable</notes>
12
  <authors><author><name>WebsiteAlive</name><user>websitealive</user><email>magento@websitealive.com</email></author></authors>
13
+ <date>2013-10-23</date>
14
+ <time>20:01:06</time>
15
+ <contents><target name="magecommunity"><dir name="WebsiteAlive"><dir name="Connector"><dir name="Block"><file name="Connector.php" hash="d9f71c12be9df503e221c90cfe769374"/></dir><dir name="Helper"><file name="Data.php" hash="47bdea73889322389a027bd02e25783c"/></dir><dir name="Model"><file name="Observer.php" hash="4dbf88faf36cddb5e4d08718225942cf"/><dir name="Source"><file name="Server.php" hash="6fcd7ae78fbe24f5056628500fff4601"/></dir></dir><dir name="etc"><file name="config.xml" hash="ded3059b1e37cda783d28542aa6e2015"/><file name="system.xml" hash="b051022bd44c71b1aaefa48928911d93"/><file name="system.xml.bak" hash="4e94822852cf068e5ad0b231f544845f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WebsiteAlive_Connector" hash=""/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.10.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>