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

How to use <script> inside product description?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-23-2009, 12:13 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Question How to use <script> inside product description?

Hello there, on some products i want to add (on the description) small images, that when you click them they will open a page that contains a video of the product. I'll do that will lightwindow (it's like the lightbox)..

To do that i have to add those:
Code:
<script type="text/javascript" src="lightwindow/javascript/prototype.js"></script> <script type="text/javascript" src="lightwindow/javascript/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="lightwindow/javascript/lightwindow.js"></script> <link rel="stylesheet" href="lightwindow/css/lightwindow.css" type="text/css" media="screen" />

First of all, if i add this on the product description, after i press the button save, i see that the product detailed description isn't saved. I tried to use {literal} but not luck.

I know that i can add those lines on product.tpl but i think that is not a good idea coz i don't need them to all products.. E.g from the 100 products i have, i need it only on 5-10, so it's not a good idea to load them on all products coz maybe this can make the site to take longer to load - lag (am i correct?)
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #2  
Old 08-23-2009, 03:22 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: How to use <script> inside product description?

Unless your site is running on very limited bandwith, its targetted to dialup customers, or receives 60,000+ visits a day having those always included shouldnt be a problem.
I also dont think its possible to have that in the description... Fairly sure xcart strips it.
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 08-23-2009, 03:48 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: How to use <script> inside product description?

well, none of those happens (not limited bandwidth, not 60.000 visitors). Maybe some of customers have dial up, but not over 20% i think..

I just was thinking if there is any better way instead of adding on all products, coz as i said i am going to use it on about 5-10% of the products..
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
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 02:00 PM.

   

 
X-Cart forums © 2001-2020