X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding HTML code to template (https://forum.x-cart.com/showthread.php?t=4244)

wconcepts 09-04-2003 09:06 PM

Adding HTML code to template
 
Newbie here! I am having trouble adding HTML code to the product thumbnail & detail view. I have a current website using another shopping cart program and I am migrating to x-cart. The code works fine on my home page and other shopping cart.

I don't know if I am using the correct syntax since I am unfamiliar to the smarty templates. I'm not sure if I need to include the <html> beggining and ending tags </html>. I'm not sure if I should paste this code prior to the smarty code or at the end.

Basically, I can't find a topic in the forum (Unless I'm not looking in the right area) regarding where and how to place HTML in templates?

I have attached the code below which I am trying to add. The code basically disables the right click option to save to disk if the user is over an image on the page. It also eliminates the auto save option when the mouse hovers over a image.

Any help would be greatly appreciated.

HTML Code:

<html>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<script language="JavaScript1.2">

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Copyright б╘ 2003 Wireless Concepts"

function disableclick(e)
if (document.all)
if (event.button==2||event.button==3)
if (event.srcElement.tagName=="IMG")
alert(clickmessage);
return false;
}
}
}
else if (document.layers)
if (e.which == 3)
alert(clickmessage);
return false;
}
}
else if (document.getElementById)
if (e.which==3&&e.target.tagName=="IMG")
alert(clickmessage)
return false
}
}
}

function associateimages()
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>
</html>

Anti 09-04-2003 09:35 PM

Well because it is a script you would want to put it in the head tags.
The head tags are found in xcart/skin1/customer/home.tpl.

Any page that the customer will load will include the home.tpl (i think anyway, maybe not all pages) so just insert the script in the head tags on home.tpl and you should be right.

Also, if your having trouble figuring out what parts of the page are stored in what templates, go into your administration and on the side there is "webmaster mode" or something similar. Start that and it will show you what templates contain what on the given page.

A page can be made of up to 20 templates. All the same page.

wconcepts 09-05-2003 12:36 PM

Thanks for the info regarding the head.tpl, however, I still have questions regarding the following:


If I put in the Head.tpl. What is the correct syntax? Is the begining <html> and ending </html> needed? Does it go before or after the current code in the template?

Thanks


All times are GMT -8. The time now is 08:54 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.