As you may be aware Skype is owned by Ebay now, and of cause has links with PayPal and in my opinion is the best FREE internet comunication system available. If for some unknown reason you do not know anything about Skype then you can find the web page at
http://www.skype.com.
Anyway here is a small mod to include this in your shopcart/skin1/customer/home.tpl file.
1st of all right click this image
http://www.shisha.co.uk/shopcart/skin1/images/skype.gif and save this in your shopcart/skin1/images/skype.gif
Next save the below Java code in your shopcart/skin1/skypeCheck.js
Code:
var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 ));
var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1));
function oopsPopup() {
var windowName = "oops";
var URLtoOpen = "http://download.skype.com/share/skypebuttons/oops/oops.html";
var popW = 540, popH = 305;
var scrollB = 'no';
w = screen.availWidth;
h = screen.availHeight;
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
oopswindow = window.open(URLtoOpen, windowName,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos);
return false;
}
if(typeof(detected) == "undefined" && activex) {
document.write(
['<script language="VBscript">',
'Function isSkypeInstalled()',
'on error resume next',
'Set oSkype = CreateObject("Skype.Detection")',
'isSkypeInstalled = IsObject(oSkype)',
'Set oSkype = nothing',
'End Function',
'</script>'].join("\n")
);
}
function skypeCheck() {
if(CantDetect) {
return true;
} else if(!activex) {
var skypeMime = navigator.mimeTypes["application/x-skype"];
detected = true;
if(typeof(skypeMime) == "object") {
return true;
} else {
return oopsPopup();
}
} else {
if(isSkypeInstalled()) {
detected = true;
return true;
}
}
detected = true;
return oopsPopup();
}
Also save this tpl file in shopcart/skin1/skype.tpl - Please make sure you change the "shishapipe" to your Skype name at
Code:
<a href="skype:shishapipe?call">
Code:
{* $Id: skype.tpl,v 0.1 2006/04/06 FS Exp $ *}
{capture name=skype}
<table width="100%" border="0" cellpadding="0">
<tr>
<td><div align="center">
<script type="text/javascript" src="{$SkinDir}/skypeCheck.js"></script>
<a href="skype:shishapipe?call">
[img]{$ImagesDir}/skype.gif[/img]</a></div></td>
</tr>
</table>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Skype contact us" menu_content=$smarty.capture.skype }
Then in your shopcart/skin1/customer/home.tpl call the file skype.tpl by using this command below.
Code:
{ include file="skype.tpl" }
You can see this at
http://www.shisha.co.uk/shopcart/home.php on the left hand side at the bottom
