LiveHelpNow_Help_Desk_HelpOut_Tab - Version 1.1.4

Version Notes

New Options added

Download this release

Release Info

Developer Eric Witchin
Extension LiveHelpNow_Help_Desk_HelpOut_Tab
Version 1.1.4
Comparing to
See all releases


Code changes from version 1.1.3 to 1.1.4

app/code/community/LHN/HelpOutTab/Model/Observer.php CHANGED
@@ -20,6 +20,7 @@ class LHN_HelpOutTab_Model_Observer{
20
  $lhn_account_number = Mage::getStoreConfig('lhn_helpouttab/general/account_number');
21
  $lhn_account_number = str_replace("lhn", "", strtolower($lhn_account_number));
22
  $lhn_chat_window = Mage::getStoreConfig('lhn_helpouttab/general/chat_window');
 
23
  $lhn_autochat = Mage::getStoreConfig('lhn_helpouttab/general/autochat');
24
  $lhn_theme = Mage::getStoreConfig('lhn_helpouttab/general/theme');
25
  $lhn_slideout = Mage::getStoreConfig('lhn_helpouttab/general/slideout');
@@ -33,29 +34,15 @@ class LHN_HelpOutTab_Model_Observer{
33
  $lhn_no_results = Mage::getStoreConfig('lhn_helpouttab/general/no_results');
34
  $lhn_views = Mage::getStoreConfig('lhn_helpouttab/general/views');
35
 
36
- $whiteLabel = '';
37
- if(substr($lhn_account_number, -2) == "-1"){
38
- $whiteLabel = 'var lhnWhiteLabel = true;'.PHP_EOL;
39
- }
40
- $lhn_account_number = str_replace("-1", "", $lhn_account_number);
41
-
42
  $lhncontent = '<script type="text/javascript">'.PHP_EOL;
43
- $lhncontent .= 'if(lhnHPPanel===undefined){'.PHP_EOL;
44
- $lhncontent .= $whiteLabel;
45
  $lhncontent .= 'var lhnCustom1 = "'.$lhnEmail.'";'.PHP_EOL;
46
  $lhncontent .= 'var lhnCustom2 = "'.$lhnCustomer.'";'.PHP_EOL;
47
  $lhncontent .= 'var lhnCustom3 = "'.$lhnCart.'";'.PHP_EOL;
48
  $lhncontent .= 'var lhnPlugin = "Mage-'.Mage::getVersion().'-HO";'.PHP_EOL;
49
- $lhncontent .= 'var lhnVersion = 5.3;'.PHP_EOL;
50
- $lhncontent .= 'var lhnAccountN = '.$lhn_account_number.';'.PHP_EOL;
51
- $lhncontent .= 'if(typeof lhnButtonN == "undefined"){var lhnButtonN = -1;}'.PHP_EOL;
52
- $lhncontent .= 'var lhnJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");'.PHP_EOL;
53
  $lhncontent .= 'var lhnInviteEnabled = '.$lhn_autochat.';'.PHP_EOL;
54
- $lhncontent .= 'var lhnInviteChime = 0; '.PHP_EOL;
55
  $lhncontent .= 'var lhnWindowN = '.$lhn_chat_window.'; '.PHP_EOL;
56
- $lhncontent .= 'var lhnDepartmentN = 0; '.PHP_EOL;
57
- $lhncontent .= 'var lhnCustomInvitation ="";'.PHP_EOL;
58
- $lhncontent .= 'var lhnTrackingEnabled = "t";'.PHP_EOL;
59
  $lhncontent .= 'var lhnTheme = "'.$lhn_theme.'"; '.PHP_EOL;
60
  $lhncontent .= 'var lhnHPPanel = '.$lhn_slideout.'; '.PHP_EOL;
61
  $lhncontent .= 'var lhnHPKnowledgeBase = '.$lhn_knowbase.'; '.PHP_EOL;
@@ -67,78 +54,8 @@ class LHN_HelpOutTab_Model_Observer{
67
  $lhncontent .= 'var lhnLO_helpPanel_knowledgeBase_please_search = "'.$lhn_search_message.'";'.PHP_EOL;
68
  $lhncontent .= 'var lhnLO_helpPanel_typeahead_noResults_message = "'.$lhn_no_results.'";'.PHP_EOL;
69
  $lhncontent .= 'var lhnLO_helpPanel_typeahead_result_views = "'.$lhn_views.'";'.PHP_EOL;
70
- $lhncontent .= 'if(!lhnHPKnowledgeBase && !lhnHPTicketButton && !lhnHPCallbackButton){'.PHP_EOL;
71
- $lhncontent .= 'lhnHPChatButton = true;'.PHP_EOL;
72
- $lhncontent .= 'lhnHPPanel = false;'.PHP_EOL;
73
- $lhncontent .= '}'.PHP_EOL;
74
- $lhncontent .= 'var loadLHNFile = function (url, type) { if (type == "js") { var file = document.createElement("script"); file.setAttribute("type", "text/javascript"); file.setAttribute("src", url); } else if (type = "css") { var file = document.createElement("link"); file.setAttribute("rel", "stylesheet"); file.setAttribute("type", "text/css"); file.setAttribute("href", url); } if (typeof file != "undefined") { document.getElementsByTagName("head")[0].appendChild(file) } }'.PHP_EOL;
75
- $lhncontent .= 'var loadLHNFiles = function () {'.PHP_EOL;
76
- $lhncontent .= 'if (lhnHPChatButton == true && typeof lhnInstalled == "undefined") {'.PHP_EOL;
77
- $lhncontent .= 'if (!document.getElementById("lhnChatButton")) {'.PHP_EOL;
78
- $lhncontent .= 'if (document.body) {'.PHP_EOL;
79
- $lhncontent .= 'var lhnBTNdiv = document.createElement("div");'.PHP_EOL;
80
- $lhncontent .= 'lhnBTNdiv.id = "lhnChatButton";'.PHP_EOL;
81
- $lhncontent .= 'if (document.body.lastChild) { document.body.insertBefore(lhnBTNdiv, document.body.lastChild); } else { document.body.appendChild(lhnBTNdiv); }'.PHP_EOL;
82
- $lhncontent .= '} else {'.PHP_EOL;
83
- $lhncontent .= 'document.write("<div id=\"lhnChatButton\"></div>");'.PHP_EOL;
84
- $lhncontent .= '}'.PHP_EOL;
85
- $lhncontent .= '}'.PHP_EOL;
86
- $lhncontent .= 'loadLHNFile(lhnJsHost + "www.livehelpnow.net/lhn/scripts/livehelpnow.aspx?lhnid=" + lhnAccountN + "&iv=" + lhnInviteEnabled + "&d=" + lhnDepartmentN + "&ver=" + lhnVersion + "&rnd=" + Math.random(), "js");'.PHP_EOL;
87
- $lhncontent .= 'window.setTimeout("if (typeof bLHNOnline != \'undefined\' && bLHNOnline == 0 && lhnHPPanel == true){document.getElementById(\'lhn_live_chat_btn\').style.display=\'none\';}", 2000);'.PHP_EOL;
88
- $lhncontent .= '}'.PHP_EOL;
89
- $lhncontent .= 'loadLHNFile(lhnJsHost + "www.livehelpnow.net/lhn/js/build/helppanel.ashx", "js");'.PHP_EOL;
90
- $lhncontent .= 'loadLHNFile(lhnJsHost + "www.livehelpnow.net/lhn/js/css/helppanel/" + lhnTheme + "/style.css", "css"); '.PHP_EOL;
91
- $lhncontent .= '}'.PHP_EOL;
92
- $lhncontent .= 'if (window.addEventListener) {'.PHP_EOL;
93
- $lhncontent .= 'window.addEventListener("load", function () {'.PHP_EOL;
94
- $lhncontent .= 'loadLHNFiles();'.PHP_EOL;
95
- $lhncontent .= '}, false);'.PHP_EOL;
96
- $lhncontent .= '} else if (window.attachEvent) {'.PHP_EOL;
97
- $lhncontent .= 'window.attachEvent("onload", function () {'.PHP_EOL;
98
- $lhncontent .= 'loadLHNFiles();'.PHP_EOL;
99
- $lhncontent .= '});'.PHP_EOL;
100
- $lhncontent .= '}'.PHP_EOL;
101
- $lhncontent .= '}'.PHP_EOL;
102
- $lhncontent .= '</script>"'.PHP_EOL;
103
- $lhncontent .= '<script type="text/javascript">'.PHP_EOL;
104
- $lhncontent .= 'function LHN_HelpPanel_onLoad(){'.PHP_EOL;
105
- $lhncontent .= 'wireLHNEvents();'.PHP_EOL;
106
- $lhncontent .= '}'.PHP_EOL;
107
- $lhncontent .= 'function wireLHNEvents() {'.PHP_EOL;
108
- $lhncontent .= 'window.lhn("#lhn_help_btn").click(function(){'.PHP_EOL;
109
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Tab Click');".PHP_EOL;
110
- $lhncontent .= '});'.PHP_EOL;
111
- $lhncontent .= 'window.lhn("#lhn_helppanel #lhn_help_exit").click(function(){'.PHP_EOL;
112
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Close Button Click');".PHP_EOL;
113
- $lhncontent .= '});'.PHP_EOL;
114
- $lhncontent .= 'window.lhn("#lhn_helppanel .lhn_options_btn").click(function(){'.PHP_EOL;
115
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'More Options Button Click');".PHP_EOL;
116
- $lhncontent .= '});'.PHP_EOL;
117
- $lhncontent .= 'window.lhn("#lhn_helppanel #lhn_search_box").blur(function(){'.PHP_EOL;
118
- $lhncontent .= 'if(window.lhn(this).val() != ""){'.PHP_EOL;
119
- $lhncontent .= 'lhnCurVal = window.lhn(this).val();'.PHP_EOL;
120
- $lhncontent .= 'if(typeof(lhnOldVal) == "undefined" || lhnOldVal != lhnCurVal){'.PHP_EOL;
121
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Knowledge Base Search', encodeURIComponent(window.lhn(this).val()));".PHP_EOL;
122
- $lhncontent .= 'lhnOldVal = lhnCurVal;'.PHP_EOL;
123
- $lhncontent .= '}'.PHP_EOL;
124
- $lhncontent .= '}'.PHP_EOL;
125
- $lhncontent .= '});'.PHP_EOL;
126
- $lhncontent .= 'window.lhn("#lhn_helppanel .lhn_live_chat_btn").click(function(){'.PHP_EOL;
127
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Chat Button Click');".PHP_EOL;
128
- $lhncontent .= '});'.PHP_EOL;
129
- $lhncontent .= 'window.lhn("#lhn_helppanel .lhn_ticket_btn").click(function(){'.PHP_EOL;
130
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Ticket Button Click');".PHP_EOL;
131
- $lhncontent .= '});'.PHP_EOL;
132
- $lhncontent .= 'window.lhn("#lhn_helppanel .lhn_callback_btn").click(function(){'.PHP_EOL;
133
- $lhncontent .= "lhnPushAnalytics('LiveHelpNow HelpOut Tab', 'Callback Button Click');".PHP_EOL;
134
- $lhncontent .= '});'.PHP_EOL;
135
- $lhncontent .= '}'.PHP_EOL;
136
- $lhncontent .= 'function lhnPushAnalytics(category, event, label){'.PHP_EOL;
137
- $lhncontent .= 'if(typeof(_gaq) != "undefined"){'.PHP_EOL;
138
- $lhncontent .= '_gaq.push(["_trackEvent", category, event, label]);'.PHP_EOL;
139
- $lhncontent .= '}'.PHP_EOL;
140
- $lhncontent .= '}'.PHP_EOL;
141
  $lhncontent .= '</script>'.PHP_EOL;
 
142
 
143
  echo $lhncontent;
144
  }
20
  $lhn_account_number = Mage::getStoreConfig('lhn_helpouttab/general/account_number');
21
  $lhn_account_number = str_replace("lhn", "", strtolower($lhn_account_number));
22
  $lhn_chat_window = Mage::getStoreConfig('lhn_helpouttab/general/chat_window');
23
+ $lhn_department = Mage::getStoreConfig('lhn_helpouttab/general/department');
24
  $lhn_autochat = Mage::getStoreConfig('lhn_helpouttab/general/autochat');
25
  $lhn_theme = Mage::getStoreConfig('lhn_helpouttab/general/theme');
26
  $lhn_slideout = Mage::getStoreConfig('lhn_helpouttab/general/slideout');
34
  $lhn_no_results = Mage::getStoreConfig('lhn_helpouttab/general/no_results');
35
  $lhn_views = Mage::getStoreConfig('lhn_helpouttab/general/views');
36
 
 
 
 
 
 
 
37
  $lhncontent = '<script type="text/javascript">'.PHP_EOL;
 
 
38
  $lhncontent .= 'var lhnCustom1 = "'.$lhnEmail.'";'.PHP_EOL;
39
  $lhncontent .= 'var lhnCustom2 = "'.$lhnCustomer.'";'.PHP_EOL;
40
  $lhncontent .= 'var lhnCustom3 = "'.$lhnCart.'";'.PHP_EOL;
41
  $lhncontent .= 'var lhnPlugin = "Mage-'.Mage::getVersion().'-HO";'.PHP_EOL;
42
+ $lhncontent .= 'var lhnAccountN = "'.$lhn_account_number.'";'.PHP_EOL;
 
 
 
43
  $lhncontent .= 'var lhnInviteEnabled = '.$lhn_autochat.';'.PHP_EOL;
 
44
  $lhncontent .= 'var lhnWindowN = '.$lhn_chat_window.'; '.PHP_EOL;
45
+ $lhncontent .= 'var lhnDepartmentN = '.$lhn_department.'; '.PHP_EOL;
 
 
46
  $lhncontent .= 'var lhnTheme = "'.$lhn_theme.'"; '.PHP_EOL;
47
  $lhncontent .= 'var lhnHPPanel = '.$lhn_slideout.'; '.PHP_EOL;
48
  $lhncontent .= 'var lhnHPKnowledgeBase = '.$lhn_knowbase.'; '.PHP_EOL;
54
  $lhncontent .= 'var lhnLO_helpPanel_knowledgeBase_please_search = "'.$lhn_search_message.'";'.PHP_EOL;
55
  $lhncontent .= 'var lhnLO_helpPanel_typeahead_noResults_message = "'.$lhn_no_results.'";'.PHP_EOL;
56
  $lhncontent .= 'var lhnLO_helpPanel_typeahead_result_views = "'.$lhn_views.'";'.PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  $lhncontent .= '</script>'.PHP_EOL;
58
+ $lhncontent .= '<script src="//commondatastorage.googleapis.com/lhn/helpout/scripts/lhnhelpouttab-current.min.js" type="text/javascript" id="lhnscriptho"></script>'.PHP_EOL;
59
 
60
  echo $lhncontent;
61
  }
app/code/community/LHN/HelpOutTab/etc/config.xml CHANGED
@@ -26,6 +26,7 @@
26
  <lhn_helpouttab>
27
  <general>
28
  <chat_window>0</chat_window>
 
29
  <theme>default</theme>
30
  <search_title>Find answers</search_title>
31
  <search_message>Please search our knowledge base for answers or click [More options]</search_message>
26
  <lhn_helpouttab>
27
  <general>
28
  <chat_window>0</chat_window>
29
+ <department>0</department>
30
  <theme>default</theme>
31
  <search_title>Find answers</search_title>
32
  <search_message>Please search our knowledge base for answers or click [More options]</search_message>
app/code/community/LHN/HelpOutTab/etc/system.xml CHANGED
@@ -32,14 +32,23 @@
32
  <show_in_store>1</show_in_store>
33
  </account_number>
34
  <chat_window>
35
- <label>Chat Window:</label>
36
- <comment><![CDATA[* Must be numeric]]></comment>
37
  <frontend_type>text</frontend_type>
38
  <sort_order>20</sort_order>
39
  <show_in_default>1</show_in_default>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
  </chat_window>
 
 
 
 
 
 
 
 
 
43
  <autochat>
44
  <label>Enable automatic chat invitation:</label>
45
  <frontend_type>select</frontend_type>
32
  <show_in_store>1</show_in_store>
33
  </account_number>
34
  <chat_window>
35
+ <label>Chat Window ID:</label>
36
+ <comment><![CDATA[* Must be numeric -- This is usually 0]]></comment>
37
  <frontend_type>text</frontend_type>
38
  <sort_order>20</sort_order>
39
  <show_in_default>1</show_in_default>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
  </chat_window>
43
+ <department>
44
+ <label>Department ID:</label>
45
+ <comment><![CDATA[* Must be numeric -- This is usually 0]]></comment>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>25</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ </department>
52
  <autochat>
53
  <label>Enable automatic chat invitation:</label>
54
  <frontend_type>select</frontend_type>
package.xml CHANGED
@@ -1,18 +1,27 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LiveHelpNow_Help_Desk_HelpOut_Tab</name>
4
- <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The HelpOut Tab plugin displays help desk options to visitors in a snappy right tab.</summary>
10
- <description>LiveHelpNow is a responsive, reliable, and extremely affordable Help Desk Software for your website. The HelpOut Tab plugin displays help desk options to visitors in a snappy right tab that&#x2019;s easy to spot and works intuitively- pointing customers with questions to instant answers so they can find all the information they need to make a confident purchase. The versatile HelpOut Tab works with any combination of LiveHelpNow products: - Live Chat System - Ticket System - Callback Request System - Knowledge Base System</description>
11
- <notes>Fixed installation error</notes>
 
 
 
 
 
 
 
 
 
12
  <authors><author><name>Eric Witchin</name><user>livehelpnow</user><email>plugins@livehelpnpw.com</email></author></authors>
13
- <date>2013-04-12</date>
14
- <time>12:36:18</time>
15
- <contents><target name="magecommunity"><dir name="LHN"><dir name="HelpOutTab"><dir name="Model"><file name="Numberoptions.php" hash="69866ada2a28f913c0a95d7890361ede"/><file name="Observer.php" hash="9b79e889c3fbc93b0455fbf0c59ae1b1"/><file name="Themeoptions.php" hash="59cab048698fb9db808acc373d70b9f0"/><file name="Torfoptions.php" hash="0607e2cee88f601872159836b97a6cd9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="224498779875ca9fb89e3a6f24c9541a"/><file name="config.xml" hash="e4b4270ffb259b98164da25ebb86397f"/><file name="system.xml" hash="1a542b1323dd0c77798729063ac0be17"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LHN_HelpOutTab.xml" hash="2527101d29220ad373ee8e4572b70dd7"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LiveHelpNow_Help_Desk_HelpOut_Tab</name>
4
+ <version>1.1.4</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The HelpOut Tab plugin displays help desk options to visitors in a snappy right tab.</summary>
10
+ <description>LiveHelpNow is a responsive, reliable, and extremely affordable Help Desk Software for your website. The LiveHelpNow HelpOut Tab plugin displays help desk options to visitors in a snappy right tab that&#x2019;s easy to spot and works intuitively- pointing customers with questions to instant answers so they can find all the information they need to make a confident purchase. &#xD;
11
+ &#xD;
12
+ The versatile HelpOut Tab works with any combination of LiveHelpNow products: &#xD;
13
+ &#xD;
14
+ &#x2022; Live Chat System&#xD;
15
+ &#x2022; Ticket System&#xD;
16
+ &#x2022; Callback Request System&#xD;
17
+ &#x2022; Knowledge Base System&#xD;
18
+ &#xD;
19
+ This FREE plugin requires a PAID LiveHelpNow Subscription.</description>
20
+ <notes>New Options added</notes>
21
  <authors><author><name>Eric Witchin</name><user>livehelpnow</user><email>plugins@livehelpnpw.com</email></author></authors>
22
+ <date>2013-04-23</date>
23
+ <time>10:29:51</time>
24
+ <contents><target name="magecommunity"><dir name="LHN"><dir name="HelpOutTab"><dir name="Model"><file name="Numberoptions.php" hash="69866ada2a28f913c0a95d7890361ede"/><file name="Observer.php" hash="1d2969418750aa3db8dc75dc269ec6b0"/><file name="Themeoptions.php" hash="59cab048698fb9db808acc373d70b9f0"/><file name="Torfoptions.php" hash="0607e2cee88f601872159836b97a6cd9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="224498779875ca9fb89e3a6f24c9541a"/><file name="config.xml" hash="30679888467364310c6b18de32247ce6"/><file name="system.xml" hash="51ef26d1290eec35647bd82bc57bc9d7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LHN_HelpOutTab.xml" hash="2527101d29220ad373ee8e4572b70dd7"/></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>