Version Notes
REVE Chat v1.0.2
Download this release
Release Info
| Developer | REVE Chat |
| Extension | ReveChat |
| Version | 1.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.0.2
app/code/local/Reve/Revechat/sql/revechat_setup/mysql4-install-1.0.2.php
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$installer = $this;
|
| 3 |
+
$installer->startSetup();
|
| 4 |
+
|
| 5 |
+
$installer->run("
|
| 6 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('revechat')} (
|
| 7 |
+
`revechat_id` int(11) NOT NULL auto_increment,
|
| 8 |
+
`revechat_aid` varchar(100) NULL,
|
| 9 |
+
`revechat_tracking_id` varchar(100) NULL,
|
| 10 |
+
PRIMARY KEY (`revechat_id`)
|
| 11 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| 12 |
+
|
| 13 |
+
INSERT INTO {$this->getTable('revechat')}
|
| 14 |
+
(`revechat_id`, `revechat_aid`, `revechat_tracking_id`) VALUES
|
| 15 |
+
(1, '','');
|
| 16 |
+
");
|
| 17 |
+
|
| 18 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/revechat/footer.phtml
CHANGED
|
@@ -9,8 +9,16 @@ if (!isset($revechat_options)){
|
|
| 9 |
<?php if($revechat_options['revechat_aid'] != null){
|
| 10 |
|
| 11 |
?>
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
</script>
|
|
|
|
| 15 |
|
| 16 |
<?php } ?>
|
| 9 |
<?php if($revechat_options['revechat_aid'] != null){
|
| 10 |
|
| 11 |
?>
|
| 12 |
+
<!-- Start of REVE Chat Script-->
|
| 13 |
+
<script type='text/javascript'>
|
| 14 |
+
window.__revechat_account = window.__revechat_account || {};
|
| 15 |
+
window.__revechat_account = '<?php echo $revechat_options['revechat_aid']; ?>';
|
| 16 |
+
(function() {
|
| 17 |
+
var rc = document.createElement('script'); rc.type = 'text/javascript'; rc.async = true;
|
| 18 |
+
rc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.revechat.com/widget/scripts/new-livechat.js';
|
| 19 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(rc, s);
|
| 20 |
+
})();
|
| 21 |
</script>
|
| 22 |
+
<!-- End of REVE Chat Script -->
|
| 23 |
|
| 24 |
<?php } ?>
|
js/revechat/revechat.js
CHANGED
|
@@ -1 +1,185 @@
|
|
| 1 |
-
jQuery.noConflict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
jQuery.noConflict();
|
| 2 |
+
(function($){
|
| 3 |
+
var reveChatBaseURL = 'https://dashboard.revechat.com/';
|
| 4 |
+
var ReveChat ={
|
| 5 |
+
init: function () {
|
| 6 |
+
this.toggleForms();
|
| 7 |
+
this.bindFormSubmit();
|
| 8 |
+
},
|
| 9 |
+
|
| 10 |
+
toggleForms: function ()
|
| 11 |
+
{
|
| 12 |
+
var toggleForms = function ()
|
| 13 |
+
{
|
| 14 |
+
if ($('#new_revechat_account').is(':checked'))
|
| 15 |
+
{
|
| 16 |
+
$('#revechat_already_have').hide();
|
| 17 |
+
$('#revechat_new_account').show();
|
| 18 |
+
$('#edit-name').focus();
|
| 19 |
+
}
|
| 20 |
+
else if ($('#has_revechat_account').is(':checked'))
|
| 21 |
+
{
|
| 22 |
+
$('#revechat_new_account').hide();
|
| 23 |
+
$('#revechat_already_have').show();
|
| 24 |
+
$('#edit-revechat-account-email').focus();
|
| 25 |
+
}
|
| 26 |
+
};
|
| 27 |
+
toggleForms();
|
| 28 |
+
$('#revechat_choose_form input').click(toggleForms);
|
| 29 |
+
},
|
| 30 |
+
|
| 31 |
+
bindFormSubmit: function () {
|
| 32 |
+
$('#revechat-admin-settings-form').submit(function(e)
|
| 33 |
+
{
|
| 34 |
+
//e.preventDefault();
|
| 35 |
+
if (((parseInt($('input[name=revechat_aid]').val()) !== 0)&&(parseInt($('input[name=revechat_trackingid]').val()) !== 0)) || $('#has_revechat_account').is(':checked'))
|
| 36 |
+
{
|
| 37 |
+
return ReveChat.alreadyHaveAccountForm();
|
| 38 |
+
}
|
| 39 |
+
else
|
| 40 |
+
{
|
| 41 |
+
return ReveChat.newLicenseForm();
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
});
|
| 45 |
+
},
|
| 46 |
+
|
| 47 |
+
alreadyHaveAccountForm: function()
|
| 48 |
+
{
|
| 49 |
+
if(this.validEmail())
|
| 50 |
+
{
|
| 51 |
+
if((parseInt($('input[name=revechat_aid]').val()) == 0)||(parseInt($('input[name=revechat_trackingid]').val()) == 0))
|
| 52 |
+
{
|
| 53 |
+
var login = $.trim($('#edit-revechat-account-email').val());
|
| 54 |
+
if(!login.length)
|
| 55 |
+
{
|
| 56 |
+
$('#edit-revechat-account-email').focus();
|
| 57 |
+
return false;
|
| 58 |
+
}
|
| 59 |
+
$('#revechat_already_have .ajax_message').removeClass('message').addClass('wait').html('Please wait…');
|
| 60 |
+
var signInUrl = reveChatBaseURL +'/license/adminId/'+$('#edit-revechat-account-email').val()+'/?callback=?';
|
| 61 |
+
|
| 62 |
+
$.getJSON(signInUrl,
|
| 63 |
+
function(response)
|
| 64 |
+
{
|
| 65 |
+
|
| 66 |
+
if (response.error)
|
| 67 |
+
{
|
| 68 |
+
$('#revechat_already_have .ajax_message').removeClass('wait').addClass('message alert').html('Incorrect REVE Chat login.');
|
| 69 |
+
$('#edit-revechat-account-email').focus();
|
| 70 |
+
return false;
|
| 71 |
+
}
|
| 72 |
+
else
|
| 73 |
+
{
|
| 74 |
+
$('input[name=revechat_aid]').val(response.data.account_id);
|
| 75 |
+
$('input[name=revechat_trackingid]').val(response.data.tracking_id);
|
| 76 |
+
|
| 77 |
+
$('#revechat-admin-settings-form').submit();
|
| 78 |
+
}
|
| 79 |
+
});
|
| 80 |
+
return false;
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
else
|
| 84 |
+
{
|
| 85 |
+
$('#revechat_already_have .ajax_message').removeClass('wait').addClass('message alert').html('Invalid Email.');
|
| 86 |
+
$('#edit-revechat-account-email').focus();
|
| 87 |
+
return false;
|
| 88 |
+
}
|
| 89 |
+
return true;
|
| 90 |
+
},
|
| 91 |
+
|
| 92 |
+
newLicenseForm: function()
|
| 93 |
+
{
|
| 94 |
+
if (parseInt(($('input[name=revechat_aid]').val()) > 0) && parseInt(($('input[name=revechat_trackingid]').val()) > 0))
|
| 95 |
+
{
|
| 96 |
+
return true;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
if(this.validateNewLicenseForm())
|
| 100 |
+
{
|
| 101 |
+
$('#revechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Please wait...');
|
| 102 |
+
|
| 103 |
+
ReveChat.createLicense();
|
| 104 |
+
}
|
| 105 |
+
return false;
|
| 106 |
+
},
|
| 107 |
+
createLicense: function()
|
| 108 |
+
{
|
| 109 |
+
|
| 110 |
+
$('#revechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Creating new account…');
|
| 111 |
+
|
| 112 |
+
var signUpUrl = reveChatBaseURL + '/revechat/rest/api/signup.do';
|
| 113 |
+
|
| 114 |
+
$.ajax({
|
| 115 |
+
data: { 'firstname':$('#edit-name').val(), 'lastname':' ', 'mailAddr':$('#edit-email').val(), 'phoneNo':$('#edit-phone').val() },
|
| 116 |
+
type:'POST',
|
| 117 |
+
url:signUpUrl,
|
| 118 |
+
dataType: 'json',
|
| 119 |
+
cache:false,
|
| 120 |
+
success: function(response) {
|
| 121 |
+
if(response.error)
|
| 122 |
+
{
|
| 123 |
+
$('#revechat_new_account .ajax_message').html(response.error).addClass('message alert').removeClass('wait');
|
| 124 |
+
return false;
|
| 125 |
+
}
|
| 126 |
+
else if(response.success)
|
| 127 |
+
{
|
| 128 |
+
$('#revechat-admin-settings-form').children('div').remove();
|
| 129 |
+
var message = '<div class="revechat_success_message">';
|
| 130 |
+
message += '<h3>Thank you for sigining up with REVE Chat</h3>';
|
| 131 |
+
message += '<p>A verification link has been sent to your registered email address from <strong>noreply-support@revechat.com</strong>. Kindly verify your email to complete the signup process</p>';
|
| 132 |
+
message += '<p>Then come backe again to integrate REVE Chat in your website.</p>';
|
| 133 |
+
message += '</div>';
|
| 134 |
+
$(message).appendTo('#revechat-admin-settings-form');
|
| 135 |
+
return false;
|
| 136 |
+
}
|
| 137 |
+
}
|
| 138 |
+
});
|
| 139 |
+
},
|
| 140 |
+
validEmail: function()
|
| 141 |
+
{
|
| 142 |
+
|
| 143 |
+
if($('#edit-submit').val() != 'Remove')
|
| 144 |
+
{
|
| 145 |
+
if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-revechat-account-email').val()) == false)
|
| 146 |
+
{
|
| 147 |
+
//alert ('Please enter a valid email address.');
|
| 148 |
+
$('#edit-email').focus();
|
| 149 |
+
return false;
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
return true;
|
| 153 |
+
},
|
| 154 |
+
|
| 155 |
+
validateNewLicenseForm: function()
|
| 156 |
+
{
|
| 157 |
+
if ($('#edit-name').val().length < 1)
|
| 158 |
+
{
|
| 159 |
+
alert ('Please enter your full name.');
|
| 160 |
+
$('#edit-name').addClass('error').focus();
|
| 161 |
+
return false;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-email').val()) == false)
|
| 165 |
+
{
|
| 166 |
+
alert ('Please enter a valid email address.');
|
| 167 |
+
$('#edit-email').addClass('error').focus();
|
| 168 |
+
return false;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
if ($('#edit-phone').val().length < 1)
|
| 172 |
+
{
|
| 173 |
+
alert ('Please enter your phone number.');
|
| 174 |
+
$('#edit-phone').addClass('error').focus();
|
| 175 |
+
return false;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
return true;
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
$(document).ready(function()
|
| 182 |
+
{
|
| 183 |
+
ReveChat.init();
|
| 184 |
+
});
|
| 185 |
+
})(jQuery);
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>ReveChat</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>REVE Chat is powerful and intuitive real-time customer engagement tools.</summary>
|
| 10 |
<description>REVE Chat is a powerful and intuitive live support chat software. It allows your agents to personally guide and help visitors, while they go through the various sections of your website.</description>
|
| 11 |
-
<notes>REVE Chat v1.0.
|
| 12 |
<authors><author><name>REVE Chat</name><user>REVEChat_Main</user><email>product@revechat.com</email></author></authors>
|
| 13 |
-
<date>2016-08-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocal"><dir name="Reve"><dir name="Revechat"><dir name="Block"><file name="Accountconfig.php" hash="f4593004891818104ca54ad1aa3504df"/><file name="index.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="Helper"><file name="Data.php" hash="339184bdca83b945f07869e7d800008a"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Revechat"><file name="collection.php" hash="25aa6160ab86da1400d81c94b9d18564"/></dir><file name="Revechat.php" hash="47d960c1331a7dcf2c70389c1eac2e76"/></dir><file name="Revechat.php" hash="f1b0ebbdc86ebb6b3d329c612a6f32f3"/></dir><dir name="controllers"><file name="AdminController.php" hash="19581401d082e45b0ad01d2adb87c355"/><file name="IndexController.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="etc"><file name="config.xml" hash="56b8bdbcd3acdfd78c7338310d99de6f"/></dir><dir name="sql"><dir name="revechat_setup"><file name="mysql4-install-0.1.0.php" hash="d14c5ac02972c963340be40bb19be6eb"/><file name="mysql4-install-1.0.1.php" hash="d14c5ac02972c963340be40bb19be6eb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="revechat.xml" hash="1b4656e3ba8ad4669ed7351a6a451500"/></dir><dir name="template"><dir name="revechat"><file name="footer.phtml" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.4.0</min><max>7.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>ReveChat</name>
|
| 4 |
+
<version>1.0.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>REVE Chat is powerful and intuitive real-time customer engagement tools.</summary>
|
| 10 |
<description>REVE Chat is a powerful and intuitive live support chat software. It allows your agents to personally guide and help visitors, while they go through the various sections of your website.</description>
|
| 11 |
+
<notes>REVE Chat v1.0.2</notes>
|
| 12 |
<authors><author><name>REVE Chat</name><user>REVEChat_Main</user><email>product@revechat.com</email></author></authors>
|
| 13 |
+
<date>2016-08-28</date>
|
| 14 |
+
<time>07:00:11</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Reve"><dir name="Revechat"><dir name="Block"><file name="Accountconfig.php" hash="f4593004891818104ca54ad1aa3504df"/><file name="index.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="Helper"><file name="Data.php" hash="339184bdca83b945f07869e7d800008a"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Revechat"><file name="collection.php" hash="25aa6160ab86da1400d81c94b9d18564"/></dir><file name="Revechat.php" hash="47d960c1331a7dcf2c70389c1eac2e76"/></dir><file name="Revechat.php" hash="f1b0ebbdc86ebb6b3d329c612a6f32f3"/></dir><dir name="controllers"><file name="AdminController.php" hash="19581401d082e45b0ad01d2adb87c355"/><file name="IndexController.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="etc"><file name="config.xml" hash="56b8bdbcd3acdfd78c7338310d99de6f"/></dir><dir name="sql"><dir name="revechat_setup"><file name="mysql4-install-0.1.0.php" hash="d14c5ac02972c963340be40bb19be6eb"/><file name="mysql4-install-1.0.1.php" hash="d14c5ac02972c963340be40bb19be6eb"/><file name="mysql4-install-1.0.2.php" hash="d14c5ac02972c963340be40bb19be6eb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="revechat.xml" hash="1b4656e3ba8ad4669ed7351a6a451500"/></dir><dir name="template"><dir name="revechat"><file name="footer.phtml" hash="df6d59b3688c73e422f5d5f56b4e0c52"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Reve_Revechat.xml" hash="bc5c70af935a018ec3e1cb86c9eab3fa"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="revechat"><file name="ajax_loader.gif" hash="af962b37779a443a77ab836b3b7a93f5"/><file name="revechat.css" hash="b2f0c621b1b5c58133043d6b3143c217"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="revechat"><file name="jquery-1.4.2.min.js" hash="10092eee563dec2dca82b77d2cf5a1ae"/><file name="revechat.js" hash="29b12d4f8fb354028317acfee20d8915"/></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.4.0</min><max>7.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
