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 some javascripts (https://forum.x-cart.com/showthread.php?t=33826)

LittleLizard 09-10-2007 06:07 PM

Adding some javascripts
 
I need to add a simple slideshow to the front page of my client's site, but I'm not sure how to do that. I've got a javascript that needs to be called, and then I just put an ID in the image to start the rotation. With all the templates and includes I'm not sure where to stick the JS.

balinor 09-11-2007 04:30 AM

Re: Adding some javascripts
 
JS probably goes in the <head> tag, which is in customer/home.tpl. Then add the actual slideshow part to customer/main/welcome.tpl

LittleLizard 09-18-2007 04:30 AM

Re: Adding some javascripts
 
I'm getting smarty errors in the head.

Error: Smarty error: [in customer/home.tpl line 42]: syntax error: unrecognized tag: curImg++; if(curImg > imgNum) { curImg = 0; (Smarty_Compiler.class.php, line 436) in /home/protecht/public_html/Smarty-2.6.12/Smarty.class.php on line 1095

I'm not a programmer really, so I'm not sure what to do with this.

Does anyone have a good basic slideshow script they've used successfully on the cart?

balinor 09-18-2007 04:33 AM

Re: Adding some javascripts
 
You simply need to put {literal} tags around your JS:

{literal}
Javascript code here
{/literal}

LittleLizard 09-18-2007 05:33 PM

Re: Adding some javascripts
 
Quote:

Originally Posted by balinor
You simply need to put {literal} tags around your JS:

{literal}
Javascript code here
{/literal}


Thanks! I appreciate your help on this and other posts. There's a lot to X-Cart and I can't know everything!

balinor 09-18-2007 05:34 PM

Re: Adding some javascripts
 
Quote:

There's a lot to X-Cart

There sure is :)


All times are GMT -8. The time now is 02:51 PM.

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