Forums / General Questions / Downloadable items are playing instead of downloading!

Downloadable items are playing instead of downloading!

Locked

Views: 1,702

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
14 May 2010, 6:03 AM
#1
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Downloadable items are playing instead of downloading!

i'm using v1.3.9a

I've included my music for sale on zencart and we tested out a sale b4 it goes live..

Payment is fine and i've set the duration of the download for 2 days with 3 download attempts. when we clicked the 'download mp3' button it opened a new page and played the track instead of giving out a 'save' option

please help. :cry:

https://www.tommydamani.com/store

14 May 2010, 6:28 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

  1. The screenshot you posted is talking about a video. Yet your post is talking about MP3. Which is it?
  2. If you right-click the download link and choose "Save As" or "Save Link As", does that work?
  3. What download method have you selected? It defaults to "Redirect". Did you change that? If so, why? If not, don't.
    There may be some .htaccess settings you can change, but that depends on your answer to the question above.
  4. It's recommended that you upgrade to the latest version, which as of today is presently v1.3.9b.

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

15 May 2010, 1:57 AM
#3
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

DrByte:

  1. The screenshot you posted is talking about a video. Yet your post is talking about MP3. Which is it?

the file in mp3 the screen shot is the window that pops up when u click download as explained

DrByte:

  1. If you right-click the download link and choose "Save As" or "Save Link As", does that work?

this works yes but is unacceptable. the download link should work

any suggestions?

DrByte:

  1. What download method have you selected? It defaults to "Redirect". Did you change that? If so, why? If not, don't.

where do i find this?

cheers

15 May 2010, 2:19 AM
#4
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

i checked the download method and 'Download by Redirect' is set to 'true'

15 May 2010, 2:38 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

Okay, paste the contents of your /pub/.htaccess file here.

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

15 May 2010, 2:54 AM
#6
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

DrByte:

Okay, paste the contents of your /pub/.htaccess file here.

bro u need to help me out here i don't know where any of these things are :unsure:

15 May 2010, 2:56 AM
#7
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

if u wanna have a look its https://www.tommydamani.com/store

*while you're looking please tell me how to get rid of that annoying
'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.'
on the front page?

cheers bro

15 May 2010, 3:01 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

tommydamani:

*while you're looking please tell me how to get rid of that annoying
'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.'
on the front page?

  1. Click on the "Tutorials/FAQ" link at the top of this page.
  2. Type "successfully installed" in the search box, and click the search button.
  3. Click on the article that shows up related to the question you have, and follow the instructions.

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

15 May 2010, 3:02 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

To make those changes, and to read or update the .htaccess file I mentioned, you're going to need an FTP program and a reliable text editor. Not any microsoft software though.

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

15 May 2010, 3:21 AM
#10
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

i use mozilla ftp i looked in there for the pub folder and its empty

15 May 2010, 3:21 AM
#11
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

DrByte:

  1. Click on the "Tutorials/FAQ" link at the top of this page.
  2. Type "successfully installed" in the search box, and click the search button.
  3. Click on the article that shows up related to the question you have, and follow the instructions.

wicked!!!

15 May 2010, 3:37 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

tommydamani:

i use mozilla ftp i looked in there for the pub folder and its empty
That's probably because it's treating files starting with a "." as "hidden", and not showing them to you.

Do this instead:

  1. Create a new file on your PC, named .htaccess -- I don't care where you put it.
  2. Paste the following into it.
  3. Save it, and upload it to your Zen Cart site's /pub/ folder.
#
# @copyright Copyright 2003-2010 Zen Cart Development Team
# @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
# @version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $
#

## the following line is needed to allow Download-By-Redirect to work
  Options +FollowSymLinks

#
# This is used with Apache WebServers
#
# The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
# It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
# Will also prevent people from seeing what is in the dir. and any sub-directories
#
# For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
# Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified. 
# Example:
#<Directory "/usr/local/apache/htdocs">
#  AllowOverride Limit Options Indexes
#</Directory>
###############################

# deny *everything*
<FilesMatch ".*">
  Order Allow,Deny
  Deny from all
</FilesMatch>

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(zip|ZIP|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV)$">
  Order Allow,Deny
  Allow from all
  
  # tell all downloads to automatically be treated as "save as" instead of launching in an application directly
  # (just uncomment the next 2 lines by removing the '#'):
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>

IndexIgnore */*


## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI

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

15 May 2010, 3:39 AM
#13
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

just thought i'd mention,

if you click the following link http://www.tommydamani.com/store/index.php?main_page=product_music_info&cPath=65&products_id=181 and then listen to the mp3 preview.. THATS what it does when someone has purchased the track and clicked the 'download' link. Thats what it does bro.. It brings up a 'waiting for video' screen and just plays the mp3

hope that helps?

15 May 2010, 3:41 AM
#14
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

DrByte:

That's probably because it's treating files starting with a "." as "hidden", and not showing them to you.

Do this instead:

  1. Create a new file on your PC, named .htaccess -- I don't care where you put it.
  2. Paste the following into it.
  3. Save it, and upload it to your Zen Cart site's /pub/ folder.

@copyright Copyright 2003-2010 Zen Cart Development Team

@license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

@version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $

the following line is needed to allow Download-By-Redirect to work

Options +FollowSymLinks

This is used with Apache WebServers

The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions

It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.

Will also prevent people from seeing what is in the dir. and any sub-directories

For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.

Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.

Example:

#<Directory "/usr/local/apache/htdocs">

AllowOverride Limit Options Indexes

#</Directory>
###############################

deny everything

<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>

but now allow just certain necessary files:

<FilesMatch ".*.(zip|ZIP|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV)$">
Order Allow,Deny
Allow from all

tell all downloads to automatically be treated as "save as" instead of launching in an application directly

(just uncomment the next 2 lines by removing the '#'):

ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>

IndexIgnore /

NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):

OPTIONS -Indexes -ExecCGI


ok i'll give that a shot :smile:
15 May 2010, 3:44 AM
#15
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

i've opened wordpad

copied the code

saved at .htaccess

the file extention for the .htaccess file is now 'text document'

is that all right?

15 May 2010, 3:45 AM
#16
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

tommydamani:

Thats what it does bro.. It brings up a 'waiting for video' screen and just plays the mp3
That's gotta be from whatever player you have configured on your PC to play .mp3 files.
Making the change I suggested above will cause the customers' downloads to just save the file to their PC, instead of opening the player directly.

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

15 May 2010, 3:47 AM
#17
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

tommydamani:

i've opened wordpad

copied the code

saved at .htaccess

the file extention for the .htaccess file is now 'text document'

is that all right?NO NO NO NO NO

Don't EVER use Wordpad to edit website files! All Microsoft software is CRAP for editing website files. It'll screw them up bad.

You'll be much safer and happier using something like Notepad++ (http://notepad-plus.sf.net )

But, yes, the steps are correct otherwise.

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

15 May 2010, 3:53 AM
#18
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

DrByte:

That's gotta be from whatever player you have configured on your PC to play .mp3 files.
Making the change I suggested above will cause the customers' downloads to just save the file to their PC, instead of opening the player directly.

so what happenes when you click the link? cos i remember when we first created these items in the store and we clicked the links to te4st it out, it opened in a new window but in some lind of apple apple player to play them i think? i've seen this same player in other site when u click a mp3 link.. not this 'waiting for video' page.. i only discovered it did that last night when i was working on the store

so what do u see when u click?

15 May 2010, 3:57 AM
#19
drbyte avatar

drbyte

Sensei

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

Re: Downloadable items are playing instead of downloading!

On my Mac, in Safari, I get it simply opening the MP3 file in a new window with a small progress bar and a play/pause button.

In your case, the "video" player must be something on your PC that is programmed to respond when you double-click on an .mp3 file or when you download an .mp3 file.
If in doubt, try from another "clean" PC that's not had any extra software added to it. On a clean PC it'll play with Windows Media Player. Adding other software to play media may treat the file differently.

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

15 May 2010, 5:35 AM
#20
tommydamani avatar

tommydamani

New Zenner

Join Date:
May 2010
Location:
Australia
Posts:
37
Plugin Contributions:
0

Re: Downloadable items are playing instead of downloading!

ok i'm using a laptop.. Now. i've just tested it on a clean PC and yes it opens up in windows player (also i changed the 'open as' on my laptop to 'open with win player' and its now opening with win player) HOWEVER, the problem still exists. i logged in using the PC and there is no pop up box with the 'save to disk' options as it states in the 'Order Information' page. (see picture) instead it does the same thing.. opens with a black page saying 'waiting for video' as its playing the mp3.

this is def a zencart issue and not a PC config issue

any other suggestions?

cheers bro