Zen Cart Logo
Forums / All Other Contributions/Addons / Download Fetch [support thread]

Download Fetch [support thread]

Views: 13,439

Results 101 to 120 of 120
16 Nov 2011, 6:49 PM
#101
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Download Fetch [support thread]

I've got two issues I've encountered with Download Fetch, I'm hoping you guys can help me out.

  1. The format of the page when I follow the Fetch Download link does not come out clean, how do I format both the text and the size? I've attached a screenshot for reference.

  2. Once I receive the email to actually download the file, when I click on the link, it opens it as a new email? I've tried in Gmail, Outlook 2010, and the webmail service through our host.

Thank you in advance.

16 Nov 2011, 8:27 PM
#102
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

MTODavid:

I've got two issues I've encountered with Download Fetch, I'm hoping you guys can help me out.

  1. The format of the page when I follow the Fetch Download link does not come out clean, how do I format both the text and the size? I've attached a screenshot for reference.

  2. Once I receive the email to actually download the file, when I click on the link, it opens it as a new email? I've tried in Gmail, Outlook 2010, and the webmail service through our host.

Thank you in advance.

You have missed some files on the install as per your screen shot.

The file that would fix the upper case titles is:
site-root/includes/languages/english/YOUR_TEMPLATE/download_fetch.php

For #2 it also sounds like a missing file.

Double check that all the files were uploaded and in the correct place.

Skip

17 Nov 2011, 12:15 AM
#103
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

You have missed some files on the install as per your screen shot.

The file that would fix the upper case titles is:
site-root/includes/languages/english/YOUR_TEMPLATE/download_fetch.php

For #2 it also sounds like a missing file.

Double check that all the files were uploaded and in the correct place.

Skip

Thank you, I will missing two different files, and I seem to have gotten over my first hurdles.

Now I've got one more issue I've run into....

...once the email is received, I click on the link and it brings up a blank window within Firefox. Nothing downloads, no windows come up asking if I'd like to save the file.

Any ideas???

I should also note that I went and downloaded a new copy of the v1.3.9 files and uploaded everything again.

17 Nov 2011, 12:55 AM
#104
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

MTODavid PM me with a link to the fetch page link so I can see a email.

Skip

22 Nov 2011, 9:45 PM
#105
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

I've confirmed that I have all of the files installed by downloading a new copy of the Add On and overwriting everything that was installed originally.

I've confirmed that the correct tables were installed.

I've found the following in my cache log:

15-Nov-2011 15:48:58] PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /public_html/includes/templates/Custom/templates/tpl_download_fetch_default.php on line 228

There are also a couple other logs in the cache that reference line 217 with the same error.

Anyone have any other ideas?

Skipwater has been very helpful and gotten me to this point, Thank you.

23 Nov 2011, 4:43 PM
#106
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

15-Nov-2011 15:48:58] PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /public_html/includes/templates/Custom/templates/tpl_download_fetch_default.php on line 228
Check and see if you have a blank line after the closing ?> at the end of this file:
/public_html/includes/lanuages/english/Custom/download_fetch.php

If so there are two ways to fix:

  1. delete the blank line below the ?>
  2. delete the closing ?> and blank line.

Skip

23 Nov 2011, 4:50 PM
#107
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

Check and see if you have a blank line after the closing ?> at the end of this file:
/public_html/includes/lanuages/english/Custom/download_fetch.php

If so there are two ways to fix:

  1. delete the blank line below the ?>
  2. delete the closing ?> and blank line.

Skip

Here are the last ~5 lines in that file. These are lines 284-290.

	</tr>
</table>
<?php
 }
?>
		</div>
	</div>

It doesn't appear that I have a blank line, but does that look correct?

23 Nov 2011, 4:57 PM
#108
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

My first response was wrong, I looked at the wrong file in my Crimson Editor.

Yes I do have a blank line, I'll try the fix. Thanks.

23 Nov 2011, 5:09 PM
#109
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

Check and see if you have a blank line after the closing ?> at the end of this file:
/public_html/includes/lanuages/english/Custom/download_fetch.php

If so there are two ways to fix:

  1. delete the blank line below the ?>
  2. delete the closing ?> and blank line.

Skip

I did in fact have a blank line after the ?>, here are the steps I took:

  1. I deleted the blank line, uploaded the download_fetch.php, created a new file to download, got the same blank screen after following link in email.
  2. I then tried deleting the closing ?> and thank blank line, uploaded the download_fetch.php, created a new file to download, got the same blank screen after following the link in email.

I feel like I'm so close on this, any other ideas?

23 Nov 2011, 5:38 PM
#110
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

MTODavid:

I did in fact have a blank line after the ?>, here are the steps I took:

  1. I deleted the blank line, uploaded the download_fetch.php, created a new file to download, got the same blank screen after following link in email.
  2. I then tried deleting the closing ?> and thank blank line, uploaded the download_fetch.php, created a new file to download, got the same blank screen after following the link in email.

I feel like I'm so close on this, any other ideas?

Locate this file:

/public_html/includes/modules/pages/fetch/header_php.php

Line 23 find:

$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];

Now for testing change to:

$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];

echo 'File ID '. $intDownloadId . '<br />';
echo 'Email '. $strEmail . '<br />';
exit();

When clicking on the emailed link this should show the file id and the email address. In the browser window.

Let me know Skip

23 Nov 2011, 6:35 PM
#111
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

Locate this file:

/public_html/includes/modules/pages/fetch/header_php.php

Line 23 find:

$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];

> 
> Now for testing change to:
> ```
$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];

echo 'File ID '. $intDownloadId . '<br />';
echo 'Email '. $strEmail . '<br />';
exit();

When clicking on the emailed link this should show the file id and the email address. In the browser window.

Let me know Skip

Found that file, made the changes, got the same blank screen, it didn't come up with the file id or email address.

One thing I should note, is that you said that it should be on line 23, that started on line 64 for me.

23 Nov 2011, 8:04 PM
#112
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

Here is what the start of the file should look like.

<?php
/**
* $Id header_php.php V1.1 01.23.2010
* Written by SkipWater <[email protected]>
*
* /includes/modules/pages/fetch/header_php.php
*
* @package page
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Define Generator v0.1 $
*
* NOTE: this file must contain only PHP code and nothing else. No blank lines 
* before or after. Blank lines before will cause PHP to default to 
* Content-type: text/html. Blank lines after will be sent as additional "garbage" 
* data after the file, potentially causing problems. 
*
*/
include(DIR_WS_CLASSES."fetch_download.php");  // load the class file
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];


$sql = "SELECT fetch_email, file_id, UNIX_TIMESTAMP(date_created) as unix_date_created , count FROM ".TABLE_DOWNLOAD_FETCH." WHERE download_fetch_id = '$intDownloadId'";

$result = $db->Execute($sql);

Skip

23 Nov 2011, 10:53 PM
#113
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

Here's what mine looks like.

<?php
/**
* $Id header_php.php V1.3 01.23.2010
* Written by SkipWater <[email protected]>
*
* /includes/modules/pages/fetch/header_php.php
*
* @package page
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Define Generator v0.1 $
*
* NOTE: this file must contain only PHP code and nothing else. No blank lines 
* before or after. Blank lines before will cause PHP to default to 
* Content-type: text/html. Blank lines after will be sent as additional "garbage" 
* data after the file, potentially causing problems. 
*
* Updated 10.05.10 by SkipWater
* Added Set PHPs own memory limit:
* Added Is Apache trying to compress the output:
*
*/
include(DIR_WS_CLASSES."fetch_download.php");  // load the class file
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

    // gmtime() This one doesn't involve messing around with timezones at all
    function gmtime($ts=null, $is_associative=false){
    	if(is_null($ts)) $ts=time();
    		$t=array_map('intval',explode(',',gmdate('s,i,H,d,m,Y,w,z,I',$ts)));
    		$t[4]--;
    		$t[5]-=1900;
    	if(!$is_associative) return $t;
    return array_combine(array('tm_sec','tm_min','tm_hour','tm_mday','tm_mon',
                               'tm_year','tm_wday','tm_yday','tm_isdst'),
                       		   $t);
	}

	// Get the size
	function return_bytes($val) {
    $val = trim($val);
    $last = strtolower($val[strlen($val)-1]);
    	switch($last) {
        	// The 'G' modifier is available since PHP 5.1.0
        	case 'g':
            	$val *= 1024;
        	case 'm':
            	$val *= 1024;
        	case 'k':
            	$val *= 1024;
    	}
    return $val;
	}

	// Set PHPs own memory limit:
	if (intval($size + 1) > return_bytes(ini_get('memory_limit')) && intval($size * 1.5) <= 1073741824) { //Not higher than 1GB
  		ini_set('memory_limit', intval($size * 1.5));
	}

	// Is Apache trying to compress the output:
	@apache_setenv('no-gzip', 1);
	@ini_set('zlib.output_compression', 0);

$intDownloadId = $_GET['id'];
$strEmail = $_GET['email'];

echo 'File ID '. $intDownloadId . '<br />';
echo 'Email '. $strEmail . '<br />';
exit();


$sql = "SELECT fetch_email, file_id, UNIX_TIMESTAMP(date_created) as unix_date_created , count FROM ".TABLE_DOWNLOAD_FETCH." WHERE download_fetch_id = '$intDownloadId'";
23 Nov 2011, 11:24 PM
#114
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

Replace your file with the one attached here. It is the same but the code you have shown above has been removed.

Skip

28 Nov 2011, 4:19 PM
#115
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

Replace your file with the one attached here. It is the same but the code you have shown above has been removed.

Skip

I put in the attached file and it worked great. Thank you very much for all of your help.

David

28 Nov 2011, 6:52 PM
#116
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

OK....so it's working about 95%, I just found one more hitch.

I can download the file using both Firefox and Chrome, but it won't download through Internet Explorer.

The Error Messages come up saying:

"Internet Explorer cannot dowload index.php from traegertimer.com.

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again laster."

I get the same message on my computer, as well as on a colleagues computer. We are both running IE8.

28 Nov 2011, 7:17 PM
#117
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Download Fetch [support thread]

It seems that the server you are using is not liking some of the newer code in the files.

Replace includes/classes/fetch_download.php file with the attached one.

This attached file has no browser checking so we will see if that fixes things.

Skip

28 Nov 2011, 7:37 PM
#118
mtodavid avatar

mtodavid

New Zenner

Join Date:
Jul 2009
Posts:
19
Plugin Contributions:
0

Re: Download Fetch [support thread]

skipwater:

It seems that the server you are using is not liking some of the newer code in the files.

Replace includes/classes/fetch_download.php file with the attached one.

This attached file has no browser checking so we will see if that fixes things.

Skip

That appears to have worked, thank you.

4 Nov 2012, 1:54 PM
#119
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Download Fetch [support thread]

I just installed the module on ZC 1.5.0 but I can't get the admin menu to item(no download Fetch under Tools) to show up, it's there but it's just not working ...

4 Nov 2012, 4:54 PM
#120
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: Download Fetch [support thread]

icecold:

I just installed the module on ZC 1.5.0 but I can't get the admin menu to item(no download Fetch under Tools) to show up, it's there but it's just not working ...

Never mind I fixed myself, the structure and names of the files in Admin has changed.