Version Notes
Final first version
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | CSupport_LiveChatPlugin |
| Version | 1.0.0 |
| Comparing to | |
| See all releases | |
Version 1.0.0
- app/code/local/CSupport/LiveChatPlugin/Helper/Data.php +4 -0
- app/code/local/CSupport/LiveChatPlugin/Model/Position.php +15 -0
- app/code/local/CSupport/LiveChatPlugin/Model/Types.php +13 -0
- app/code/local/CSupport/LiveChatPlugin/etc/config.xml +71 -0
- app/code/local/CSupport/LiveChatPlugin/etc/system.xml +83 -0
- app/design/frontend/default/default/layout/CSupport_LiveChatPlugin.xml +8 -0
- app/design/frontend/default/default/template/CSupport/LiveChatPlugin/livechat.phtml +33 -0
- app/etc/modules/CSupport_LiveChatPlugin.xml +9 -0
- package.xml +33 -0
app/code/local/CSupport/LiveChatPlugin/Helper/Data.php
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class CSupport_LiveChatPlugin_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
+
{
|
| 4 |
+
}
|
app/code/local/CSupport/LiveChatPlugin/Model/Position.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class CSupport_LiveChatPlugin_Model_Position
|
| 3 |
+
{
|
| 4 |
+
public function toOptionArray()
|
| 5 |
+
{
|
| 6 |
+
return array(
|
| 7 |
+
array('value'=>"b-r", 'label'=>Mage::helper('livechatplugin')->__('Bottom Right')),
|
| 8 |
+
array('value'=>"b-l", 'label'=>Mage::helper('livechatplugin')->__('Bottom Left')),
|
| 9 |
+
array('value'=>"t-r", 'label'=>Mage::helper('livechatplugin')->__('Top Right')),
|
| 10 |
+
array('value'=>"t-l", 'label'=>Mage::helper('livechatplugin')->__('Top Left')),
|
| 11 |
+
);
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
}
|
| 15 |
+
?>
|
app/code/local/CSupport/LiveChatPlugin/Model/Types.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class CSupport_LiveChatPlugin_Model_Types
|
| 3 |
+
{
|
| 4 |
+
public function toOptionArray()
|
| 5 |
+
{
|
| 6 |
+
return array(
|
| 7 |
+
array('value'=>"chat-float-inline", 'label'=>Mage::helper('livechatplugin')->__('Floating Inline Chat Button')),
|
| 8 |
+
array('value'=>"chat-float", 'label'=>Mage::helper('livechatplugin')->__('Floating Popup Chat Button')),
|
| 9 |
+
);
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
| 13 |
+
?>
|
app/code/local/CSupport/LiveChatPlugin/etc/config.xml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<CSupport_LiveChatPlugin>
|
| 5 |
+
<version>1.0.0</version>
|
| 6 |
+
</CSupport_LiveChatPlugin>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<helpers>
|
| 10 |
+
<livechatplugin>
|
| 11 |
+
<class>CSupport_LiveChatPlugin_Helper</class>
|
| 12 |
+
</livechatplugin>
|
| 13 |
+
</helpers>
|
| 14 |
+
<models>
|
| 15 |
+
<livechatplugin>
|
| 16 |
+
<class>CSupport_LiveChatPlugin_Model</class>
|
| 17 |
+
</livechatplugin>
|
| 18 |
+
</models>
|
| 19 |
+
</global>
|
| 20 |
+
<frontend>
|
| 21 |
+
<layout>
|
| 22 |
+
<updates>
|
| 23 |
+
<csupport>
|
| 24 |
+
<file>CSupport_LiveChatPlugin.xml</file>
|
| 25 |
+
</csupport>
|
| 26 |
+
</updates>
|
| 27 |
+
</layout>
|
| 28 |
+
</frontend>
|
| 29 |
+
<adminhtml>
|
| 30 |
+
<acl>
|
| 31 |
+
<resources>
|
| 32 |
+
<admin>
|
| 33 |
+
<children>
|
| 34 |
+
<system>
|
| 35 |
+
<children>
|
| 36 |
+
<config>
|
| 37 |
+
<children>
|
| 38 |
+
<livechatplugin>
|
| 39 |
+
<title>cSupport Live Chat</title>
|
| 40 |
+
<sort_order>100</sort_order>
|
| 41 |
+
</livechatplugin>
|
| 42 |
+
</children>
|
| 43 |
+
</config>
|
| 44 |
+
</children>
|
| 45 |
+
</system>
|
| 46 |
+
</children>
|
| 47 |
+
</admin>
|
| 48 |
+
</resources>
|
| 49 |
+
</acl>
|
| 50 |
+
<translate>
|
| 51 |
+
<modules>
|
| 52 |
+
<CSupport_LiveChatPlugin>
|
| 53 |
+
<files>
|
| 54 |
+
<default>CSupport_LiveChatPlugin.csv</default>
|
| 55 |
+
</files>
|
| 56 |
+
</CSupport_LiveChatPlugin>
|
| 57 |
+
</modules>
|
| 58 |
+
</translate>
|
| 59 |
+
</adminhtml>
|
| 60 |
+
<default>
|
| 61 |
+
<livechatplugin>
|
| 62 |
+
<settings>
|
| 63 |
+
<auto_fill>Yes</auto_fill>
|
| 64 |
+
<type>chat-float-inline</type>
|
| 65 |
+
<website></website>
|
| 66 |
+
<position>b-r</position>
|
| 67 |
+
<margin></margin>
|
| 68 |
+
</settings>
|
| 69 |
+
</livechatplugin>
|
| 70 |
+
</default>
|
| 71 |
+
</config>
|
app/code/local/CSupport/LiveChatPlugin/etc/system.xml
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<config>
|
| 2 |
+
<sections>
|
| 3 |
+
<livechatplugin translate="label comment" module="livechatplugin">
|
| 4 |
+
<tab>general</tab>
|
| 5 |
+
<label>cSupport Live Chat</label>
|
| 6 |
+
<sort_order>10000</sort_order>
|
| 7 |
+
<show_in_default>1</show_in_default>
|
| 8 |
+
<show_in_website>1</show_in_website>
|
| 9 |
+
<show_in_store>1</show_in_store>
|
| 10 |
+
<groups>
|
| 11 |
+
<settings translate="label comment" module="livechatplugin">
|
| 12 |
+
<label>General Settings</label>
|
| 13 |
+
<frontend_type>text</frontend_type>
|
| 14 |
+
<sort_order>1</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 |
+
<fields>
|
| 19 |
+
<type translate="label comment">
|
| 20 |
+
<label>Type</label>
|
| 21 |
+
<frontend_type>select</frontend_type>
|
| 22 |
+
<sort_order>1</sort_order>
|
| 23 |
+
<source_model>livechatplugin/types</source_model>
|
| 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 |
+
<comment>Select the type of inline button you wish</comment>
|
| 28 |
+
</type>
|
| 29 |
+
<website translate="label comment">
|
| 30 |
+
<label>Your domain (without http//www.)</label>
|
| 31 |
+
<frontend_type>text</frontend_type>
|
| 32 |
+
<sort_order>2</sort_order>
|
| 33 |
+
<show_in_default>1</show_in_default>
|
| 34 |
+
<show_in_website>1</show_in_website>
|
| 35 |
+
<show_in_store>1</show_in_store>
|
| 36 |
+
<comment>Your domain is your unique address, ie. yourdomain.csupporthq.com. Please do not add http://</comment>
|
| 37 |
+
</website>
|
| 38 |
+
<auto_fill translate="label comment">
|
| 39 |
+
<label>Auto-fill</label>
|
| 40 |
+
<frontend_type>select</frontend_type>
|
| 41 |
+
<sort_order>3</sort_order>
|
| 42 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 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 |
+
<comment>If possible, auto-fill with customer information</comment>
|
| 47 |
+
</auto_fill>
|
| 48 |
+
</fields>
|
| 49 |
+
<comment>REMEMBER: You will need a cSupport live chat account. No account? Try a free 14-day trial at https://csupporthq.com/pricing/</comment>
|
| 50 |
+
</settings>
|
| 51 |
+
<layout translate="label comment" module="livechatplugin">
|
| 52 |
+
<label>Layout</label>
|
| 53 |
+
<frontend_type>text</frontend_type>
|
| 54 |
+
<sort_order>2</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 |
+
<fields>
|
| 59 |
+
<position translate="label comment">
|
| 60 |
+
<label>Position</label>
|
| 61 |
+
<frontend_type>select</frontend_type>
|
| 62 |
+
<sort_order>1</sort_order>
|
| 63 |
+
<source_model>livechatplugin/position</source_model>
|
| 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 |
+
<comment>The position of the live chat button</comment>
|
| 68 |
+
</position>
|
| 69 |
+
<margin translate="label comment">
|
| 70 |
+
<label>Margin</label>
|
| 71 |
+
<frontend_type>text</frontend_type>
|
| 72 |
+
<sort_order>2</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 |
+
<comment>The margin in pixels from the edge. Only put in numbers!</comment>
|
| 77 |
+
</margin>
|
| 78 |
+
</fields>
|
| 79 |
+
</layout>
|
| 80 |
+
</groups>
|
| 81 |
+
</livechatplugin>
|
| 82 |
+
</sections>
|
| 83 |
+
</config>
|
app/design/frontend/default/default/layout/CSupport_LiveChatPlugin.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout version="1.0.0">
|
| 3 |
+
<default>
|
| 4 |
+
<reference name="before_body_end">
|
| 5 |
+
<block type="core/template" name="csupport.livechatplugin" as="cSupportLiveChatPlugin" template="cSupport/LiveChatPlugin/livechat.phtml"/>
|
| 6 |
+
</reference>
|
| 7 |
+
</default>
|
| 8 |
+
</layout>
|
app/design/frontend/default/default/template/CSupport/LiveChatPlugin/livechat.phtml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$website = Mage::getStoreConfig('livechatplugin/settings/website',Mage::app()->getStore());
|
| 3 |
+
if($website!=""){
|
| 4 |
+
$tag = "";
|
| 5 |
+
|
| 6 |
+
$type = Mage::getStoreConfig('livechatplugin/settings/type');
|
| 7 |
+
$tag .= "<!-- cSupport Live Chat Plugin --><script type='text/javascript'>(function() { var src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '".$website."/external/".$type.".js';document.write(\"<script src='\"+src+\"' type='text/javascript'><\/script>\");})();";
|
| 8 |
+
|
| 9 |
+
$auto_fill = Mage::getStoreConfig('livechatplugin/settings/auto_fill');
|
| 10 |
+
if($auto_fill=='1'){
|
| 11 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
| 12 |
+
$customer = Mage::getSingleton('customer/session');
|
| 13 |
+
$name = htmlspecialchars($customer->getCustomer()->getFirstname()." ".$customer->getCustomer()->getLastname());
|
| 14 |
+
$email = $customer->getCustomer()->getEmail();
|
| 15 |
+
$tag .= "var cs_name=\"".$name."\";var cs_email=\"".$email."\";";
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
$position = Mage::getStoreConfig('livechatplugin/layout/position');
|
| 20 |
+
if($position=="t-l" || $position=="t-r" || $position=="b-l" || $position=="b-r"){
|
| 21 |
+
$tag .= "var cs_position=\"".$position."\";";
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
$margin = intval(Mage::getStoreConfig('livechatplugin/layout/margin'));
|
| 25 |
+
if($margin>0 && $margin<101){
|
| 26 |
+
$tag .="var cs_margin=\"".$margin."px\";";
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
$tag .= "</script><!-- //cSupport Live Chat Plugin -->";
|
| 30 |
+
|
| 31 |
+
echo $tag;
|
| 32 |
+
}
|
| 33 |
+
?>
|
app/etc/modules/CSupport_LiveChatPlugin.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<cSupport_LiveChatPlugin>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>local</codePool>
|
| 7 |
+
</cSupport_LiveChatPlugin>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>CSupport_LiveChatPlugin</name>
|
| 4 |
+
<version>1.0.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>This plugin implements the cSupport Inline Floating Live Chat button</summary>
|
| 10 |
+
<description>NOTE: This plugin requires a cSupport Live Chat account. You can signup at <a href="https://csupporthq.com/pricing/">https://csupporthq.com/pricing/</a>
|
| 11 |
+

|
| 12 |
+
This plugin implements an inline Live Chat button to the bottom right of your Magento site.
|
| 13 |
+

|
| 14 |
+
cSupport Live Chat features include:
|
| 15 |
+

|
| 16 |
+
* No client software to download
|
| 17 |
+
* Service live chats from any browser, including smart phones
|
| 18 |
+
* Service multiple visitors simultaneously
|
| 19 |
+
* Predefined responses
|
| 20 |
+
* Contact form for when you are not available/online to serve chats
|
| 21 |
+
* Jabber/Google Talk integration to chat with your website visitors directly from your favorite IM application (on your mobile as well)
|
| 22 |
+
* Reliable and secure
|
| 23 |
+
* Complete chat history available for visitors and for the website administrator
|
| 24 |
+
* Localized into English, Dansk, Español, Россия, Portugués (Brasil), Český, and many more.
|
| 25 |
+
* The live chat service is provided by csupporthq.com. See <a href="https://www.csupporthq.com/">https://www.csupporthq.com/</a> for a full list of features.</description>
|
| 26 |
+
<notes>Final first version</notes>
|
| 27 |
+
<authors><author><name>cSupport Team</name><user>auto-converted</user><email>contact@csupporthq.com</email></author></authors>
|
| 28 |
+
<date>2012-01-03</date>
|
| 29 |
+
<time>19:00:18</time>
|
| 30 |
+
<contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="CSupport"><dir name="LiveChatPlugin"><file name="livechat.phtml" hash="a505cfcab4692db274bdda002e8676e0"/></dir></dir></dir><dir name="layout"><file name="CSupport_LiveChatPlugin.xml" hash="99de803098fee3fb397e1d07db5b463e"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="CSupport"><dir name="LiveChatPlugin"><dir name="Helper"><file name="Data.php" hash="00957354badb30b551067f8b446da0bc"/></dir><dir name="Model"><file name="Position.php" hash="7336c26c22506618e223a1fb6e971732"/><file name="Types.php" hash="6bc93a9dcf3884fa2a8242a26a59c81c"/></dir><dir name="etc"><file name="config.xml" hash="68d5a98800987688f8a8b0683bc69eab"/><file name="system.xml" hash="f4c52388cf39120b668c89a0d41bbd53"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CSupport_LiveChatPlugin.xml" hash="8442f65b18e4e49ee88b747e5231912a"/></dir></target></contents>
|
| 31 |
+
<compatible/>
|
| 32 |
+
<dependencies/>
|
| 33 |
+
</package>
|
