Mp_Zopim_live_Chat - Version 0.1.0

Version Notes

Zopim Live Chat is an extension for the chat widget provided by Zopim

Download this release

Release Info

Developer Magento Core Team
Extension Mp_Zopim_live_Chat
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/MagePsycho/Zopimlivechat/Block/System/Config/Info.php ADDED
@@ -0,0 +1,35 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_Block_System_Config_Info
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+
14
+ /**
15
+ * Render fieldset html
16
+ *
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element)
21
+ {
22
+ $html = '<div style="background:url(\'http://www.magepsycho.com/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
23
+ <h4>About MagePsycho</h4>
24
+ <p>A Professional Zend PHP5 Certified Developer / Freelancer with specialization in CMS + E-Commerce Solutions.<br />
25
+ View more extensions @ <a href="http://www.magentocommerce.com/magento-connect/developer/MagePsycho" target="_blank">MagentoConnect</a><br />
26
+ <a href="http://www.magepsycho.com/contacts" target="_blank">Request a Quote / Contact Us</a><br />
27
+ Skype me @ magentopycho<br />
28
+ Email me @ <a href="mailto:info@magepsycho.com">info@magepsycho.com</a><br />
29
+ Follow me on <a href="http://twitter.com/magepsycho" target="_blank">Twitter</a><br />
30
+ Visit my website: <a href="http://www.magepsycho.com" target="_blank">www.magespycho.com</a></p>
31
+ </div>';
32
+
33
+ return $html;
34
+ }
35
+ }
app/code/local/MagePsycho/Zopimlivechat/Block/System/Config/Zopimlivechat/Info.php ADDED
@@ -0,0 +1,26 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_Block_System_Config_Zopimlivechat_Info
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+
14
+ public function render(Varien_Data_Form_Element_Abstract $element)
15
+ {
16
+ $html = '<div style="border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 10px 10px 10px;">
17
+ <h4>About Zopim Live Chat</h4>
18
+ <p>Zopim is an online chat software trusted and loved by enterprises and small business worldwide.<br />
19
+ For more details visit the links: <a href="http://www.zopim.com/" target="_blank">Homepage</a> | <a href="http://dashboard.zopim.com/" target="_blank">Dashboard</a><br />
20
+ </p>
21
+ </div>
22
+ ';
23
+
24
+ return $html;
25
+ }
26
+ }
app/code/local/MagePsycho/Zopimlivechat/Block/Zopimlivechat.php ADDED
@@ -0,0 +1,18 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_Block_Zopimlivechat extends Mage_Core_Block_Template
10
+ {
11
+ protected function _toHtml(){
12
+ $helper = Mage::helper('zopimlivechat');
13
+ if($helper->isActive()){
14
+ return $helper->getWidgetCode();
15
+ }
16
+ return;
17
+ }
18
+ }
app/code/local/MagePsycho/Zopimlivechat/Helper/Data.php ADDED
@@ -0,0 +1,37 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_Helper_Data extends Mage_Core_Helper_Abstract
10
+ {
11
+ public function getConfig($field, $section = 'option', $default = null){
12
+ $value = Mage::getStoreConfig('zopimlivechat/' .$section . '/' . $field);
13
+ if(!isset($value) or trim($value) == ''){
14
+ return $default;
15
+ }else{
16
+ return $value;
17
+ }
18
+ }
19
+
20
+ public function log($data){
21
+ if(!$this->getConfig('enable_log')){
22
+ return;
23
+ }
24
+ if(is_array($data) || is_object($data)){
25
+ $data = print_r($data, true);
26
+ }
27
+ Mage::log($data, null, 'zopimlivechat.log');
28
+ }
29
+
30
+ public function isActive(){
31
+ return $this->getConfig('active');
32
+ }
33
+
34
+ public function getWidgetcode(){
35
+ return $this->getConfig('widget_code');
36
+ }
37
+ }
app/code/local/MagePsycho/Zopimlivechat/Model/Zopimlivechat.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_Model_Zopimlivechat extends Mage_Core_Model_Abstract
10
+ {
11
+
12
+ }
app/code/local/MagePsycho/Zopimlivechat/controllers/IndexController.php ADDED
@@ -0,0 +1,15 @@
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Zopimlivechat
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Zopimlivechat_IndexController extends Mage_Core_Controller_Front_Action
10
+ {
11
+ public function indexAction()
12
+ {
13
+
14
+ }
15
+ }
app/code/local/MagePsycho/Zopimlivechat/etc/adminhtml.xml ADDED
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Zopimlivechat
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <acl>
13
+ <resources>
14
+ <admin>
15
+ <children>
16
+ <system>
17
+ <children>
18
+ <config>
19
+ <children>
20
+ <magepychoinfo>
21
+ <title>MagePsycho - Information</title>
22
+ </magepychoinfo>
23
+ <zopimlivechat>
24
+ <title>Zopim Live Chat Section</title>
25
+ </zopimlivechat>
26
+ </children>
27
+ </config>
28
+ </children>
29
+ </system>
30
+ </children>
31
+ </admin>
32
+ </resources>
33
+ </acl>
34
+ </config>
app/code/local/MagePsycho/Zopimlivechat/etc/config.xml ADDED
@@ -0,0 +1,84 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Zopimlivechat
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <MagePsycho_Zopimlivechat>
14
+ <version>0.1.0</version>
15
+ </MagePsycho_Zopimlivechat>
16
+ </modules>
17
+ <global>
18
+ <models>
19
+ <zopimlivechat>
20
+ <class>MagePsycho_Zopimlivechat_Model</class>
21
+ </zopimlivechat>
22
+ </models>
23
+ <blocks>
24
+ <zopimlivechat>
25
+ <class>MagePsycho_Zopimlivechat_Block</class>
26
+ </zopimlivechat>
27
+ </blocks>
28
+ <helpers>
29
+ <zopimlivechat>
30
+ <class>MagePsycho_Zopimlivechat_Helper</class>
31
+ </zopimlivechat>
32
+ </helpers>
33
+ </global>
34
+ <frontend>
35
+ <routers>
36
+ <zopimlivechat>
37
+ <use>standard</use>
38
+ <args>
39
+ <module>MagePsycho_Zopimlivechat</module>
40
+ <frontName>zopimlivechat</frontName>
41
+ </args>
42
+ </zopimlivechat>
43
+ </routers>
44
+ <layout>
45
+ <updates>
46
+ <zopimlivechat>
47
+ <file>zopimlivechat.xml</file>
48
+ </zopimlivechat>
49
+ </updates>
50
+ </layout>
51
+ </frontend>
52
+ <adminhtml>
53
+ <acl>
54
+ <resources>
55
+ <admin>
56
+ <children>
57
+ <system>
58
+ <children>
59
+ <config>
60
+ <children>
61
+ <magepychoinfo>
62
+ <title>MagePsycho - Information</title>
63
+ </magepychoinfo>
64
+ <zopimlivechat>
65
+ <title>Zopim Live Chat Section</title>
66
+ </zopimlivechat>
67
+ </children>
68
+ </config>
69
+ </children>
70
+ </system>
71
+ </children>
72
+ </admin>
73
+ </resources>
74
+ </acl>
75
+ </adminhtml>
76
+ <default>
77
+ <zopimlivechat>
78
+ <option>
79
+ <active>1</active>
80
+ <enable_log>1</enable_log>
81
+ </option>
82
+ </zopimlivechat>
83
+ </default>
84
+ </config>
app/code/local/MagePsycho/Zopimlivechat/etc/system.xml ADDED
@@ -0,0 +1,86 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Zopimlivechat
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <tabs>
13
+ <magepychoall translate="label" module="zopimlivechat">
14
+ <label>MagePsycho Extensions</label>
15
+ <sort_order>400</sort_order>
16
+ </magepychoall>
17
+ </tabs>
18
+ <sections>
19
+ <magepychoinfo translate="label" module="zopimlivechat">
20
+ <label>Info</label>
21
+ <tab>magepychoall</tab>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>99999999999</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
+ <groups>
28
+ <info>
29
+ <frontend_model>zopimlivechat/system_config_info</frontend_model>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </info>
35
+ </groups>
36
+ </magepychoinfo>
37
+
38
+ <zopimlivechat module="zopimlivechat">
39
+ <label>Zopim Live Chat</label>
40
+ <tab>magepychoall</tab>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>1000</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
+ <groups>
47
+ <option translate="label">
48
+ <label>General Settings</label>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>10</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
+ <fields>
55
+ <info>
56
+ <frontend_model>zopimlivechat/system_config_zopimlivechat_info</frontend_model>
57
+ <sort_order>0</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </info>
62
+ <active translate="label">
63
+ <label>Enabled</label>
64
+ <frontend_type>select</frontend_type>
65
+ <source_model>adminhtml/system_config_source_yesno</source_model>
66
+ <sort_order>10</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </active>
71
+ <widget_code>
72
+ <label>Chat Widget Code</label>
73
+ <frontend_type>textarea</frontend_type>
74
+ <sort_order>20</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ <comment><![CDATA[Please paste the widget code obtained from Zopim Dashboard.<br />In order to <strong>Sign up with Zopim</strong> and <strong>Grab the Widget Code</strong> follow this article:<br />
79
+ <a href="http://www.blog.magepsycho.com/integrating-zopim-live-chat-in-your-magento-store/" target="_blank">Integrating Zopim Live Chat in your Magento Store</a>]]></comment>
80
+ </widget_code>
81
+ </fields>
82
+ </option>
83
+ </groups>
84
+ </zopimlivechat>
85
+ </sections>
86
+ </config>
app/design/frontend/default/default/layout/zopimlivechat.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout>
3
+ <default>
4
+ <reference name="before_body_end">
5
+ <block type="zopimlivechat/zopimlivechat" name="mp_zopim_live_chat" />
6
+ </reference>
7
+ </default>
8
+ </layout>
app/etc/modules/MagePsycho_Zopimlivechat.xml ADDED
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Zopimlivechat
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <MagePsycho_Zopimlivechat>
14
+ <active>true</active>
15
+ <codePool>local</codePool>
16
+ </MagePsycho_Zopimlivechat>
17
+ </modules>
18
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Mp_Zopim_live_Chat</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Zopim Live Chat is an extension for the chat widget provided by &lt;a href="https://www.zopim.com/" target="_blank" title="Zopim Live Chat"&gt;Zopim&lt;/a&gt;</summary>
10
+ <description>Zopim Live Chat is an extension for the chat widget provided by &lt;a href="https://www.zopim.com/" target="_blank" title="Zopim Live Chat"&gt;Zopim&lt;/a&gt;</description>
11
+ <notes>Zopim Live Chat is an extension for the chat widget provided by &lt;a href="https://www.zopim.com/" target="_blank" title="Zopim Live Chat"&gt;Zopim&lt;/a&gt;</notes>
12
+ <authors><author><name>MagePsycho</name><user>auto-converted</user><email>rajen_k_bhtt@hotmail.com</email></author></authors>
13
+ <date>2011-11-28</date>
14
+ <time>12:22:33</time>
15
+ <contents><target name="magelocal"><dir name="MagePsycho"><dir name="Zopimlivechat"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Zopimlivechat"><file name="Info.php" hash="a02eaaebf3ee61ead26ca00023c66bce"/></dir><file name="Info.php" hash="3f20a94f0a67de3b12be1f241f78255f"/></dir></dir><file name="Zopimlivechat.php" hash="57bb64dcd94a94f9fdd5ad032504af60"/></dir><dir name="Helper"><file name="Data.php" hash="d62040f4d78e3185b71a60e722855569"/></dir><dir name="Model"><file name="Zopimlivechat.php" hash="e8f1ac4f2a89d6947b18e734b9ce7ca8"/></dir><dir name="controllers"><file name="IndexController.php" hash="a81ead1f00d0c46f3452fcb6b2c9b010"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ad7aa49b046078a5c59e3949ee8ca314"/><file name="config.xml" hash="316edc69e8bcfea523b2e0c98db68863"/><file name="system.xml" hash="16241f8736117ad76e75c6941ff00c11"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MagePsycho_Zopimlivechat.xml" hash="c1eae56e8862591a5ea208964ab06dd8"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="zopimlivechat.xml" hash="82d07a79dfc7b8281ce2a7a7bb60f8cd"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>