Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2014-01-15 15:23:51

Raimund
Member
Registered: 2014-01-15
Posts: 3

follow user over different subdoMayn

Hi,

I have divided my web-presence over different subdomains. So I have shop.mydomain.com for my shop, I have www.mydomain.com for the general homepage and I have cp.mydomain.com for my customers-self-care environment. And the LivehelperChat is installed on it's own subdomain using chat.mydomain.com

I have now added the same chat-Java-script TAG to the html-code of all those pages on the different sub-domains. And the Chat-box appears correct. But unfortunately the chat sessions are not taken over when a users changes from the general product-overview on www.mydomain.com for example to the shop on shop.mydomain.com.

If a users goes to a differemt sub-domain and has a chat open, the information is not transfered. And the user get's a new - empty - chat window. Is there a way to change this, so that the open chat session (and automatic-invites) are transfered correctly when changing subdomains?

thanks


https://groups.google.com/forum/#!topic … EnV9lCEJ6k

Offline

#2 2014-01-15 16:39:03

Remigijus Kiminas
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: follow user over different subdoMayn

Hi,
I think that this scenario is not supported at the moment. As for enchancing i suggest try the following scenarion.
Override this file and modify 404 line
https://github.com/remdex/livehelperchat/blob/master/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php#L404


And append your domain as additional argument.https://github.com/ScottHamper/Cookies#example-usage


For tracking same visitor we are using cookie and for session attribute we are using sessionStorage if available.
So you can try to play around. Let me know if it success if what I could try to include your changes in LHC itself.


2014/1/15 Raimund <raimu...***.com>

Offline

#3 2014-01-15 18:08:30

Raimund
Member
Registered: 2014-01-15
Posts: 3

Re: follow user over different subdoMayn

Hi,

thanks for pointing me to the right file, so I was able to manage this.

I changed line 405 to:
        lhc_Cookies('lhc_per',this.JSON.stringify(this.cookieDataPers),{expires:16070400, domain: '.mydomain.com'});

Important, keep the "." in front of the Domain. As per RFC only cookies with two dots are allowed.

Addidionaly
I had to disable the use of the sessionStorage. As sessionStorage does
not allow sharing information via different sub-domains. In order so
achive this quickly for my special case, I just removed the
sessionStorage code from the storeSesCookie & initSessionStorage
functions. So they are now looking as follows:

   storeSesCookie : function(){
            lhc_Cookies('lhc_ses',this.JSON.stringify(this.cookieData),{domain: '.mydomain.com'});
    },

    initSessionStorage : function(){
            var cookieData = lhc_Cookies('lhc_ses');
            if ( typeof cookieData === "string" && cookieData ) {
                this.cookieData = this.JSON.parse(cookieData);
            }
    },

Also in the storeSesCookie function I had to add the domain parameter for the cookie.

Thanks for the quick help once again. Great pice of Software that you have!

thanks

Am Mittwoch, 15. Januar 2014 16:39:03 UTC+1 schrieb Remigijus Kiminas:

Offline

#4 2014-01-15 18:31:08

Remigijus Kiminas
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: follow user over different subdoMayn

Hi,

Glad to hear that it worked, will need to think how to add to official version this thing smile

2014/1/15 Raimund <raimu...***.com>

Offline

#5 2014-01-17 20:31:03

Remigijus Kiminas
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: follow user over different subdoMayn

Hi,

This feature is now included in standard version.
http://livehelperchat.com/new-version-1.78v-253a.html


Here is github commit if you are interested. It was enough actually just to modify one method.
https://github.com/remdex/livehelperchat/commit/b2de2fa8c563bfe4efdeb861f88e31ec01a445ca



2014/1/15 Remigijus Kiminas <rem...***.com>

Offline

Board footer