Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2018-06-19 15:49:11

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,123
Website

22 - Pro active invitation when visits specific page

Hi, if you are look at this FAQ maybe you are having some issue with Pro active invite only for a specific page.
You may find some useful topic on the forum:

https://forum.livehelperchat.com/viewtopic.php?id=1886

A reply from waftom :

waftom wrote:

Hi PaulZ, I got this problem too and I found a solution, kind of simple actually, using the "Identifier, for what identifier this message should be shown, leave empty for all" field, you can add any text there and add in the widget <script> the identifier dynamically using PHP. It can be a little confusing but it's not, let's using some code:

[== Undefined ==]
<?php
$url_chat = '';  //variable that will have the identifier text
if(strpos($_SERVER['REQUEST_URI'], '<identifier_text>') !== false)  //compare if the the current page is the right one
    $url_chat = '(identifier)/<identifier_text>/';  //add the identifier to the variable
?>
<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500,domain:'<your site domain>'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//<your site domain>/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(check_operator_messages)/true/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/2/<?php echo $url_chat;  //add the variable content to the script ?>(theme)/1?r='+referrer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

This way you can add any amount of different pro active messages to any different pages, you just have to add more ifs in the php. Hope it helps.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]

Offline

Board footer