Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mp3 download problem


sumfun1

Recommended Posts

When I run a test download of an mp3 everything works fine accept after the file is downloaded it changes from 3 to 4 mb in size to 4 to 600 kb and won't play.

 

 

 

 

I have tried zipping and rar the file still the same. In downloads folder everything is correct in size.

 

 

any help is greatly appreciated

running osCommerce 2.2-MS2 with header tags contribution

 

 

sumfun

Link to comment
Share on other sites

When I run a test download of an mp3 everything works fine accept after the file is downloaded it changes from 3 to 4 mb in size to 4 to 600 kb and won't play.

I have tried zipping and rar the file still the same. In downloads folder everything is correct in size.

any help is greatly appreciated

running osCommerce 2.2-MS2 with header tags contribution

sumfun

 

 

Does anyone seem to have any help to this matter?

 

 

I really hope so

 

 

Sumfun

Link to comment
Share on other sites

I have tried both through pay pal and after on the test, I even had a friend pay to test it same situation. Have a look you can select pay by check or money order and still receieve the download witout me allowing: its all a mess. Ill send someone 20 bucks if they can help.

 

I have tried allowing shipped, processing you name it I have tried it.

 

 

store for view to help

 

 

Sumfun

Link to comment
Share on other sites

Here is some info I posted before.

 

http://www.oscommerce.com/forums/index.php?showtopic=150154

 

You will need to change catalog/includes/modules/downloads.php to check the order status.

 

select orders_id, orders_status...

if (orders_status < X) {

//Payment not complete

} else {

//download links

}

 

There are two methods for downloading you select in admin->configure->downloads.

 

If using download by redirect you need to do something to replace the tep_unlink_temp_dir function so it doesnt clobber download links in use by someone else like a cron job that deletes links 30min old

 

If using the direct method the current readfile() reads the whole file in memory and will probably exceed the 2-4Meg script limit in php.ini. Below is an alternate code

 

Also whenever sending header('Content-Type: NOT text/html) you can view the result file in your text editor because it may contain a php error message.

 

catalog/download.php

 

header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize(DIR_FS_DOWNLOAD . $downloads['download_filename']));
header('Content-Disposition: attachment; filename=' . basename(DIR_FS_DOWNLOAD . $downloads['download_filename']));

$chunksize = 32 * 1024;
$buffer = '';
$handle = fopen(DIR_FS_DOWNLOAD . $downloads['download_filename'], 'rb');
if ($handle === false) { die; }
while (!feof($handle)) {
 $buffer = fread($handle, $chunksize);
 echo $buffer;
}
fclose($handle);

Link to comment
Share on other sites

  • 1 month later...
Also, I'd be wary of the legality of selling mp3's of major label artists which the majors in the US refuse to do.  You could be heading for trouble.

Nicely designed though...

Thanks Cartel, no problem with the label in this instance the artist owns his own label!!

Now if only I could sort this issue with the size of the downloads causing grief, I could move on to the next store!!

Link to comment
Share on other sites

Thanks Cartel, no problem with the label in this instance the artist owns his own label!!

Now if only I could sort this issue with the size of the downloads causing grief, I could move on to the next store!!

 

 

Hey Steve,

As for the downloads legality... I was referring to sumfun1's site as he has R Kelly and Pussycat dolls downloads.

 

Are you having problems with the downloading of the mp3 or the Flac files?

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

Hey Steve,

As for the downloads legality... I was referring to sumfun1's site as he has R Kelly and Pussycat dolls downloads.

 

Are you having problems with the downloading of the mp3 or the Flac files?

The FLAC files, the MP3 for the most part are fine

 

Steve

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...