Version Notes
Initial release
Download this release
Release Info
| Developer | Zoho LiveDesk |
| Extension | Zoho_LiveDesk |
| Version | 1.0.0 |
| Comparing to | |
| See all releases | |
Version 1.0.0
- app/code/community/Zoho/Livedesk/Block/Button.php +27 -0
- app/code/community/Zoho/Livedesk/Block/Livedesk.php +54 -0
- app/code/community/Zoho/Livedesk/Block/System/Config/Livedesk/Info.php +20 -0
- app/code/community/Zoho/Livedesk/Helper/Data.php +48 -0
- app/code/community/Zoho/Livedesk/Model/Livedesk.php +28 -0
- app/code/community/Zoho/Livedesk/controllers/IndexController.php +14 -0
- app/code/community/Zoho/Livedesk/etc/adminhtml.xml +31 -0
- app/code/community/Zoho/Livedesk/etc/config.xml +81 -0
- app/code/community/Zoho/Livedesk/etc/system.xml +86 -0
- app/design/frontend/base/default/layout/livedesk.xml +26 -0
- app/design/frontend/base/default/template/livedesk/button.phtml +21 -0
- app/etc/modules/Zoho_Livedesk.xml +18 -0
- package.xml +43 -0
app/code/community/Zoho/Livedesk/Block/Button.php
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livedesk_Block_Button extends Mage_Core_Block_Template {
|
| 10 |
+
|
| 11 |
+
public function getQuestion() {
|
| 12 |
+
$question = 'Hi, I need to know more about ';
|
| 13 |
+
$question .= $this->helper('catalog/data')->getProduct()->getName();
|
| 14 |
+
$question .= ' (';
|
| 15 |
+
$question .= $this->helper('core/url')->getCurrentUrl();
|
| 16 |
+
$question .= ')';
|
| 17 |
+
return htmlspecialchars(json_encode($question));
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
public function getLabel() {
|
| 21 |
+
return $this->__('Click here to chat');
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
public function isQuickChatEnabled() {
|
| 25 |
+
return $this->helper('livedesk')->isQuickChatEnabled();
|
| 26 |
+
}
|
| 27 |
+
}
|
app/code/community/Zoho/Livedesk/Block/Livedesk.php
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livedesk_Block_Livedesk extends Mage_Core_Block_Template {
|
| 10 |
+
|
| 11 |
+
protected function _toHtml() {
|
| 12 |
+
$helper = Mage::helper('livedesk');
|
| 13 |
+
$includedPages = $helper->getIncludedPages();
|
| 14 |
+
$currentPage = Mage::app()->getFrontController()->getAction()->getFullActionName();
|
| 15 |
+
|
| 16 |
+
// If chat window option is enabled, include the widget code only if
|
| 17 |
+
// "All Pages" or the current page is configured in settings.
|
| 18 |
+
if ($helper->isChatWindowEnabled()
|
| 19 |
+
&& (in_array('all_pages', $includedPages)
|
| 20 |
+
|| in_array($currentPage, $includedPages))) {
|
| 21 |
+
return $this->_getWidgetCode($helper);
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
// If chat window is not enabled, but the Quick chat option is enabled
|
| 25 |
+
// and the current page is Product page, then include the widget code
|
| 26 |
+
// but hide the float button and window so that they are shown only if
|
| 27 |
+
// the Quick Chat button is clicked.
|
| 28 |
+
if ($currentPage == 'catalog_product_view'
|
| 29 |
+
&& $helper->isQuickChatEnabled()) {
|
| 30 |
+
$extra = '$zoho.livedesk.floatbutton.visible("hide");
|
| 31 |
+
$zoho.livedesk.floatwindow.visible("hide");';
|
| 32 |
+
return $this->_getWidgetCode($helper, $extra);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
protected function _getName() {
|
| 37 |
+
return trim($this->helper('customer/data')->getCustomer()->getName());
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
protected function _getEmail() {
|
| 41 |
+
return trim($this->helper('customer/data')->getCustomer()->getEmail());
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
protected function _getWidgetCode($helper, $extra="") {
|
| 45 |
+
$code = $helper->getWidgetCode();
|
| 46 |
+
$code .= '<script>$zoho.livedesk.ready=function() {';
|
| 47 |
+
$code .= ' $zoho.livedesk.visitor.name("' . $this->_getName() . '");';
|
| 48 |
+
$code .= ' $zoho.livedesk.visitor.email("' . $this->_getEmail() . '");';
|
| 49 |
+
$code .= $extra;
|
| 50 |
+
$code .= '}</script>';
|
| 51 |
+
return $code;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
}
|
app/code/community/Zoho/Livedesk/Block/System/Config/Livedesk/Info.php
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livedesk_Block_System_Config_Livedesk_Info
|
| 10 |
+
extends Mage_Adminhtml_Block_Abstract
|
| 11 |
+
implements Varien_Data_Form_Element_Renderer_Interface {
|
| 12 |
+
|
| 13 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
| 14 |
+
$html = '<div style="border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 10px 10px 10px;">
|
| 15 |
+
<h4>About Zoho LiveDesk</h4>
|
| 16 |
+
<p>Engage with your customers in real time. Chat and deliver unbeatable customer support. Convert more, grow faster.</p>
|
| 17 |
+
</div>';
|
| 18 |
+
return $html;
|
| 19 |
+
}
|
| 20 |
+
}
|
app/code/community/Zoho/Livedesk/Helper/Data.php
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livedesk_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 10 |
+
|
| 11 |
+
public function getConfig($field, $section = 'option', $default = null) {
|
| 12 |
+
$value = Mage::getStoreConfig('livedesk/' . $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 |
+
|
| 25 |
+
if (is_array($data) || is_object($data)) {
|
| 26 |
+
$data = print_r($data, true);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
Mage::log($data, null, 'livedesk.log');
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public function getWidgetcode() {
|
| 33 |
+
return $this->getConfig('widget_code');
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
public function isChatWindowEnabled() {
|
| 37 |
+
return $this->getConfig('chat_window');
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public function getIncludedPages() {
|
| 41 |
+
return explode(',', $this->getConfig('include_in', 'option', 'all_pages'));
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
public function isQuickChatEnabled() {
|
| 45 |
+
return $this->getConfig('quick_chat_button');
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
}
|
app/code/community/Zoho/Livedesk/Model/Livedesk.php
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livedesk_Model_Livedesk extends Mage_Core_Model_Abstract {
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* Options getter
|
| 13 |
+
*
|
| 14 |
+
* @return array
|
| 15 |
+
*/
|
| 16 |
+
public function toOptionArray()
|
| 17 |
+
{
|
| 18 |
+
return array(
|
| 19 |
+
array('value' => 'all_pages', 'label'=>Mage::helper('livedesk')->__('All Pages')),
|
| 20 |
+
array('value' => 'cms_index_index', 'label'=>Mage::helper('livedesk')->__('Home Page')),
|
| 21 |
+
array('value' => 'catalog_category_view', 'label'=>Mage::helper('livedesk')->__('Category Pages')),
|
| 22 |
+
array('value' => 'catalog_product_view', 'label'=>Mage::helper('livedesk')->__('Product Pages')),
|
| 23 |
+
array('value' => 'checkout_cart_index', 'label'=>Mage::helper('livedesk')->__('My Cart')),
|
| 24 |
+
array('value' => 'checkout_onepage_index', 'label'=>Mage::helper('livedesk')->__('Checkout'))
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
}
|
app/code/community/Zoho/Livedesk/controllers/IndexController.php
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Zoho_Livechat_IndexController extends Mage_Core_Controller_Front_Action {
|
| 10 |
+
|
| 11 |
+
public function indexAction() {
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
}
|
app/code/community/Zoho/Livedesk/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* @category Zoho
|
| 5 |
+
* @package Zoho_Livedesk
|
| 6 |
+
* @author LiveDesk Team
|
| 7 |
+
* @website http://www.zoho.com/livedesk
|
| 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 |
+
<livedesk>
|
| 21 |
+
<title>Zoho LiveDesk Section</title>
|
| 22 |
+
</livedesk>
|
| 23 |
+
</children>
|
| 24 |
+
</config>
|
| 25 |
+
</children>
|
| 26 |
+
</system>
|
| 27 |
+
</children>
|
| 28 |
+
</admin>
|
| 29 |
+
</resources>
|
| 30 |
+
</acl>
|
| 31 |
+
</config>
|
app/code/community/Zoho/Livedesk/etc/config.xml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* @category Zoho
|
| 5 |
+
* @package Zoho_Livedesk
|
| 6 |
+
* @author LiveDesk Team
|
| 7 |
+
* @website http://www.zoho.com/livedesk
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
-->
|
| 11 |
+
<config>
|
| 12 |
+
<modules>
|
| 13 |
+
<Zoho_Livedesk>
|
| 14 |
+
<version>0.1.0</version>
|
| 15 |
+
</Zoho_Livedesk>
|
| 16 |
+
</modules>
|
| 17 |
+
<global>
|
| 18 |
+
<models>
|
| 19 |
+
<livedesk>
|
| 20 |
+
<class>Zoho_Livedesk_Model</class>
|
| 21 |
+
</livedesk>
|
| 22 |
+
</models>
|
| 23 |
+
<blocks>
|
| 24 |
+
<livedesk>
|
| 25 |
+
<class>Zoho_Livedesk_Block</class>
|
| 26 |
+
</livedesk>
|
| 27 |
+
</blocks>
|
| 28 |
+
<helpers>
|
| 29 |
+
<livedesk>
|
| 30 |
+
<class>Zoho_Livedesk_Helper</class>
|
| 31 |
+
</livedesk>
|
| 32 |
+
</helpers>
|
| 33 |
+
</global>
|
| 34 |
+
<frontend>
|
| 35 |
+
<routers>
|
| 36 |
+
<livedesk>
|
| 37 |
+
<use>standard</use>
|
| 38 |
+
<args>
|
| 39 |
+
<module>Zoho_Livedesk</module>
|
| 40 |
+
<frontName>livedesk</frontName>
|
| 41 |
+
</args>
|
| 42 |
+
</livedesk>
|
| 43 |
+
</routers>
|
| 44 |
+
<layout>
|
| 45 |
+
<updates>
|
| 46 |
+
<livedesk>
|
| 47 |
+
<file>livedesk.xml</file>
|
| 48 |
+
</livedesk>
|
| 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 |
+
<livedesk>
|
| 62 |
+
<title>Zoho Livedesk Section</title>
|
| 63 |
+
</livedesk>
|
| 64 |
+
</children>
|
| 65 |
+
</config>
|
| 66 |
+
</children>
|
| 67 |
+
</system>
|
| 68 |
+
</children>
|
| 69 |
+
</admin>
|
| 70 |
+
</resources>
|
| 71 |
+
</acl>
|
| 72 |
+
</adminhtml>
|
| 73 |
+
<default>
|
| 74 |
+
<livedesk>
|
| 75 |
+
<option>
|
| 76 |
+
<active>1</active>
|
| 77 |
+
<enable_log>1</enable_log>
|
| 78 |
+
</option>
|
| 79 |
+
</livedesk>
|
| 80 |
+
</default>
|
| 81 |
+
</config>
|
app/code/community/Zoho/Livedesk/etc/system.xml
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* @category Zoho
|
| 5 |
+
* @package Zoho_Livedesk
|
| 6 |
+
* @author LiveDesk Team
|
| 7 |
+
* @website http://www.zoho.com/livedesk
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
-->
|
| 11 |
+
<config>
|
| 12 |
+
<tabs>
|
| 13 |
+
<zohoall translate="label" module="livedesk">
|
| 14 |
+
<label>Zoho Extensions</label>
|
| 15 |
+
<sort_order>400</sort_order>
|
| 16 |
+
</zohoall>
|
| 17 |
+
</tabs>
|
| 18 |
+
<sections>
|
| 19 |
+
<livedesk module="livedesk">
|
| 20 |
+
<label>Zoho LiveDesk</label>
|
| 21 |
+
<tab>zohoall</tab>
|
| 22 |
+
<frontend_type>text</frontend_type>
|
| 23 |
+
<sort_order>1000</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 |
+
<option translate="label">
|
| 29 |
+
<label>General Settings</label>
|
| 30 |
+
<frontend_type>text</frontend_type>
|
| 31 |
+
<sort_order>10</sort_order>
|
| 32 |
+
<show_in_default>1</show_in_default>
|
| 33 |
+
<show_in_website>1</show_in_website>
|
| 34 |
+
<show_in_store>1</show_in_store>
|
| 35 |
+
<fields>
|
| 36 |
+
<info>
|
| 37 |
+
<frontend_model>livedesk/system_config_livedesk_info</frontend_model>
|
| 38 |
+
<sort_order>0</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 |
+
</info>
|
| 43 |
+
<widget_code>
|
| 44 |
+
<label>Chat Widget Code</label>
|
| 45 |
+
<frontend_type>textarea</frontend_type>
|
| 46 |
+
<sort_order>10</sort_order>
|
| 47 |
+
<show_in_default>1</show_in_default>
|
| 48 |
+
<show_in_website>1</show_in_website>
|
| 49 |
+
<show_in_store>1</show_in_store>
|
| 50 |
+
<comment><![CDATA[<a href="https://livedesk.zoho.com/register.sas?source=Magento.config" target="_blank"><strong>Click here to sign up</strong></a> for Zoho LiveDesk and get the widget code]]></comment>
|
| 51 |
+
</widget_code>
|
| 52 |
+
<chat_window translate="label">
|
| 53 |
+
<label>Chat Window</label>
|
| 54 |
+
<frontend_type>select</frontend_type>
|
| 55 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
| 56 |
+
<sort_order>20</sort_order>
|
| 57 |
+
<show_in_default>1</show_in_default>
|
| 58 |
+
<show_in_website>1</show_in_website>
|
| 59 |
+
<show_in_store>1</show_in_store>
|
| 60 |
+
</chat_window>
|
| 61 |
+
<include_in>
|
| 62 |
+
<label>Include in</label>
|
| 63 |
+
<frontend_type>multiselect</frontend_type>
|
| 64 |
+
<source_model>livedesk/livedesk</source_model>
|
| 65 |
+
<sort_order>30</sort_order>
|
| 66 |
+
<show_in_default>1</show_in_default>
|
| 67 |
+
<show_in_website>1</show_in_website>
|
| 68 |
+
<show_in_store>1</show_in_store>
|
| 69 |
+
<comment><![CDATA[If <strong>All Pages</strong> is selected, the chat window is displayed throughout the site.]]></comment>
|
| 70 |
+
</include_in>
|
| 71 |
+
<quick_chat_button>
|
| 72 |
+
<label>Quick Chat Button</label>
|
| 73 |
+
<frontend_type>select</frontend_type>
|
| 74 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
| 75 |
+
<sort_order>40</sort_order>
|
| 76 |
+
<show_in_default>1</show_in_default>
|
| 77 |
+
<show_in_website>1</show_in_website>
|
| 78 |
+
<show_in_store>1</show_in_store>
|
| 79 |
+
<comment><![CDATA[If enabled, a <strong>Quick Chat Button</strong> is added above "Add to Cart" button in product pages. On click, the chat is initiated.]]></comment>
|
| 80 |
+
</quick_chat_button>
|
| 81 |
+
</fields>
|
| 82 |
+
</option>
|
| 83 |
+
</groups>
|
| 84 |
+
</livedesk>
|
| 85 |
+
</sections>
|
| 86 |
+
</config>
|
app/design/frontend/base/default/layout/livedesk.xml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* @category Zoho
|
| 5 |
+
* @package Zoho_Livedesk
|
| 6 |
+
* @author LiveDesk Team
|
| 7 |
+
* @website http://www.zoho.com/livedesk
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
-->
|
| 11 |
+
<layout>
|
| 12 |
+
<default>
|
| 13 |
+
<reference name="before_body_end">
|
| 14 |
+
<block type="livedesk/livedesk" name="mp_livedesk" />
|
| 15 |
+
</reference>
|
| 16 |
+
</default>
|
| 17 |
+
|
| 18 |
+
<!--
|
| 19 |
+
Product view
|
| 20 |
+
-->
|
| 21 |
+
<catalog_product_view translate="label">
|
| 22 |
+
<reference name="product.info.extrahint">
|
| 23 |
+
<block type="livedesk/button" name="mp_livedesk_button" template="livedesk/button.phtml"/>
|
| 24 |
+
</reference>
|
| 25 |
+
</catalog_product_view>
|
| 26 |
+
</layout>
|
app/design/frontend/base/default/template/livedesk/button.phtml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* @category Zoho
|
| 4 |
+
* @package Zoho_Livedesk
|
| 5 |
+
* @author LiveDesk Team
|
| 6 |
+
* @website http://www.zoho.com/livedesk
|
| 7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
?>
|
| 10 |
+
<?php if ($this->isQuickChatEnabled()): ?>
|
| 11 |
+
<button class="button"
|
| 12 |
+
title="<?php echo $this->getLabel(); ?>"
|
| 13 |
+
onclick="if ($zoho) {
|
| 14 |
+
$zoho.livedesk.floatwindow.visible('show');
|
| 15 |
+
$zoho.livedesk.visitor.question(<?php echo $this->getQuestion(); ?>);
|
| 16 |
+
$zoho.livedesk.chat.start();
|
| 17 |
+
}
|
| 18 |
+
return false;">
|
| 19 |
+
<span><span><?php echo $this->getLabel(); ?></span></span>
|
| 20 |
+
</button>
|
| 21 |
+
<?php endif ?>
|
app/etc/modules/Zoho_Livedesk.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* @category Zoho
|
| 5 |
+
* @package Zoho_Livedesk
|
| 6 |
+
* @author LiveDesk Team
|
| 7 |
+
* @website http://www.zoho.com/livedesk
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
-->
|
| 11 |
+
<config>
|
| 12 |
+
<modules>
|
| 13 |
+
<Zoho_Livedesk>
|
| 14 |
+
<active>true</active>
|
| 15 |
+
<codePool>community</codePool>
|
| 16 |
+
</Zoho_Livedesk>
|
| 17 |
+
</modules>
|
| 18 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>Zoho_LiveDesk</name>
|
| 4 |
+
<version>1.0.0</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>With Zoho LiveDesk you can instantly connect to your customers and deliver instant support</summary>
|
| 10 |
+
<description>It’s time where communication with our customers have gone one step ahead in real time, Give your customers access to real-life agents who they connect instantly. Real names, real photos, real people, real easy. With Zoho LiveDesk you can instantly connect to your customers and deliver instant support.
|
| 11 |
+

|
| 12 |
+
Why LiveDesk?
|
| 13 |
+

|
| 14 |
+
In LiveDesk, you can customize the chat window color, text, logo, icons, input fields (Name, Email, contact number) and many more.
|
| 15 |
+

|
| 16 |
+
In the era of real-time communication and instant-everything, customers expect a prompt answer to their questions. With its neat web interface, Zoho LiveDesk allows agents to pick customer chat requests and help them to solve their problems instantly through Live Chat.
|
| 17 |
+

|
| 18 |
+
You can easily create, configure and customize your LiveDesk within minutes, Embed the customizable chat widgets into your website and provide a personalized Support experience to your customers.
|
| 19 |
+

|
| 20 |
+
Our Features
|
| 21 |
+

|
| 22 |
+
* Chat Embed Customization
|
| 23 |
+
* Support Customers from your Mobile Devices
|
| 24 |
+
* Gaze into the future and see what your customers type as they type it and magically make custom solutions appear before they ever hit submit
|
| 25 |
+
* Zoho LiveDesk Integration with Zoho CRM and Zoho Support
|
| 26 |
+
* Powerful Reporting
|
| 27 |
+
* Advanced organizational features, which includes departments.
|
| 28 |
+
* Chat transfer and Monitor
|
| 29 |
+
* Categorized Canned Messages
|
| 30 |
+
* IP Blocking
|
| 31 |
+
* Agent roles
|
| 32 |
+
* Business hour
|
| 33 |
+
Need to Know More? Visit our website: https://www.zoho.com/livedesk/help/getting-started-with-live-chat.html
|
| 34 |
+

|
| 35 |
+
Install Zoho LiveDesk plugin now and sign up for a free account at https://livedesk.zoho.com/register.sas?source=Magento.description</description>
|
| 36 |
+
<notes>Initial release</notes>
|
| 37 |
+
<authors><author><name>Zoho LiveDesk</name><user>livedesk</user><email>support@zoholivedesk.com</email></author></authors>
|
| 38 |
+
<date>2014-03-21</date>
|
| 39 |
+
<time>10:36:20</time>
|
| 40 |
+
<contents><target name="magecommunity"><dir name="Zoho"><dir name="Livedesk"><dir name="Block"><file name="Button.php" hash="c81d3a6fbb1b84d8629f349903c8341d"/><file name="Livedesk.php" hash="12c9c59fed0769833e89636b3f12f4ea"/><dir name="System"><dir name="Config"><dir name="Livedesk"><file name="Info.php" hash="c70d4f022a6eb30b2e5d696823debaee"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="869b3bf9a8903f990c30022b7a19434b"/></dir><dir name="Model"><file name="Livedesk.php" hash="5fe7244567df058b57bafd9eff55dc78"/></dir><dir name="controllers"><file name="IndexController.php" hash="70dba4e3b3de23e18e25f41cc65119a7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="333d7e1455b8616860f5341d514dd82b"/><file name="config.xml" hash="5c38a986e9a0ef9aa34ededed86980bc"/><file name="system.xml" hash="ee50b0805ea1701a8f4b2490044ed374"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="livedesk.xml" hash="3478e46d42bac7f110b7036699da1389"/></dir><dir name="template"><dir name="livedesk"><file name="button.phtml" hash="dc3be76cea670bf7607034a79b8432e7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zoho_Livedesk.xml" hash="78096aa3ca15e0f4aa9931ef5532cc72"/></dir></target></contents>
|
| 41 |
+
<compatible/>
|
| 42 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 43 |
+
</package>
|
