Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Add an mp3 music player to musical download products?

Add an mp3 music player to musical download products?

Started by union_recordings on 15 Sep 2011, 2:24 AM · Views: 1,692

Results 1 to 5 of 5
15 Sep 2011, 2:24 AM
#1
union_recordings avatar

union_recordings

New Zenner

Join Date:
Sep 2011
Location:
Glendale CA
Posts:
3
Plugin Contributions:
0

Post #1 by union_recordings

Hello, I sell music downloads and I am currently trying to add an mp3 player to my products page so users can preview songs before purchasing. Currently, there is a link that the user can click on (I added this with the media manager). This, however, opens up a separate page in the user's browser and plays through their player. I would like to stream line the process by having the clip loaded right there in it's own player. I assume I have to find a player and upload it to my server as well as adjust some php code. Can anyone walk me through this step by step? I've seen some older posts on the internet and they are vague at best. I'm hoping for something clear and concise.

I'm currently running version 1.3.9

I've also made my own custom template which I use instead of the classic default one.

I've seen some posts about the Wimpy Player (which I have downloaded). It looks like a good choice, but I need to be walked through how to set it up and what code I should adjust. Much thanks to anyone who comes through for me!

15 Sep 2011, 3:42 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

There is no real need to "load" any player "software". You can use <embed> functionality in the html.

The principle is similar in most respects, to how one embeds a YouTube video into your site.

It's several years since we embedded a media player into the product info data, so I can't recall which one we used... (I think it was just MS Media Player.

Something like:

<object width="420" height="380" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <param name="fileName" value="http://www.YOUR_WEBSITE.co.uk/sample.mp3"><param name="animationatStart" value="true"><param name="transparentatStart" value="true"><param name="autostart" value="false"><param name="showcontrols" value="true"><param name="ShowAudioControls" value="true"><param name="showstatusbar" value="true"><param name="loop" value="false"><embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" displaysize="4" autosize="-1" showcontrols="true" showtracker="-1" showdisplay="0" showstatusbar="true" videoborder3d="-1" width="420" height="380" src="http://www.YOUR_WEBSITE.co.uk/sample.mp3" autostart="false" loop="false"></embed></object></center>

Proprietary players, or course, will prompt the viewer to collect the "plugin"...

20 years a Zencart User

15 Sep 2011, 4:41 AM
#3
union_recordings avatar

union_recordings

New Zenner

Join Date:
Sep 2011
Location:
Glendale CA
Posts:
3
Plugin Contributions:
0

Post #3 by union_recordings

ahh embed it right to the product page. This sounds like something I would like to do. The question then is, where do I find the product page to use the "embed" tag? I'm assuming that when I create a product in admin it makes a php document that I can edit on my server? I would need to know the path for this....zencart/languages/english and so on..

I might be incorrect when assuming this, please correct me.

Thank you for your response by the way :smile::smile:

15 Sep 2011, 5:33 AM
#4
union_recordings avatar

union_recordings

New Zenner

Join Date:
Sep 2011
Location:
Glendale CA
Posts:
3
Plugin Contributions:
0

Post #4 by union_recordings

I ran across a thread about adding the HTML directly to the product's description page in zen cart admin. This useful Java Script code:

<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>

will magically transform the link provided by the Media Manager to a nifty player with controls and a pause button. Very fancy. Hope this helps some guy like me in the future. :bigups:

15 Sep 2011, 5:55 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

There are several threads already talking about integrating the Wimpy player into the /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_modules_media_manager.php template file.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.