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

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

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

[code]<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>[/code]

No Comments

  1. Reid Walley on October 24, 2011 at 12:54 pm

    Jadzia, Great tips in steps 3 and 4 of your comment. Thanks!

  2. Casper on April 19, 2012 at 2:15 am

    @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

    • Jadzia DeForest on April 19, 2012 at 9:38 am

       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 Comment