Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Live Support Fix


Guest

Recommended Posts

Change to admin/live_support.php

<td valign="top" align="center">

<a href="java script:void(0);" onclick="NewWindow('ls_start.php','tech','220','200','no');return false"><b style="font-size:14pt;">Start Live Support</b></a><br><br>

//////<-----------begin modification reset db---------->///////////////

<a href="java script:void(0);" onclick="NewWindow('ls_reset.php','tech','220','200','no');return false"><b style="font-size:14pt;">Reset Live Support</b></a>

<br> Fixes open window error!!

//////<-----------end modification reset db---------->///////////////

</td>

 

Change to admin/ls_comm_main.php

if($conversation['tech_reply'] == '3') {

echo "<p align="center" class="system"> $conversation[message]</p><br>n";

}

}

} else {

//////<-----begin modification Hang up user end session--->///////////////

echo " The User has left the conversation!<br>FIRST HANG UP and then End Support Session!!<form method=post action=ls_comm_exit.php onSubmit='this.mysubmitbutton1.value=Processing;return(true);'>

<input type=hidden name=tech value=1>

<input type=submit value=Hang Up name=mysubmitbutton1 ></form>";

}

?>

//////<-----end modification Hang up user end session--->///////////////

</td>

</tr>

</tbody>

</table>

 

Chnge to admin/ls_start.php

else {

//////<-----begin modification further explanation--->///////////////

echo "<div align="center">Live Support is currently open<br>Currently only 1 window can be open.<br> Most likely the reason for this message is you closed the previous session (window) from the window controls in the upper right hand corner or you tried to initiate a second session!</div>n";

//////<-----end modification further explanation--->///////////////

}

Change to admin/ls_callwaiting.php

<title>Live Support Call Waiting</title>

//////<-----begin modification Call Waiting--->///////////////

<script language="javascript">

function LSWarning() {

alert("If You are hanging up a busy line You will be redirected to Waiting status! Close Session will turn off Live Support!");

 

}

window.onunload=LSWarning;

</script>

</head>

<body topmargin="0">

<form method="post" action="ls_exit.php" onSubmit='this.mysubmitbutton2.value="Processing";return(true);'>

<input type="hidden" name="tech" value="1">

<iframe src="ls_messages.php" width=190 height=50 scrolling="no" name="callwaiting" frameborder="0" align="center">

Currently Live Support works with iframe, and your browser does not support iframe

</iframe>

<p align="center" style="font-size:8pt;">You can minimize this window<br>for your convienence.<br><b>Close Window Close session!</b><br>

<input type="submit" value="Close Live Help" name="mysubmitbutton2" ></form>

<form method="post" action="ls_hangup.php" onSubmit='this.mysubmitbutton1.value="Processing";return(true);'>

<input type="hidden" name="tech" value="1">

<input type="submit" value="Hang Up" name="mysubmitbutton1" ></form>

//////<-----end modification Call Waiting--->///////////////

</b></p>

 

New File admin/ls_reset.php

<?

/*

 

Live Support v 1.2b

Author: Mike Lessar <[email protected]>

 

for use with:

osCommerce v2.2, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Released under the GNU General Public License

 

*/

 

?>

<html>

<head>

<title>Live Support Call Waiting</title>

<script language="javascript">

function LSWarning() {

alert("Very Well. You may now start Live Support!");

 

}

window.onunload=LSWarning;

</script>

</head>

<body topmargin="0">

<form method="post" action="ls_exit.php" onSubmit='this.mysubmitbutton2.value="Processing";return(true);'>

<input type="hidden" name="tech" value="1">

<p align="center" style="font-size:14pt;"><b></b>Reset The Database<br></b><br>

<input type="submit" value="Live Support Reset" name="mysubmitbutton2" ></form>

 

</b></p>

</body>

</html>

New File admin/ls_hangup.php

<?

/*

 

Live Support v 1.2b

Author: Mike Lessar <[email protected]>

 

for use with:

osCommerce v2.2, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Released under the GNU General Public License

 

*/

 

require('includes/application_top.php');

tep_db_query("update " . TABLE_LS_TECHS . " set status = 'yes', helping = '' where tech_id = ' " . $tech . " ' ");

echo "<script>

redirTime = '350';

redirURL = 'ls_callwaiting.php';

function redirTimer() { self.setTimeout('self.location.href = redirURL;',redirTime); }

// End -->

</script>";

?>

<html>

<head>

<title>Live Support</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body bgcolor="#FFFFFF" onLoad="redirTimer()">

</p>

<p><input type="hidden" name="tech" value="1"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are not automatically redirected click <a href="ls_callwaiting.php">here</a>.</font>

</p>

</body>

</html>

 

Hope this helps

:D

Link to comment
Share on other sites

  • Replies 212
  • Created
  • Last Reply

Top Posters In This Topic

Cool, this fixed my problems... ;) Thanks

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

Change to catalog/live_support.php

 

tep_db_query("insert into " . TABLE_LS_STATUS . " (id, session_id, status) values ('', '" . $osCsid . "', '1')");

tep_redirect(tep_href_link('ls_start.php', '', 'NONSSL'));

} else {

/////////---------begin more appropriate greetingg modification-----/////////

echo "<br><br><div align="center"><b>Sorry but support is currently not availabe!<br> Please <a href=http://<YOUR_DOMAIN_HERE>/catalog/contact_us.php target=_blank>Click Here</a> to Contact Us<br>or<br>

<a href=java script:window.close()>Close Window</a> and use the link in the lower left hand corner.<br><br>Thank you!!<br>Live Support available M-F 8:00am - 5:00pm MST</b></div>n";

/////////---------end more appropriate greetingg modification-----/////////

}

} else {

 

?>

 

Now thats better!

Link to comment
Share on other sites

some of the /////////--------- lines are not within the php tags. take a look at the steps you layout above:

 

For example:

<title>Live Support Call Waiting</title>

//////<-----begin modification Call Waiting--->///////////////

 

<td valign="top" align="center">

<a href="java script:void(0);" onclick="NewWindow('ls_start.php','tech','220','200','no');return false"><b style="font-size:14pt;">Start Live Support</b></a><br><br>

//////<-----------begin modification reset db---------->///////////////

<a href="java script:void(0);" onclick="NewWindow('ls_reset.php','tech','220','200','no');return false"><b style="font-size:14pt;">Reset Live Support</b></a>

<br> Fixes open window error!!

//////<-----------end modification reset db---------->///////////////

</td>

 

Again, very minor and very easy to take care of...

Link to comment
Share on other sites

I have applied this to Ian's loaded 5

 

So perhaps the changes do't apply across the board.

 

I apologize!

 

But I don't know the solution.

 

Maybe experienced programmers only!

 

????

Link to comment
Share on other sites

Is there a mod for having a "live help" feature on the OSC?

 

If it replaces "Human Click" Im all for it....please provide details or a link to the mod info.

 

Thanks!

Link to comment
Share on other sites

the Fixes are working great.

 

Though im getting this when I click on Start Live Support in Admin section

 

function LSWarning() { alert("If You are hanging up a busy line You will be redirected to Waiting status! Close Session will turn off Live Support!"); } window.onunload=LSWarning;
Link to comment
Share on other sites

I'm Back :)

 

Sorry been busy moving to a new house.

 

I am glad to see that my contribution has taken off and grown so much.

 

I was wondering if anybody has a copy with all the changes that came from the community and would be willing to send them to me, so that I can look at them and build onto them for future releases.

 

Thanks

Mike

Link to comment
Share on other sites

  • 2 weeks later...

great contrib!!!!!

 

 

russell i don't see what your post about catalog/live_support changes. If i do the modif i only have a blank page, but otherwise thank you for the fixes.

 

And a second problem : warning sound doesn't work, even if i put true in ls_newcall for autostart.

 

please help

 

 

pldtm

PL DTM

-----------------------------------------

Sur un malentendu, ... ?a pourrait marcher

Link to comment
Share on other sites

Installation went smooth..

I seem to be having a little problem though.

I set the admin side to start and get the little popup "waiting for calls"

 

If I then go to the cart, the image says Available. I can click that, login and it takes me to the chat page, but it says all operators are busy helping other customers... and never changes

The admin popup still says waiting for calls..

 

What did i do wrong???

 

Thanks

 

Tracy

Link to comment
Share on other sites

Hmmm... after reading the changes posted earlier in this thread, i noticed some changes that are to be made to the following pages:

admin/ls_hangup.php

admin/ls_reset.php

 

I don't have these files, and they are not in the ZIP either...

 

Any ideas?

 

Tracy

Link to comment
Share on other sites

Damn... wish there was contribution so that you can edit your posts..

 

Ok.. take no notice of any of my posts...

 

Everything is working really well :)

 

Great contrib!!

 

Tracy

Link to comment
Share on other sites

Hmmm... after reading the changes posted earlier in this thread, i noticed some changes that are to be made to the following pages:

admin/ls_hangup.php  

admin/ls_reset.php  

 

I don't have these files, and they are not in the ZIP either...

 

Any ideas?

 

Tracy

 

copy the files from very first post on this thread...

 

New File   admin/ls_reset.php

 

Quote:

 

<?  

/*  

 

Live Support v 1.2b  

Author: Mike Lessar <[email protected]>  

... code ...

 

 

 

New File admin/ls_hangup.php

 

Quote:

 

<?  

/*  

 

Live Support v 1.2b  

Author: Mike Lessar <[email protected]>  

... code ...

[/b]

 

Still somewhat buggy when customer leaves without informing.

Not positive I put in all the fixes... yes, watching this thread :?

ibandyop

Link to comment
Share on other sites

Hi ibandyop

Yup--I realised after I wrote my post that I had to create 2 files.. heh.. ok that done..

I seem to be having a problem with it.

If the admin is available.. a customer can click the image and sign in.. but then it says that all reps are busy... but nothing comes through to the admin to say there is someone waiting.. The admin popup still says waiting for calls...

 

Tracy

Link to comment
Share on other sites

Yup--I realised after I wrote my post that I had to create 2 files.. heh.. ok that done..

Sorry, Noticed it after I posted :(

 

I am reinstalling this from scratch right now and will test again.

I noticed there is another contribution on another thread.

 

http://www.oscommerce.com/contributions/Li...Support_v13.zip

http://www.oscommerce.com/community/contributions,1035

 

I am comparing the files.

v1.2d (actually 1.2c) which also attempts to have multiple $tech_id

which and is missing in v1.3

BUT

v1.3 has added an extra line which may solve part of the problem you described.

 

adminls_session_close.php

tep_db_query("delete from  " . TABLE_LS_STATUS . "  where session_id = '" . $session . "' ");

tep_db_query("update " . TABLE_LS_TECHS . " set status = 'yes', helping = '' where tech_id = 1 ");

 

Also significant is Line 16 /admin/ls_exit.php to determine if status='yes' or status='no' versions 1.2d and v1.3 are totally opposite.

however for comparision

/admin/ls_comm_exit.php Line 16 shows status='no' ... hmmm...

difference between ls_comm_xyz and ls_xyz would be nice to know.

 

One more item. If anyone can clarify the purpose/difference between

of the files, ls_answercall.php and ls_newcall.php

 

I'am looking at line 60 or ls_newcall.php between the two versios

and notice, that one calls ls_answercall.php and the other calls itself.

i.e. ls_newcall.php .

This could be a mistake or a feature or code left from past debugging

experiences. Any ideas ? See the difference below where it says {HERE}

 

LiveSupport_v13/admin/ls_newcall.php

echo "<li><b style="font-size:9pt;"><a href="ls_answercall.php?{HERE}c=r&session=$session" target="conversation">REMOVE</a></b>  <a href="#" onclick="window.open('ls_answercall.php?guest=$guest&session_id=$session','conversation','width=280,height=340')">$guest</a></li>n";

 

LiveSupport_v12d/admin/ls_newcall.php

echo "<li><b style="font-size:9pt;"><a href="ls_newcall.php?{HERE} c=r&session=$session" target="conversation">REMOVE</a></b>  <a href="#" onclick="window.open('ls_answercall.php?guest=$guest&session_id=$session','conversation','width=280,height=340')">$guest</a></li>n";

 

 

More after I reinstall and test. Any suggestions, recommendations,

improvements welcome.

ibandyop

Link to comment
Share on other sites

i installed the enw versiona nd i found teh following

 

the customer "in teh catalog side " says live support is available however on teh admin side does not say any thing

when u try to click on start live support it says "already 1 windows is open you can only open 1 windows " any update?

Thanks

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...