Forums / General Questions / Play audio clip on the product info page

Play audio clip on the product info page

Started by arunachala on 10 Aug 2011, 2:01 PM · Views: 3,398

Results 1 to 15 of 15
10 Aug 2011, 2:01 PM
#1
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

Play audio clip on the product info page

I have zen cart version 1.3.9f. I would like to play audio and video clips so customers can hear before deciding to buy.
I was able to configure the built media manager to play a clip. However as soon as the play button is pushed the product page disappears and a blank page opens where the music plays. Is there a way to set it so music plays without leaving the product info page.

Are there recommendations from users of this forum about any free audio players that work well with zen cart. I have succdessfully used wimpy players but want to try some of the free mp3 players that are available. What is the best place to place the html code for the player: the product info page or tpl_product_music_diplay_info.php or the media manager tpl?

10 Aug 2011, 5:06 PM
#3
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

Re: Play audio clip on the product info page

Thanks for your reply. I followed the instructions in the website. I uploaded the template_default files to my template_default. Although I see the on/off switch and the progress bar music is not playing. Do you have a working site. Am I putting the files in the right place or do I need to put them in media folder.
Here is my code for the player
<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3.swf" width="200" height="20">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="mp3=http%3A//sriramanamaharshi.org/bookstallsales/include/templates/template_default/test.mp3&volume=175" />
</object>

If you see any problem with this code please let me know. My website is https://www.sriramanamaharshi.org/bookstallsales I am not currently showing the nonworking MP3 in the website. Thanks for your help.

11 Aug 2011, 8:14 AM
#4
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Play audio clip on the product info page

Hi, if you use the generator in the site, and click the play button, you can tell if the code being used will work or not. The reason why yours is not working, is because you have the mp3 in a protected folder. Put it in a folder in the root of your site, then it will work.

11 Aug 2011, 2:08 PM
#5
arunachala avatar

arunachala

Zen Follower

Join Date:
Mar 2009
Location:
New York
Posts:
158
Plugin Contributions:
0

Re: Play audio clip on the product info page

Perfect. This is really a very cool player. Minimal and impressive. For those in the forum who want to try this please do not put the files in the template_default directory structure which comes with the download. Store/media is the place to put it. Further each code snippet should be added after the product description from the admin page. A crossdomain.xml should also be included as explained in the documentation. If any forum user has qustions I would be happy to help.:clap:

24 Aug 2011, 7:30 PM
#6
dianamusic avatar

dianamusic

New Zenner

Join Date:
Aug 2011
Location:
california
Posts:
3
Plugin Contributions:
0

Re: Play audio clip on the product info page

Hello, thank you for your helpful post about this player. Glad you got it to work. I would love to use it as well, but can't seem to get it to work. I'm where you were--I can see the player, but it won't play. I know I'm not doing everything right... 1) Did you put your mp3 files as well as the player_mp3_maxi.html & player_mp3_maxi.swf in the media folder ([zencartstorename]/media) rather than the root directory? 2) Is your crossdomain.xml in your root directory or media? (I'm not sure I'm doing this right either...), 3) Are there any other steps I should be taking in addition to putting the files in the right place & creating the crossdomain.xml?

25 Aug 2011, 8:36 AM
#7
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Play audio clip on the product info page

dianamusic:

Hello, thank you for your helpful post about this player. Glad you got it to work. I would love to use it as well, but can't seem to get it to work. I'm where you were--I can see the player, but it won't play. I know I'm not doing everything right... 1) Did you put your mp3 files as well as the player_mp3_maxi.html & player_mp3_maxi.swf in the media folder ([zencartstorename]/media) rather than the root directory? 2) Is your crossdomain.xml in your root directory or media? (I'm not sure I'm doing this right either...), 3) Are there any other steps I should be taking in addition to putting the files in the right place & creating the crossdomain.xml?

If you use the generator it will work it out for you...

http://flash-mp3-player.net/players/mini/generator/

Put in the path to your MP3 file in the first line, and then click the play button on the player above it. If the path is correct, it will play, if not it won't. You do not need the crossdomain.xml file, and you do not need the html and SWF files on your domain either. This player runs remote, from their server. Simply embed the code, and it uses the player file on that site.

5 Sep 2011, 6:54 PM
#8
dianamusic avatar

dianamusic

New Zenner

Join Date:
Aug 2011
Location:
california
Posts:
3
Plugin Contributions:
0

Re: Play audio clip on the product info page

dgent:

If you use the generator it will work it out for you...

http://flash-mp3-player.net/players/mini/generator/

Put in the path to your MP3 file in the first line, and then click the play button on the player above it. If the path is correct, it will play, if not it won't. You do not need the crossdomain.xml file, and you do not need the html and SWF files on your domain either. This player runs remote, from their server. Simply embed the code, and it uses the player file on that site.

Thank you for your response! Good to know. I have tried the generator using their player. I put the mp3 in a "media" folder I created in the root directory as you suggested above ((for example, http://[mysite.com]/media/wst_sample.mp3)), and still no luck playing. Now I've no idea what I'm doing wrong!

6 Sep 2011, 2:23 PM
#9
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Play audio clip on the product info page

dianamusic:

Thank you for your response! Good to know. I have tried the generator using their player. I put the mp3 in a "media" folder I created in the root directory as you suggested above ((for example, http://[mysite.com]/media/wst_sample.mp3)), and still no luck playing. Now I've no idea what I'm doing wrong!

Can you pm me your website please so I can try the file.

22 Sep 2011, 8:04 AM
#10
dianamusic avatar

dianamusic

New Zenner

Join Date:
Aug 2011
Location:
california
Posts:
3
Plugin Contributions:
0

Re: Play audio clip on the product info page

Turns out that I was simply still putting the mp3 file in the wrong folder. I needed to put it in the "public_html" folder (it works either in that folder or in a new created "media" folder within public_html), without using "public_html" in the URL. The FTP I was using had a "copy URL" feature, but always included the "public_html," which I didn't realize was wrong, so I had erroneously put the folder up one level.

In summary, (even though the audioclip.mp3 is in the public_html folder) the URL used for example for the flash player would be:

RIGHT: http://www.website.com/media/audioclip.mp3
WRONG: http://www.website.com/public_html/media/audioclip.mp3

(those are just examples, not actual working links)

8 Jan 2012, 1:34 AM
#11
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Re: Play audio clip on the product info page

I've managed to get the mp3 player working on the index.php?main_page=product_music_info&cPath=XX&products_id=YY by putting:

<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" width="200" height="30">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="mp3=<?php echo zen_href_link(DIR_WS_MEDIA . $za_clip['clip_filename'], '', 'NONSSL', false, true, true); ?>&width=200&height=30&sliderwidth=15&sliderheight=15" />
</object>

into tpl_modules_media_manager.php

I had hoped with - value="mp3=<?php echo zen_href_link(DIR_WS_MEDIA . $za_clip['clip_filename'], - to get the right clip playing as each product was brought up. However, it sticks to the one clip (which was the first one I tried) whatever product_music_info is on the browser. Any thoughts on how to get that one clip out of it's mind so it can reload the new clip as the page changes?

Thanks in advance ...

8 Jan 2012, 1:39 AM
#12
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Play audio clip on the product info page

I'm having a flashback to the 1990's.

The best way to learn is to try stuff. But, back it up first.

8 Jan 2012, 8:45 AM
#13
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Re: Play audio clip on the product info page

RescoCCC:

I'm having a flashback to the 1990's.

Anything useful for me in your flashback? All I'm after is MP3 tasters on the same page as the product ....

8 Jan 2012, 11:09 AM
#14
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Re: Play audio clip on the product info page

Sorted. Yet again, my bad. Sorry to provoke flashbacks ...

19 Dec 2012, 10:57 AM
#15
singam avatar

singam

New Zenner

Join Date:
Oct 2012
Posts:
9
Plugin Contributions:
0

Re: Play audio clip on the product info page

How to play video clip on the product info page ?