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)
-   -   How to use <script> inside product description? (https://forum.x-cart.com/showthread.php?t=49290)

Christofer 08-23-2009 12:13 PM

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?)

Shamun 08-23-2009 03:22 PM

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.

Christofer 08-23-2009 03:48 PM

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..


All times are GMT -8. The time now is 07:43 PM.

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