Version Notes
Initial version of the Formilla Live Chat Magento extension. Simply installs a code snippet to your Magento store to make live chat available across your website.
Download this release
Release Info
Developer | Formilla |
Extension | Formilla_LiveChat |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Formilla/LiveChat/Block/Jsheader.php +19 -0
- app/code/community/Formilla/LiveChat/Helper/Data.php +7 -0
- app/code/community/Formilla/LiveChat/etc/adminhtml.xml +30 -0
- app/code/community/Formilla/LiveChat/etc/config.xml +29 -0
- app/code/community/Formilla/LiveChat/etc/system.xml +49 -0
- app/design/frontend/base/default/layout/formillalivechat.xml +14 -0
- app/design/frontend/base/default/template/formillalivechat/js.phtml +21 -0
- app/etc/modules/Formilla_LiveChat.xml +9 -0
- package.xml +20 -0
app/code/community/Formilla/LiveChat/Block/Jsheader.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Formilla_LiveChat_Block_Jsheader extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
protected $_chatId = false;
|
6 |
+
|
7 |
+
|
8 |
+
public function getChatId() {
|
9 |
+
if($this->_chatId === false)
|
10 |
+
$this->_chatId = Mage::getStoreConfig('livechat/chat/id');
|
11 |
+
|
12 |
+
return $this->_chatId;
|
13 |
+
}
|
14 |
+
|
15 |
+
public function isActive() {
|
16 |
+
return
|
17 |
+
$this->getChatId();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Formilla/LiveChat/Helper/Data.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Formilla_LiveChat_Helper_Data extends Mage_Core_Helper_Abstract
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
app/code/community/Formilla/LiveChat/etc/adminhtml.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<formilla_livechat>
|
8 |
+
<children>
|
9 |
+
<livechat>
|
10 |
+
<title>LiveChat</title>
|
11 |
+
<sort_order>50</sort_order>
|
12 |
+
</livechat>
|
13 |
+
</children>
|
14 |
+
</formilla_livechat>
|
15 |
+
<system>
|
16 |
+
<children>
|
17 |
+
<config>
|
18 |
+
<children>
|
19 |
+
<livechat>
|
20 |
+
<title>Formilla LiveChat</title>
|
21 |
+
</livechat>
|
22 |
+
</children>
|
23 |
+
</config>
|
24 |
+
</children>
|
25 |
+
</system>
|
26 |
+
</children>
|
27 |
+
</admin>
|
28 |
+
</resources>
|
29 |
+
</acl>
|
30 |
+
</config>
|
app/code/community/Formilla/LiveChat/etc/config.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Formilla_LiveChat>
|
5 |
+
<version>1.0.0.0</version>
|
6 |
+
</Formilla_LiveChat>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<livechat>
|
11 |
+
<class>Formilla_LiveChat_Block</class>
|
12 |
+
</livechat>
|
13 |
+
</blocks>
|
14 |
+
<helpers>
|
15 |
+
<livechat>
|
16 |
+
<class>Formilla_LiveChat_Helper</class>
|
17 |
+
</livechat>
|
18 |
+
</helpers>
|
19 |
+
</global>
|
20 |
+
<frontend>
|
21 |
+
<layout>
|
22 |
+
<updates>
|
23 |
+
<livechat>
|
24 |
+
<file>formillalivechat.xml</file>
|
25 |
+
</livechat>
|
26 |
+
</updates>
|
27 |
+
</layout>
|
28 |
+
</frontend>
|
29 |
+
</config>
|
app/code/community/Formilla/LiveChat/etc/system.xml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<livechat_config module="livechat" translate="label">
|
5 |
+
<label>Formilla</label>
|
6 |
+
<sort_order>1</sort_order>
|
7 |
+
</livechat_config>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<livechat translate="label" module="livechat">
|
11 |
+
<label>Live Chat</label>
|
12 |
+
<tab>livechat_config</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>10</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<chat translate="label">
|
20 |
+
<label>Settings</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>10</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<id translate="label">
|
28 |
+
<label>Chat ID</label>
|
29 |
+
<frontend_type>text</frontend_type>
|
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 |
+
<comment><![CDATA[
|
35 |
+
<span style="font-size:12px;"><a href="https://www.formilla.com/sign-up.aspx?u=ma" target="_blank"> SIGN UP</a>
|
36 |
+
to receive your Chat ID by email. <br /> Enter your Chat ID here and save to activate the chat widget on your Magento store.
|
37 |
+
</span> <br /> <br />
|
38 |
+
<span style="font-size:12px;">Refer to the <a href="http://www.formilla.com/live-chat-help.aspx" target="_blank">Formilla Live Chat Help Center</a>
|
39 |
+
or <a href="http://www.formilla.com/contact-us.aspx" target="_blank">contact us</a> if you have any questions.
|
40 |
+
</span>
|
41 |
+
]]>
|
42 |
+
</comment>
|
43 |
+
</id>
|
44 |
+
</fields>
|
45 |
+
</chat>
|
46 |
+
</groups>
|
47 |
+
</livechat>
|
48 |
+
</sections>
|
49 |
+
</config>
|
app/design/frontend/base/default/layout/formillalivechat.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
To change this license header, choose License Headers in Project Properties.
|
4 |
+
To change this template file, choose Tools | Templates
|
5 |
+
and open the template in the editor.
|
6 |
+
-->
|
7 |
+
|
8 |
+
<layout>
|
9 |
+
<default>
|
10 |
+
<reference name="head">
|
11 |
+
<block type="livechat/jsheader" name="livechat_js" template="formillalivechat/js.phtml" />
|
12 |
+
</reference>
|
13 |
+
</default>
|
14 |
+
</layout>
|
app/design/frontend/base/default/template/formillalivechat/js.phtml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ($this->isActive()) : ?>
|
2 |
+
<script type="text/javascript">
|
3 |
+
(function () {
|
4 |
+
var head = document.getElementsByTagName("head").item(0);
|
5 |
+
var script = document.createElement("script");
|
6 |
+
var src = (document.location.protocol == 'https:' ? 'https://www.formilla.com/scripts/feedback.js' : 'http://www.formilla.com/scripts/feedback.js');
|
7 |
+
script.setAttribute("type", "text/javascript"); script.setAttribute("src", src); script.setAttribute("async", true);
|
8 |
+
var complete = false;
|
9 |
+
|
10 |
+
script.onload = script.onreadystatechange = function () {
|
11 |
+
if (!complete && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
|
12 |
+
complete = true;
|
13 |
+
Formilla.guid = '<?php echo $this->getChatId(); ?>';
|
14 |
+
Formilla.loadFormillaChatButton();
|
15 |
+
}
|
16 |
+
};
|
17 |
+
|
18 |
+
head.appendChild(script);
|
19 |
+
})();
|
20 |
+
</script>
|
21 |
+
<?php endif; ?>
|
app/etc/modules/Formilla_LiveChat.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Formilla_LiveChat>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Formilla_LiveChat>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Formilla_LiveChat</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.gnu.org/licenses/gpl-2.0.html">GPL2</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Install Formilla Live Chat for your Magento store in just a few minutes.</summary>
|
10 |
+
<description>Formilla brings live chat, offline email, and help desk features to your Magento store.
|
11 |
+

|
12 |
+
We offer free and premium services for businesses of all sizes. </description>
|
13 |
+
<notes>Initial version of the Formilla Live Chat Magento extension. Simply installs a code snippet to your Magento store to make live chat available across your website.</notes>
|
14 |
+
<authors><author><name>Formilla</name><user>Formilla</user><email>sales@formilla.com</email></author></authors>
|
15 |
+
<date>2014-06-01</date>
|
16 |
+
<time>19:26:01</time>
|
17 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Formilla_LiveChat.xml" hash="6d20b34fee9ee99952dd9aa604515ed5"/></dir></target><target name="magecommunity"><dir name="Formilla"><dir name="LiveChat"><dir name="Block"><file name="Jsheader.php" hash="4afc539010f78440ce4d2900e3edac5d"/></dir><dir name="Helper"><file name="Data.php" hash="3eaae811909feb04bd9393b619983e24"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d80d4f0572f2994a420474542ce31632"/><file name="config.xml" hash="bd3f4995e502c6369cc2b1d104b6df15"/><file name="system.xml" hash="8bd0527be5a478384d3a4c82c7b7f41d"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="formillalivechat.xml" hash="db780b36a1607480169cfa5f34391721"/></dir><dir name="template"><dir name="formillalivechat"><file name="js.phtml" hash="90db46c9c91191f41867c516cc4a2589"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
+
</package>
|