Forums / Setting Up Categories, Products, Attributes / Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

Locked

Started by yarilo111 on 28 May 2009, 11:07 PM · Views: 6,807

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
28 May 2009, 11:07 PM
#1
yarilo111 avatar

yarilo111

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

Hi
I want to make my products(.mp3 songs) to be downloadable just like it is with the .zip files... So you click on them and a popup shows for SAVE... Now the clients have to do a right-click on the song and then select SAVE LINK AS... Could anyone help me with this... I'm new to zen cart and this is urgent :frusty::frusty::frusty:

28 May 2009, 11:23 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

You'll probably have to make them .zip files. If your visitor/customer has a program set to open .mp3's, they'll need to right-click to save them.

28 May 2009, 11:35 PM
#3
yarilo111 avatar

yarilo111

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

So there is no way that I can make a mp3 song to be downloaded on a left click like a zip file... Is there any part of the code that can be changed to make this feature possible???

29 May 2009, 12:14 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

Far as I know, it's not a Zencart thing. If a particular visitor, including, I guess, you, has the .mp3 extension associated with a specific program, that program will open it rather than download it on a left-click. There seem to be scripts that will interfere with this, but, of course, they won't work with visitors who have scripting disabled. Google 'force file download'.

29 May 2009, 5:21 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

.
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.

29 May 2009, 4:34 PM
#6
yarilo111 avatar

yarilo111

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

I'm not sure about this thread you gave me a link to... Are you trying to say that if I add those lines in the .htaccess document when a user clicks on a song it will start downloading automatically as it is with the .zip files(so he left-clicks on a song and a window pops up asking where to save the song)???

29 May 2009, 6:35 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

Doing so might help. It depends on the customer's browser configuration and your hosting server configuration, and a number of factors.
Put it in a .htaccess file in your /pub/ folder if you're serving downloads via redirect, or in your /download/ folder if you're not serving by redirect.

.
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.

29 May 2009, 8:17 PM
#8
yarilo111 avatar

yarilo111

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

DrByte:

Doing so might help. It depends on the customer's browser configuration and your hosting server configuration, and a number of factors.
Put it in a .htaccess file in your /pub/ folder if you're serving downloads via redirect, or in your /download/ folder if you're not serving by redirect.

I allready did that and all i get is when the user clicks on the download button he is redirected to another screen where it is suposed to listen the song(browser's stuff) and there it actually appears a pop up window for SAVE AS but it only saves a 0kb .mp3 file... Any other ideas? Cos it's really unintuitive for the user to right click and go to SAVE FILE AS on a button that says DOWNLOAD on it...

29 May 2009, 9:45 PM
#9
yarilo111 avatar

yarilo111

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Re: Make .mp3 songs downloadable at left click like .zip not right click and SAVE LINK AS

yarilo111:

I allready did that and all i get is when the user clicks on the download button he is redirected to another screen where it is suposed to listen the song(browser's stuff) and there it actually appears a pop up window for SAVE AS but it only saves a 0kb .mp3 file... Any other ideas? Cos it's really unintuitive for the user to right click and go to SAVE FILE AS on a button that says DOWNLOAD on it...

YEAHHHHHHH!!!!!!!!!!... SUCCESS:clap::clap:... Don't count the previous post I did because there was a stupid mistake I did... The file that I was trying to download using a .htaccess modification was actually 0kb(corrupted file)... After that I tried with another song and it worked... So... the solution for me was to use a force-stream in the .htaccess file from the directory that I am streaming from. This is tested for Firefox. IE and Opera on Windows and Firefox and Opera on Ubuntu and it's working... :flex: