Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding some javascripts

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-10-2007, 06:07 PM
 
LittleLizard LittleLizard is offline
 

Member
  
Join Date: Jun 2007
Location: Atlanta
Posts: 27
 

Question 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.
__________________
www.littlelizard.com
X-Cart version 4.1.8
Reply With Quote
  #2  
Old 09-11-2007, 04:30 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-18-2007, 04:30 AM
 
LittleLizard LittleLizard is offline
 

Member
  
Join Date: Jun 2007
Location: Atlanta
Posts: 27
 

Default 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?
__________________
www.littlelizard.com
X-Cart version 4.1.8
Reply With Quote
  #4  
Old 09-18-2007, 04:33 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding some javascripts

You simply need to put {literal} tags around your JS:

{literal}
Javascript code here
{/literal}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 09-18-2007, 05:33 PM
 
LittleLizard LittleLizard is offline
 

Member
  
Join Date: Jun 2007
Location: Atlanta
Posts: 27
 

Default 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!
__________________
www.littlelizard.com
X-Cart version 4.1.8
Reply With Quote
  #6  
Old 09-18-2007, 05:34 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding some javascripts

Quote:
There's a lot to X-Cart

There sure is
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:18 AM.

   

 
X-Cart forums © 2001-2020