| |

Zen Cart – Adding Audio Player to Product Page

Add WP Audio Player, Standalone to Zen Cart, v 1.3.9h
Example site: http://www.100YearsOfMusic.net/
So far this works on FireFox, Chrome, Safari & Opera for Mac (tested Feb 16, 2011). GOTTA CHECK PC browsers!

1. Add audio-player.js file to site. It gets added to the head section of the site by adding it to the jscript folder (upload to: root > includes > templates > theme245 > jscript):

jscript_audio-player.js (MUST add the jscript_ tag to the front of the file name in order for it to show up in the header of the site)

2. Add player.swf file to site. (upload to: root > includes > templates > theme245)

3. Add to tpl_header.php file, line 196, (upload to: root > includes > templates > theme245 > common):

<script type="text/javascript">
 AudioPlayer.setup("http://www.100yearsofmusic.net/includes/templates/theme245/player.swf", {
 width: 290
 });
 </script>

4. Add MP3 directly to Zen Cart product page via Admin:

<p id="audioplayer_1">Audio Player 1</p>
 <script type="text/javascript">
 AudioPlayer.embed("audioplayer_1", {soundFile: "http://www.100yearsofmusic.net/media/pops-song-snippet-the-home-team-band.mp3",
 titles: "Pop's Song",
 artists: "The Home Team Band",
 autostart: "no"
 });
 </script>

Similar Posts

0 Comments

  1. @JadziaDeForest:disqus  Great work,.. But a little patchwork needed,..  Step 3 should be uploaded in de tpl_header.php file and not the html_header.php file.

    And all 3 .js files have to be uploaded and renamed as jscript_JSCRIPTFILENAME.

    Works great,

    Thanks!

    Casper

    1.  Thanks!

       A note: I tried following the instructions to add the code to the tpl_header.php and it didn’t work, that’s when I tried the html_header.php, and that worked.  Maybe it depends on the version of Zen Cart or the template?  

      I just wanted to include that in case others were having issues when trying the tpl_header.php file.

      Cheers,
      Jadzia

Leave a Reply

Your email address will not be published. Required fields are marked *