Smartsupp_LiveChat - Version 1.0.0

Version Notes

2016 Smartsupp.com

Download this release

Release Info

Developer Smartsupp
Extension Smartsupp_LiveChat
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Smartsupp/LiveChat/Block/Adminhtml/Config/Source/Hint.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+
22
+ class Smartsupp_LiveChat_Block_Adminhtml_Config_Source_Hint extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
23
+ {
24
+ public function render(Varien_Data_Form_Element_Abstract $element)
25
+ {
26
+ $html = '<p><img style="vertical-align:middle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMsAAAA5CAYAAACYod8hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAD5BJREFUeF7tXAl0FdUZJuLSVk9rPa222lZ7xKVRgeRFCgpkeTOooIJ1qStaj+J2BJTFSqsBK3VBWZP3MCgIKiVUEcEqKIUARRaxQEjI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jpbDEi7a796+5umZ2SyLz8VRII8z08AtFazEDTthothGOnmRDxsNot7s70sQbO0oXfroLfDrmen3Sw0JQpNkMSY5Q0MEJImMr3+O5DcCb+kKZv7y8xikN79uu/DMvbUP8vZY8VlrPcUWkc0JzMRml9Yt7kNyM1i0M9uh9afZpSxR8E7pkJXPFMxiOsqNdZsHLIvP1miR/RA2nxFvzWbhcA3IXR3iax+rGwJsxDw3V2N+A12TStbwixIlAVOvxoUhonrtzKof8zlCbwgJEJgNws+N4Aho5yMqHOEm8/hOu1moWsAd1mPORGxRcavRE3IvvxEiURp0LTcx4W0idZuFoE0t9vdF9Mo6c+sDaLc4d2vljELgW9GaLmDoV1t1yam0ixIpqPgOFlPbQX1uJiijI6WfCg/hHrT6cdoIjQMqBNqFiQ5vVzJp4hYtFvLiLi/jTDeqGg/aZaYZQ9tLODvYGiswt/QaacnuA3HvI7XSo2bKKnHQ/J8g4Xmu0jCB51+bks9N+rNthMx5jafE+j1FHsczhvpvTAOWvSiXkkYI/8QjAPJl4m6/WGA0fjrBV/nRsKUjcpNLQtxL3dRGa5vhqTMyaDx4gxcRxdoDgGLwHmkb1/gZ3k2XEuJEjuDs5AkHky7nqZX+IVMTGg3LnBOVmEgm0YN6ExEck+DziR6GJrpCdwa1jtLQEkcmrSB2aKIg/4PAbqnjEJfe/q/AMThqCCdEF2cRxRx0LXTGwb04DQeXQWF04ZoZkkU0cyioPB/B2UWBYUYocyioBAjlFkUFGKEMouCQoxQZlFQiBHKLAoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgopRps2/wPMCXqlzfBnAAAAAABJRU5ErkJggg=="></p>';
27
+
28
+ $buttonSignUp = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
29
+ 'label' => $this->__('Not a Smartsupp user yet?'),
30
+ 'onclick' => "window.open('". Smartsupp_LiveChat_Helper_Data::SMARTSUPP_SIGNUP_URL ."', '_blank');",
31
+ 'class' => 'add',
32
+ 'type' => 'button',
33
+ 'id' => 'smartsupp-signup',
34
+ ))
35
+ ->toHtml();
36
+
37
+ $buttonDashboard = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
38
+ 'label' => $this->__('Smartsupp Dashboard'),
39
+ 'onclick' => "window.open('". Smartsupp_LiveChat_Helper_Data::SMARTSUPP_DASHBOARD_URL ."', '_blank');",
40
+ 'class' => 'go',
41
+ 'type' => 'button',
42
+ 'id' => 'smartsupp-dashboard',
43
+ ))
44
+ ->toHtml();
45
+
46
+ return $html . '<p>' . $buttonSignUp . '&nbsp;&nbsp;' . $buttonDashboard . '</p>';
47
+ }
48
+ }
app/code/community/Smartsupp/LiveChat/Block/Display.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+
22
+ class Smartsupp_LiveChat_Block_Display extends Mage_Core_Block_Template
23
+ {
24
+ public function getChatApi()
25
+ {
26
+ if (strlen(trim(Mage::helper('livechat')->getChatApi())) > 1) {
27
+ return $this->jsQuoteEscape(Mage::helper('livechat')->getChatApi());
28
+ }
29
+ return null;
30
+ }
31
+
32
+ public function getCustomerId()
33
+ {
34
+ if (Mage::helper('livechat')->getCustomerId()) {
35
+ return 'id : {label: "' . Mage::helper('livechat')->__('ID') . '", value: "' . $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getId()) . '"},';
36
+ }
37
+ return null;
38
+ }
39
+
40
+ public function getCustomerName()
41
+ {
42
+ if (Mage::helper('livechat')->getCustomerName()) {
43
+ return 'name : {label: "' . Mage::helper('livechat')->__('Name') . '", value: "' . $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getFirstname() . ' ' . Mage::helper('customer')->getCurrentCustomer()->getLastname()) . '"},';
44
+ }
45
+ return null;
46
+ }
47
+
48
+ public function getCustomerEmail()
49
+ {
50
+ if (Mage::helper('livechat')->getCustomerEmail()) {
51
+ return 'email : {label: "' . Mage::helper('livechat')->__('Email') . '", value: "' . $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getEmail()) . '"},';
52
+ }
53
+ return null;
54
+ }
55
+
56
+ public function getCustomerPhone()
57
+ {
58
+ if (Mage::helper('livechat')->getCustomerPhone() && Mage::helper('customer')->getCurrentCustomer()->getPrimaryBillingAddress()) {
59
+ return 'phone : {label: "' . Mage::helper('livechat')->__('Phone') . '", value: "' . $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getPrimaryBillingAddress()->getTelephone()) . '"},';
60
+ }
61
+ return null;
62
+ }
63
+
64
+ public function getCustomerRole()
65
+ {
66
+ if (Mage::helper('livechat')->getCustomerRole()) {
67
+ return 'role : {label: "' . Mage::helper('livechat')->__('Role') . '", value: "' . $this->jsQuoteEscape(Mage::getModel('customer/group')->load(Mage::getSingleton('customer/session')->getCustomerGroupId())->getCustomerGroupCode()) . '"},';
68
+ }
69
+ return null;
70
+ }
71
+
72
+ public function getCustomerSpendings()
73
+ {
74
+ $orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_email', Mage::helper('customer')->getCurrentCustomer()->getEmail())->addFieldToFilter('status', 'complete');
75
+
76
+ $spendings = 0;
77
+ foreach ($orders as $order) {
78
+ $spendings += $order->getGrandTotal();
79
+ }
80
+ if (Mage::helper('livechat')->getCustomerSpendings()) {
81
+ return 'spendings : {label: "' . Mage::helper('livechat')->__('Spendings') . '", value: "' . $this->jsQuoteEscape($spendings) . '"},';
82
+ }
83
+ return null;
84
+ }
85
+
86
+ public function getCustomerOrders()
87
+ {
88
+ $orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_email', Mage::helper('customer')->getCurrentCustomer()->getEmail())->addFieldToFilter('status', 'complete');
89
+
90
+ $count = 0;
91
+ foreach ($orders as $order) {
92
+ $count++;
93
+ }
94
+ if (Mage::helper('livechat')->getCustomerOrders()) {
95
+ return 'orders : {label: "' . Mage::helper('livechat')->__('Orders') . '", value: "' . $this->jsQuoteEscape($count) . '"},';
96
+ }
97
+ return null;
98
+ }
99
+
100
+ protected function _toHtml()
101
+ {
102
+ if (Mage::helper('livechat')->getEnabled()) {
103
+
104
+ if (strlen($this->getChatApi()) > 0)
105
+ $smartsupp_api_js = $this->getChatApi();
106
+ else
107
+ $smartsupp_api_js = '';
108
+
109
+ $smartsupp_variables_js = '';
110
+ if (Mage::getSingleton('customer/session')->isLoggedIn()) {
111
+ if ($this->getCustomerId()) {
112
+ $smartsupp_variables_js .= $this->getCustomerId();
113
+ }
114
+ if ($this->getCustomerName()) {
115
+ $smartsupp_variables_js .= $this->getCustomerName();
116
+ }
117
+ if ($this->getCustomerEmail()) {
118
+ $smartsupp_variables_js .= $this->getCustomerEmail();
119
+ }
120
+ if ($this->getCustomerPhone()) {
121
+ $smartsupp_variables_js .= $this->getCustomerPhone();
122
+ }
123
+ if ($this->getCustomerRole()) {
124
+ $smartsupp_variables_js .= $this->getCustomerRole();
125
+ }
126
+ if ($this->getCustomerSpendings()) {
127
+ $smartsupp_variables_js .= $this->getCustomerSpendings();
128
+ }
129
+ if ($this->getCustomerOrders()) {
130
+ $smartsupp_variables_js .= $this->getCustomerOrders();
131
+ }
132
+ }
133
+
134
+ $block = $this->getLayout()->createBlock(
135
+ 'core/template',
136
+ 'smartsupp_livechat',
137
+ array(
138
+ 'template' => 'livechat/widget.phtml',
139
+ 'key' => Mage::helper('livechat')->getChatId(),
140
+ 'dashboard_name' => $this->jsQuoteEscape(Mage::helper('customer')->getCurrentCustomer()->getFirstname() . ' ' . Mage::helper('customer')->getCurrentCustomer()->getLastname()),
141
+ 'optional_api_js' => $smartsupp_api_js,
142
+ 'variables_js' => $this->jsQuoteEscape($smartsupp_variables_js),
143
+ 'cookie_domain' => '', //$this->getModel()->getCookie()->getDomain(),
144
+ )
145
+ );
146
+
147
+ return $block->toHtml();
148
+ }
149
+
150
+ return null;
151
+ }
152
+ }
app/code/community/Smartsupp/LiveChat/Helper/Data.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+
22
+ class Smartsupp_LiveChat_Helper_Data extends Mage_Core_Helper_Abstract
23
+ {
24
+ const SMARTSUPP_SIGNUP_URL = 'https://www.smartsupp.com/cs/sign/up';
25
+ const SMARTSUPP_DASHBOARD_URL = 'https://dashboard.smartsupp.com';
26
+
27
+ public function getEnabled ()
28
+ {
29
+ return Mage::getStoreConfigFlag('livechat/settings/enabled');
30
+ }
31
+
32
+ public function getChatId ()
33
+ {
34
+ return Mage::getStoreConfig('livechat/settings/chatid');
35
+ }
36
+
37
+ public function getChatApi ()
38
+ {
39
+ return Mage::getStoreConfig('livechat/settings/chatapi');
40
+ }
41
+
42
+ public function getCustomerId ()
43
+ {
44
+ return Mage::getStoreConfigFlag('livechat/variables/customerid');
45
+ }
46
+
47
+ public function getCustomerName ()
48
+ {
49
+ return Mage::getStoreConfigFlag('livechat/variables/customername');
50
+ }
51
+
52
+ public function getCustomerEmail ()
53
+ {
54
+ return Mage::getStoreConfigFlag('livechat/variables/customeremail');
55
+ }
56
+
57
+ public function getCustomerPhone ()
58
+ {
59
+ return Mage::getStoreConfigFlag('livechat/variables/customerphone');
60
+ }
61
+
62
+ public function getCustomerRole ()
63
+ {
64
+ return Mage::getStoreConfigFlag('livechat/variables/customerrole');
65
+ }
66
+
67
+ public function getCustomerSpendings ()
68
+ {
69
+ return Mage::getStoreConfigFlag('livechat/variables/customerspendings');
70
+ }
71
+
72
+ public function getCustomerOrders ()
73
+ {
74
+ return Mage::getStoreConfigFlag('livechat/variables/customerorders');
75
+ }
76
+ }
app/code/community/Smartsupp/LiveChat/Model/Config/Source/ShowHide.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+
22
+ class Smartsupp_LiveChat_Model_Config_Source_Showhide
23
+ {
24
+ public function toOptionArray()
25
+ {
26
+ return array(
27
+ array('value' => '0', 'label' => Mage::helper('livechat')->__('Hide')),
28
+ array('value' => '1', 'label' => Mage::helper('livechat')->__('Show')),
29
+ );
30
+ }
31
+ }
app/code/community/Smartsupp/LiveChat/controllers/Adminhtml/IndexController.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+
22
+ class Smartsupp_LiveChat_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
23
+ {
24
+ public function dashboardAction()
25
+ {
26
+ $this->_redirectUrl(Smartsupp_LiveChat_Helper_Data::SMARTSUPP_DASHBOARD_URL);
27
+ }
28
+ }
app/code/community/Smartsupp/LiveChat/etc/adminhtml.xml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Smartsupp Live Chat integration module.
5
+ *
6
+ * @package Smartsupp
7
+ * @author Smartsupp <vladimir@smartsupp.com>
8
+ * @link http://www.smartsupp.com
9
+ * @copyright 2015 Smartsupp.com
10
+ * @license GPL-2.0+
11
+ *
12
+ * Plugin Name: Smartsupp Live Chat
13
+ * Plugin URI: http://www.smartsupp.com
14
+ * Description: Adds Smartsupp Live Chat code to Magento.
15
+ * Version: 1.0.0
16
+ * Author: Smartsupp
17
+ * Author URI: http://www.smartsupp.com
18
+ * Text Domain: smartsupp
19
+ * License: GPL-2.0+
20
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
+ */
22
+ -->
23
+ <config>
24
+ <menu>
25
+ <customer>
26
+ <children>
27
+ <livechat translate="title" module="livechat">
28
+ <title>Smartsupp Live Chat</title>
29
+ <action>adminhtml/system_config/edit/section/livechat</action>
30
+ <sort_order>999</sort_order>
31
+ </livechat>
32
+ </children>
33
+ </customer>
34
+ </menu>
35
+ <acl>
36
+ <resources>
37
+ <all>
38
+ <title>Allow Everything</title>
39
+ </all>
40
+ <admin>
41
+ <children>
42
+ <system>
43
+ <children>
44
+ <config>
45
+ <children>
46
+ <livechat translate="title" module="livechat">
47
+ <title>Smartsupp Live Chat</title>
48
+ </livechat>
49
+ </children>
50
+ </config>
51
+ </children>
52
+ </system>
53
+ <customer>
54
+ <children>
55
+ <livechat translate="title" module="livechat">
56
+ <title>Smartsupp Live Chat</title>
57
+ </livechat>
58
+ </children>
59
+ </customer>
60
+ </children>
61
+ </admin>
62
+ </resources>
63
+ </acl>
64
+ </config>
app/code/community/Smartsupp/LiveChat/etc/config.xml ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Smartsupp Live Chat integration module.
5
+ *
6
+ * @package Smartsupp
7
+ * @author Smartsupp <vladimir@smartsupp.com>
8
+ * @link http://www.smartsupp.com
9
+ * @copyright 2015 Smartsupp.com
10
+ * @license GPL-2.0+
11
+ *
12
+ * Plugin Name: Smartsupp Live Chat
13
+ * Plugin URI: http://www.smartsupp.com
14
+ * Description: Adds Smartsupp Live Chat code to Magento.
15
+ * Version: 1.0.0
16
+ * Author: Smartsupp
17
+ * Author URI: http://www.smartsupp.com
18
+ * Text Domain: smartsupp
19
+ * License: GPL-2.0+
20
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
+ */
22
+ -->
23
+ <config>
24
+ <modules>
25
+ <Smartsupp_LiveChat>
26
+ <version>1.0.0</version>
27
+ </Smartsupp_LiveChat>
28
+ </modules>
29
+
30
+ <default>
31
+ <livechat>
32
+ <variables>
33
+ <customerid>1</customerid>
34
+ <customername>1</customername>
35
+ <customeremail>1</customeremail>
36
+ <customerphone>1</customerphone>
37
+ <customerrole>1</customerrole>
38
+ <customerspendings>1</customerspendings>
39
+ <customerorders>1</customerorders>
40
+ </variables>
41
+ </livechat>
42
+ </default>
43
+
44
+ <global>
45
+ <blocks>
46
+ <livechat>
47
+ <class>Smartsupp_LiveChat_Block</class>
48
+ </livechat>
49
+ </blocks>
50
+ <helpers>
51
+ <livechat>
52
+ <class>Smartsupp_LiveChat_Helper</class>
53
+ </livechat>
54
+ </helpers>
55
+ <models>
56
+ <livechat>
57
+ <class>Smartsupp_LiveChat_Model</class>
58
+ </livechat>
59
+ </models>
60
+ </global>
61
+
62
+ <frontend>
63
+ <layout>
64
+ <updates>
65
+ <livechat>
66
+ <file>livechat.xml</file>
67
+ </livechat>
68
+ </updates>
69
+ </layout>
70
+ </frontend>
71
+
72
+ <adminhtml>
73
+ <translate>
74
+ <modules>
75
+ <livechat>
76
+ <files>
77
+ <default>Smartsupp_LiveChat.csv</default>
78
+ </files>
79
+ </livechat>
80
+ </modules>
81
+ </translate>
82
+ </adminhtml>
83
+
84
+ <admin>
85
+ <routers>
86
+ <livechat>
87
+ <use>admin</use>
88
+ <args>
89
+ <module>Smartsupp_LiveChat_Adminhtml</module>
90
+ <frontName>livechat</frontName>
91
+ </args>
92
+ </livechat>
93
+ </routers>
94
+ </admin>
95
+ </config>
app/code/community/Smartsupp/LiveChat/etc/system.xml ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Smartsupp Live Chat integration module.
5
+ *
6
+ * @package Smartsupp
7
+ * @author Smartsupp <vladimir@smartsupp.com>
8
+ * @link http://www.smartsupp.com
9
+ * @copyright 2015 Smartsupp.com
10
+ * @license GPL-2.0+
11
+ *
12
+ * Plugin Name: Smartsupp Live Chat
13
+ * Plugin URI: http://www.smartsupp.com
14
+ * Description: Adds Smartsupp Live Chat code to Magento.
15
+ * Version: 1.0.0
16
+ * Author: Smartsupp
17
+ * Author URI: http://www.smartsupp.com
18
+ * Text Domain: smartsupp
19
+ * License: GPL-2.0+
20
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
+ */
22
+ -->
23
+ <config>
24
+ <tabs>
25
+ <smartsupp>
26
+ <label>Smartsupp</label>
27
+ <sort_order>999</sort_order>
28
+ </smartsupp>
29
+ </tabs>
30
+ <sections>
31
+ <livechat module="livechat" translate="label">
32
+ <label>Smartsupp Live Chat</label>
33
+ <tab>smartsupp</tab>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>10</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <groups>
40
+ <hint>
41
+ <frontend_model>livechat/adminhtml_config_source_hint</frontend_model>
42
+ <sort_order>0</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ </hint>
47
+
48
+ <settings module="livechat" translate="label">
49
+ <label>Settings</label>
50
+ <frontend_type>text</frontend_type>
51
+ <sort_order>10</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ <fields>
56
+ <enabled module="livechat" translate="label">
57
+ <label>Enabled</label>
58
+ <frontend_type>select</frontend_type>
59
+ <source_model>adminhtml/system_config_source_yesno</source_model>
60
+ <comment>Show chat box on website.</comment>
61
+ <sort_order>10</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
+ </enabled>
66
+ <chatid module="livechat" translate="label">
67
+ <label>Smartsupp key</label>
68
+ <frontend_type>text</frontend_type>
69
+ <sort_order>20</sort_order>
70
+ <comment>Smartsupp key assigned to your account.</comment>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>1</show_in_store>
74
+ </chatid>
75
+ <chatapi module="livechat" translate="label">
76
+ <label>Optional API</label>
77
+ <frontend_type>textarea</frontend_type>
78
+ <sort_order>30</sort_order>
79
+ <comment>Advanced chat box modifications with Smartsupp API.</comment>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </chatapi>
84
+ </fields>
85
+ </settings>
86
+
87
+ <variables module="livechat" translate="label">
88
+ <label>Customer info</label>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>20</sort_order>
91
+ <comment>Show info about your customers (name, email, spend etc.) in Smartsupp dashboard, where your agents can see it. You will find customer info in the right panel while chatting.</comment>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ <fields>
96
+ <customerid module="livechat" translate="label">
97
+ <label>Customer's ID</label>
98
+ <frontend_type>select</frontend_type>
99
+ <source_model>livechat/config_source_showhide</source_model>
100
+ <sort_order>10</sort_order>
101
+ <comment>Shows customer's ID.</comment>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>1</show_in_store>
105
+ </customerid>
106
+ <customername module="livechat" translate="label">
107
+ <label>Customer's Name</label>
108
+ <frontend_type>select</frontend_type>
109
+ <source_model>livechat/config_source_showhide</source_model>
110
+ <sort_order>20</sort_order>
111
+ <comment>Shows customer's display name.</comment>
112
+ <show_in_default>1</show_in_default>
113
+ <show_in_website>1</show_in_website>
114
+ <show_in_store>1</show_in_store>
115
+ </customername>
116
+ <customeremail module="livechat" translate="label">
117
+ <label>Customer's Email</label>
118
+ <frontend_type>select</frontend_type>
119
+ <source_model>livechat/config_source_showhide</source_model>
120
+ <sort_order>30</sort_order>
121
+ <comment>Shows customer's email.</comment>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>1</show_in_website>
124
+ <show_in_store>1</show_in_store>
125
+ </customeremail>
126
+ <customerphone module="livechat" translate="label">
127
+ <label>Customer's Phone</label>
128
+ <frontend_type>select</frontend_type>
129
+ <source_model>livechat/config_source_showhide</source_model>
130
+ <sort_order>40</sort_order>
131
+ <comment>Shows customer's phone.</comment>
132
+ <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
+ </customerphone>
136
+ <customerrole module="livechat" translate="label">
137
+ <label>Customer's Role</label>
138
+ <frontend_type>select</frontend_type>
139
+ <source_model>livechat/config_source_showhide</source_model>
140
+ <sort_order>50</sort_order>
141
+ <comment>Shows customer's role.</comment>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <show_in_store>1</show_in_store>
145
+ </customerrole>
146
+ <customerorders module="livechat" translate="label">
147
+ <label>Customer's Orders</label>
148
+ <frontend_type>select</frontend_type>
149
+ <source_model>livechat/config_source_showhide</source_model>
150
+ <sort_order>60</sort_order>
151
+ <comment>Shows customer's orders amount.</comment>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </customerorders>
156
+ <customerspendings module="livechat" translate="label">
157
+ <label>Customer's Spendings</label>
158
+ <frontend_type>select</frontend_type>
159
+ <source_model>livechat/config_source_showhide</source_model>
160
+ <sort_order>70</sort_order>
161
+ <comment>Shows customer's cumulative spendings.</comment>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ </customerspendings>
166
+ </fields>
167
+ </variables>
168
+ </groups>
169
+ </livechat>
170
+ </sections>
171
+ </config>
app/design/frontend/base/default/layout/livechat.xml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Smartsupp Live Chat integration module.
5
+ *
6
+ * @package Smartsupp
7
+ * @author Smartsupp <vladimir@smartsupp.com>
8
+ * @link http://www.smartsupp.com
9
+ * @copyright 2015 Smartsupp.com
10
+ * @license GPL-2.0+
11
+ *
12
+ * Plugin Name: Smartsupp Live Chat
13
+ * Plugin URI: http://www.smartsupp.com
14
+ * Description: Adds Smartsupp Live Chat code to Magento.
15
+ * Version: 1.0.0
16
+ * Author: Smartsupp
17
+ * Author URI: http://www.smartsupp.com
18
+ * Text Domain: smartsupp
19
+ * License: GPL-2.0+
20
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
+ */
22
+ -->
23
+ <layout version="1.0.0">
24
+ <default>
25
+ <reference name="before_body_end">
26
+ <block type="livechat/display" name="smartsupp_livechat_default">
27
+ </block>
28
+ </reference>
29
+ </default>
30
+ </layout>
app/design/frontend/base/default/template/livechat/widget.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartsupp Live Chat integration module.
4
+ *
5
+ * @package Smartsupp
6
+ * @author Smartsupp <vladimir@smartsupp.com>
7
+ * @link http://www.smartsupp.com
8
+ * @copyright 2015 Smartsupp.com
9
+ * @license GPL-2.0+
10
+ *
11
+ * Plugin Name: Smartsupp Live Chat
12
+ * Plugin URI: http://www.smartsupp.com
13
+ * Description: Adds Smartsupp Live Chat code to Magento.
14
+ * Version: 1.0.0
15
+ * Author: Smartsupp
16
+ * Author URI: http://www.smartsupp.com
17
+ * Text Domain: smartsupp
18
+ * License: GPL-2.0+
19
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20
+ */
21
+ ?>
22
+
23
+ <?php if ($this->getKey()): ?>
24
+ <script type="text/javascript">
25
+ <?php if ($this->getVariablesJs()): ?>
26
+ var prSmartsuppVars = {<?php echo $this->getVariablesJs(); ?>};
27
+ <?php endif ?>
28
+ var _smartsupp = _smartsupp || {};
29
+ _smartsupp.key = '<?php echo $this->getKey(); ?>';
30
+ _smartsupp.cookieDomain = '<?php echo $this->getCookieDomain(); ?>';
31
+ window.smartsupp||(function(d) {
32
+ var o=smartsupp=function(){ o._.push(arguments)},s=d.getElementsByTagName('script')[0],c=d.createElement('script');o._=[];
33
+ c.async=true;c.type='text/javascript';c.charset='utf-8';c.src='//www.smartsuppchat.com/loader.js';s.parentNode.insertBefore(c,s);
34
+ })(document);
35
+ <?php if ($this->getDashboardName()): ?>
36
+ smartsupp("name", "<?php echo $this->getDashboardName(); ?>");
37
+ <?php endif ?>
38
+ <?php if ($this->getVariablesJs()): ?>
39
+ smartsupp("variables", prSmartsuppVars);
40
+ <?php endif ?>
41
+ <?php if ($this->getOptionalApiJs()):
42
+ echo $this->getOptionalApiJs();
43
+ endif ?>
44
+
45
+ </script>
46
+ <?php endif ?>
app/etc/modules/Smartsupp_LiveChat.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Diglin
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Diglin
17
+ * @package Diglin_Chat
18
+ * @copyright Copyright (c) 2011-2015 Diglin (http://www.diglin.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Smartsupp_LiveChat>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ </Smartsupp_LiveChat>
28
+ </modules>
29
+ </config>
app/locale/cs_CZ/Smartsupp_LiveChat.csv ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Not a Smartsupp user yet?", "Ještě nejste uživatelem Smartsupp?"
2
+ "Hide", "Skrýt"
3
+ "Show", "Zobrazit"
4
+ "Settings", "Nastavení"
5
+ "Yes", "Ano"
6
+ "No", "Ne"
7
+ "Enabled", "Povoleno"
8
+ "Show chat box on website.", "Zobrazit chat na webu."
9
+ "Smartsupp key", "Smartsupp klíč"
10
+ "Smartsupp key assigned to your account.","Smartsupp klíč přiřazen k vašemu účtu."
11
+ "Optional API", "Volitelné API"
12
+ "Advanced chat box modifications with Smartsupp API.", "Pokročilé úpravy chat boxu přes Smartsupp API."
13
+ "Customer info", "Zákaznické info"
14
+ "Show info about your customers (name, email, spend etc.) in Smartsupp dashboard, where your agents can see it. You will find customer info in the right panel while chatting.", "Zobrazte si info o vašich zákaznících (jméno, email, útrata) ve Smartsupp dashboardu, kde ho uvidí vaši operátoři. Zákaznické info najdete v pravém panelu, když chatujete."
15
+ "Customer's ID", "Zákaznícke ID"
16
+ "Shows customer's ID.", "Zobrazit identifikátor zákazníka"
17
+ "Customer's Name", "Jméno a příjmení"
18
+ "Shows customer's display name.", "Zobrazit jméno a příjmení zákazníka."
19
+ "Customer's Email", "Email"
20
+ "Shows customer's email.", "Zobrazit email zákazníka."
21
+ "Customer's Phone", "Telefonní číslo"
22
+ "Shows customer's phone.", "Zobrazit telefonní číslo zákazníka."
23
+ "Customer's Role", "Rola"
24
+ "Shows customer's role.", "Zobrazit roli zákazníka (zákaznickou skupinu)."
25
+ "Customer's Orders", "Počet objednávek"
26
+ "Shows customer's orders amount.", "Zobrazit počet objednávek vytvořených zákazníkem."
27
+ "Customer's Spendings", "Obrat"
28
+ "Shows customer's cumulative spendings.", "Zobrazit celkový finanční objem objednávek vytvořených zákazníkem."
app/locale/sk_SK/Smartsupp_LiveChat.csv ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Not a Smartsupp user yet?", "Ešte nie ste užívateľom Smartsupp?"
2
+ "Hide", "Skryť"
3
+ "Show", "Zobraziť"
4
+ "Settings", "Nastavenie"
5
+ "Yes", "Áno"
6
+ "No", "Nie"
7
+ "Enabled", "Povolené"
8
+ "Show chat box on website.", "Zobraziť chat na webe."
9
+ "Smartsupp key", "Smartsupp kľúč"
10
+ "Smartsupp key assigned to your account.","Smartsupp kľúč priradený k vašemu účtu."
11
+ "Optional API", "Voliteľné API"
12
+ "Advanced chat box modifications with Smartsupp API.", "Pokročilé úpravy chat boxu cez Smartsupp API."
13
+ "Customer info", "Zákaznícke info"
14
+ "Show info about your customers (name, email, spend etc.) in Smartsupp dashboard, where your agents can see it. You will find customer info in the right panel while chatting.", "Zobrazte si info o vašich zákazníkoch (meno, email, útrata) vo Smartsupp dashboardu, kde ho uvidia vaši operátori. Zákaznícke info nájdete v pravom paneli, keď chatujete."
15
+ "Customer's ID", "Zákaznícke ID"
16
+ "Shows customer's ID.", "Zobraziť identifikátor zákazníka."
17
+ "Customer's Name", "Meno a priezvisko"
18
+ "Shows customer's display name.", "Zobraziť meno a priezvisko zákazníka."
19
+ "Customer's Email", "Email"
20
+ "Shows customer's email.", "Zobraziť email zákazníka."
21
+ "Customer's Phone", "Telefónne číslo"
22
+ "Shows customer's phone.", "Zobraziť telefónne číslo zákazníka."
23
+ "Customer's Role", "Rola"
24
+ "Shows customer's role.", "Zobraziť rolu zákazníka (zákaznícku skupinu)."
25
+ "Customer's Orders", "Počet objednávok"
26
+ "Shows customer's orders amount.", "Zobraziť počet objednávok vytvorených zákazníkom."
27
+ "Customer's Spendings", "Objem objednávok"
28
+ "Shows customer's cumulative spendings.", "Zobraziť celkový finančný objem objednávok vytvorených zákazníkom."
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Smartsupp_LiveChat</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.txt">GPL-2.0+</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Smartsupp Live Chat integration</summary>
10
+ <description>Smartsupp Live Chat integration module that adds Smartsupp Live Chat code to Magento.</description>
11
+ <notes>2016 Smartsupp.com</notes>
12
+ <authors><author><name>Smartsupp</name><user>vladimir</user><email>vladimir@smartsupp.com</email></author></authors>
13
+ <date>2016-01-26</date>
14
+ <time>03:34:17</time>
15
+ <contents><target name="magecommunity"><dir name="Smartsupp"><dir name="LiveChat"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Hint.php" hash="4182d8947f63e389b1cc541e953a2c3a"/></dir></dir></dir><file name="Display.php" hash="b42607837016163d13e7551cdf79bd07"/></dir><dir name="Helper"><file name="Data.php" hash="fb242d29cba92b0aa308ea9f0feefebe"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="ShowHide.php" hash="8389889b2f69145593e5953f29415d0c"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="b69bf8bab0647ce08262827cee9fea40"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="70ac4ef9a749702d26040468d499b328"/><file name="config.xml" hash="8029fb80b6128ad159fe9f11245095ef"/><file name="system.xml" hash="915ac14bb863a66f8e39a7f6940b9c57"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="livechat.xml" hash="7f80555a8d54d88b0b92ccd4e209ad18"/></dir><dir name="template"><dir name="livechat"><file name="widget.phtml" hash="37681a10d42efd46d267d9ca246c67da"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smartsupp_LiveChat.xml" hash="811c32231c3257c994c82ca5bb331d46"/></dir></target><target name="magelocale"><dir><dir name="cs_CZ"><file name="Smartsupp_LiveChat.csv" hash="5fba573b1723bc948c1869c4361d9a08"/></dir><dir name="sk_SK"><file name="Smartsupp_LiveChat.csv" hash="84040aece5ceff786ea1d3e81768ea35"/></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>