Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Using JW Player and FLV flash video in product description

Using JW Player and FLV flash video in product description

Locked

Views: 2,316

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
16 Aug 2009, 9:50 PM
#1
keithk avatar

keithk

New Zenner

Join Date:
Mar 2005
Posts:
20
Plugin Contributions:
0

Using JW Player and FLV flash video in product description

I am really pulling my hair out on this one. I am on the 1.3.8a of Zen Cart. I would like to add a preview video to product descriptions. I would liek to use the JW Player to do this.

According to their website the code I need to add is as follows:

<script type='text/javascript' src='swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'>var so = new SWFObject('player.swf','mpl','470','260','9');so.addParam('allowfullscreen','true');so.addParam('allowscriptaccess','always');so.addParam('wmode','opaque');so.addVariable('file',' http://mywebsite/myvideo.flv');so.addVariable('image','http://mywebsite/mypic.jpg');so.addVariable('frontcolor','ffffff');so.addVariable('lightcolor','cc9900');so.addVariable('skin','http://www.longtailvideo.com/jw/upload/overlay.swf');so.addVariable('controlbar','over');so.write('mediaspace');</script>

If I add this to the product description via Zencart's built in HTML editor, it works. But the next time I go to the product page in the admin the code no longer appears! Its like Zen cart is erasing it everytime you open the Product Editor in the Admin console.

2nd problem: I don't want to hardcode the filename into the code, I want to add a variable. How can I do this? I tried:

<script type='text/javascript' src='swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'>var so = new SWFObject('player.swf','mpl','470','260','9');so.addParam('allowfullscreen','true');so.addParam('allowscriptaccess','always');so.addParam('wmode','opaque');so.addVariable('file',' http://mywebsite/<?php echo$ products_id_current; ?>.flv');so.addVariable('image','http://mywebsite/<?php echo$ products_id_current; ?>.jpg');so.addVariable('frontcolor','ffffff');so.addVariable('lightcolor','cc9900');so.addVariable('skin','http://www.longtailvideo.com/jw/upload/overlay.swf');so.addVariable('controlbar','over');so.write('mediaspace');</script>

This doesn't work. I don't think I can use PHP in the Zen Cart Product HTML editor. What are my options???

17 Aug 2009, 4:02 PM
#2
keithk avatar

keithk

New Zenner

Join Date:
Mar 2005
Posts:
20
Plugin Contributions:
0

Re: Using JW Player and FLV flash video in product description

If anyone has another flash player solution that would make this easier thats ok too! I am not married to JW Player.