Jump to content

Olark live help code in mobile skin


orgonita

Recommended Posts

Hello :)

I need some help about "how to insert the Olark live help code in mobile skin" to give also mobile visitors the chance to chat as well.

 

I see from Analitycs that many visitors are coming from mobile or tablet.

 

I have enabled mobile skin in admin site preferences but the chat not appears in the mobile visitors devices because missing the code.
 
 
Please, ... can someone indicate me in which documento or archive I must insert it? ... 
Thanks a lot!!

 

 

 

SaRa   :D

 
Link to comment
Share on other sites

The code to be added to the mobile template file main.php is:

 

{if isset($LIVE_HELP)}{$LIVE_HELP}{/if}

 

Add it to a new blank line just above this line near the bottom:

 

{foreach from=$JS_SCRIPTS key=k item=script}

 

I haven't tried it myself.

Link to comment
Share on other sites

The code to be added to the mobile template file main.php is:

 

{if isset($LIVE_HELP)}{$LIVE_HELP}{/if}

 

Add it to a new blank line just above this line near the bottom:

 

{foreach from=$JS_SCRIPTS key=k item=script}

 

I haven't tried it myself.

 

Hello :)

Thanks a lot for your answer :)

Please can you tell me if that is ok or what added part from that code must be corrected? cause it not works, sorry.

Thanks again

 

 

 
 
 
 <div id="documents">{$SITE_DOCS}{$COPYRIGHT}
 
 <div><a href="{$STORE_URL}/index.php?display_mobile=0">{$LANG.common.desktop_site}</a></div>
 
 </div>
 
 
</div>

 

  {include file='js/common.html'}
 {if isset($LIVE_HELP)}{$LIVE_HELP}{/if} 
<!-- begin olark code -->
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function©{var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
a.p=new Date-a.p[0]};function s(){
a.P®;f[z]®}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d;if(!m){
return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){
b.src="javascript:false"}b.allowTransparency="true";v[j]( B);try{
b.contentWindow[g].open()}catch(w){
c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{
var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({
loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
/* custom configuration goes here (www.olark.com/documentation) */
olark.identify('3752-288-88-2849');/*]]>*/</script><noscript><a href="https://www.olark.com/site/3752-288-88-2849/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
<!-- end olark code -->
  {foreach from=$JS_SCRIPTS key=k item=script}
 
  <script type="text/javascript" src="{$STORE_URL}/{$script|replace:'':'/'}"></script>
 
  {/foreach}
 
</body>
 
</html>
 
 
 
 
 
 
 
-----------------------------------------------------------------------------
The next text is the last Olark conversation (in case it helps):
-----------------------------------------------------------------------------
 
Joe:
Joe here – how can I help?
Me:
Hi Joe Im Sara
I asked to Cubecart where must add your code and they tell me to put it in main.php template, but not works
what else do you need to help me Joe?
Joe:
If I remember from your case yesterday, it seems you have different HTML for your desktop site and your mobile site
Me:
Cubecard team tells me to add also that line in main.php:
{if isset($LIVE_HELP)}{$LIVE_HELP}{/if}
I add it, and olark code , but nothing works then.
Joe:
What is the URL?
Me:
but if I insert the olark code in main.php then the mobile site dont works, wait I´ll insert it rigth now.
Please, take a look again Joe
Joe:
Hmm, the contents of your HTML are now empty
So I think there must be an error in your code
So you may want to raise that with Cubecart
This is what I see now: http://cl.ly/image/3G1a3c06301y
Just blank
Me:
yes me too a blank site if I do mobile navigation
Joe:
OK
This really isn't something I would know about I'm afraid. Perhaps you need to include {literal} tags?
I worry that they may just be filtering the Olark script
But if the entire mobile site has its HTML code removed, there is an error somewhere
Me:
well thanks again I´ll talk with them
Joe:
No problem
This conversation has ended. 
Link to comment
Share on other sites

The code to be added to the mobile template file:

/skins/mobile/templates/main.php

 

From:

    </div>
  {include file='js/common.html'}
  {foreach from=$JS_SCRIPTS key=k item=script}
  <script type="text/javascript" src="{$STORE_URL}/{$script|replace:'':'/'}"></script>
  {/foreach}
</body>
</html>

To:

    </div>
  {include file='js/common.html'}
  {if isset($LIVE_HELP)}{$LIVE_HELP}{/if}
  {foreach from=$JS_SCRIPTS key=k item=script}
  <script type="text/javascript" src="{$STORE_URL}/{$script|replace:'':'/'}"></script>
  {/foreach}
</body>
</html>

 

That one new line is all you need.

 

Now, in your store's admin, Maintenance, Rebuild tab, check Clear Cache and click Submit.

 

Finally, in admin, go to Live Help, and make sure the Olark module is enabled and has your Site Id entered.

Link to comment
Share on other sites

YES YES YES YESSSS YEEEESS

It wooooorks !    
    Yuhuuuuuuuuuu :yeahhh:

THANKS THANKS A LOT !!

After months ..........!!!!!

Yujuuuuuuuuu ....Im so excited ...  I´ll can talk now with my mobile visitors ...

 

 

You, CubeCart team, really you´re EXCELENT in giving help and support
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...