PDA

View Full Version : Downloadable product error on checkout



robfor
05-20-2006, 02:50 AM
Warning: unexpected error in date() in c:\ibserver\www\catalog\includes\modules\downloads .php on line 49
Expiry date:
3 downloads remaining
// LINE REMOVED: MOD - Downloads Controller Show Button //

The download button comes up as it should but above it these error messages shows up, the unexpected error in date came when I set expire date to 0. I set it to 0 because else it said the expire date was Tuesday 07 December, 1999 so 7 days wasn't enoug to cover that.

Dont know why it prints out Line removed... because it's only a comment in the download.php module line 75?

robfor
05-20-2006, 03:03 AM
Part of it was already a know bug, code below fixes it:

0000160: Comment showing up in download option
Description /catalog/includes/modules/downloads.php
About line 90 Change:
Code:
?>
// LINE REMOVED: MOD - Downloads Controller Show Button
// </tr>
to:
Code:
// LINE REMOVED: MOD - Downloads Controller Show Button
// </tr>
?>

robfor
05-20-2006, 04:23 AM
Quick fix to the unexpected error in date() bug. The disadvantage is that you cannot have an expire date set for downloads or in product attributes but it's better than having ugly fault messages displayed to the customer.

Just comment out line 49 in \catalog\includes\modules\downloads.php so it looks like below.

// $download_expiry = date('Y-m-d H:i:s', $download_timestamp);