Zen Cart Logo
Forums / Addon Admin Tools / Customer Uploaded Files - List and Download

Customer Uploaded Files - List and Download

Views: 24,471

Results 1 to 20 of 85
22 Jul 2010, 2:10 AM
#1
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Customer Uploaded Files - List and Download

This is the support thread for the admin add-on "Customer Uploaded Files - List and Download" (see http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=1688)

This add-on lists all files that customers have uploaded in association with orders. Show the order number, customer's name, and the file name they assigned. Provides a single-click secure download for such files. Adds a menu item "Uploads" to the "Customers" menu in the admin area.

26 Jul 2010, 4:43 PM
#2
ppsteve avatar

ppsteve

New Zenner

Join Date:
Jul 2010
Posts:
1
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

I have installed the Customer Uploaded Files List and Download. I am running Zen V1.3.9.d and everything is functioning properly with exception of the download link in the administrators area. I get the message: File "DIR_FS_UPLOADS3.jpg" does not exist (245)

In my upload directory there is a file 3.jpg and this is the file I tested the upload with.

I found that I needed to change the permissions on the /admin/includes/configure.php. I found that when I downloaded the file and added the two lines.. uploaded the file back to my site, the changes were not there. the configure.php was set to permissions 444.

Hope this helps anyone else having an issue. Other than this, I am very pleased with the contribution. works fine!

Thank you Dana. Just what we needed here. a way to associate the uploaded file with the order.

Steve Beal

13 Aug 2010, 10:17 AM
#3
authentic01 avatar

authentic01

New Zenner

Join Date:
Aug 2010
Posts:
22
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

:cry:
I just tried installing and it's not working at all for me. There is no 'upload' under 'customer' when i'm logged in the admin.

this is what i have: under admin the folder which i downloaded 'uploads 1.0' and i wend under admin/includes/configure.php and copy the two files this is what's showing now:

define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS );

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

now was i also to go to: name of shop/includes/configure.php and change the files as well.

14 Aug 2010, 12:53 PM
#4
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

authentic01:

:cry:
this is what i have: under admin the folder which i downloaded 'uploads 1.0' ...

It's not enough to copy the folder "upload 1.0" to your admin folder. You have to move three files from the "uploads 1.0" folder to new locations:

  1. The file "uploads_customers_dhtml.php" which is buried in a nested series of folders at "uploads 1.0/admin/includes/boxes/extra_boxes/" must be copied to YOUR admin folder at "admin/includes/boxes/extra_boxes".

  2. Similarly for "uploads 1.0/admin/includes/extra_datafiles/uploads_filenames.php" which gets copied to your "admin/includes/extra_datafiles/uploads_filenames.php".

  3. And "uploads 1.0/admin/includes/languages/english/extra_definitions/uploads.php" gets copied to your "admin/includes/languages/english/extra_definitions/uploads.php".

30 Sep 2010, 4:44 PM
#5
nu_oro avatar

nu_oro

New Zenner

Join Date:
Oct 2006
Posts:
7
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Hi, thank you for this great mod. it's very helpful and works great but is there a way of deleting some or all of the upload logs, it dose get crowded after some time.:cool:

I'm using 1.3.9.d version of zen-cart

14 Oct 2010, 7:58 PM
#6
3dperuna avatar

3dperuna

New Zenner

Join Date:
Nov 2007
Posts:
33
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Great Mod!

I wanted to add more info to the file name... I've attached an uploaded version of the uploads.php file that grabs the customer's ID, customer's name and the original file name. It strips the spaces from the customer's name (assuming it was sanitized when created).

Use at your enjoyment (and risk!)

P

15 Oct 2010, 2:59 PM
#7
nu_oro avatar

nu_oro

New Zenner

Join Date:
Oct 2006
Posts:
7
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

3DPeruna:

Great Mod!

I wanted to add more info to the file name... I've attached an uploaded version of the uploads.php file that grabs the customer's ID, customer's name and the original file name. It strips the spaces from the customer's name (assuming it was sanitized when created).

Use at your enjoyment (and risk!)

P

Where dose this file go?

15 Oct 2010, 7:44 PM
#8
3dperuna avatar

3dperuna

New Zenner

Join Date:
Nov 2007
Posts:
33
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

It only worked when I put it in your admin/ directory (backup your original file).

12 Nov 2010, 5:59 AM
#9
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Hello did all in the notes. I'm on 1.3.9g
When in the admin I go to uploads..try to download the zip I uploaded and I get Can not open file: it does not appear to be a valid archive.

13 Nov 2010, 2:14 AM
#10
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

romy, does it work for other file types? If you upload a plain text file (.txt) or a jpeg (.jpg) for example, does that download correctly?

13 Nov 2010, 6:23 AM
#11
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Yes..PSD,EPS,AI,JPG all work great.
can upload the zip file fine but can not open it.
would the htaccess have anything to do with this.

13 Nov 2010, 12:14 PM
#12
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

I think it's unlikely the default .htaccess files of ZC having any effect. If you have done anything with MIME types in your .htaccess, then yes, that might have an effect.

Since this problem is likely affected by the kind of computer you're using, what sort of browser/pc combo are you using? What OS do you run, and what browser are you using?

Try this using different browsers. For example, try Opera, Firefox, and either IE or Safari (assuming you're either on Windows or Mac). Get a friend to try this, especially if they are using a different kind of PC, and see what happens on their computer.

When you upload a file and then later download it, the file is supposed to be unchanged. Bit for bit, the downloaded file is supposed to be identical with the file you uploaded.

So investigate that--when you download your zipped archive, are you getting back a file that's identical to the one you uploaded (you may need to download a utility program to help you determine whether two files are bit-for-bit identical)?

If the file you download is identical to the one you uploaded, then the problem isn't with ZC, it's something messed up on your computer.

But if the downloaded file is NOT identical to the one you uploaded, then the problem lies either in how you're hosting and/or configuring ZC, or in how you have your browser configured (in particular, how you have your MIME types set up). And it's more likely your browser than ZC.

26 Nov 2010, 12:37 AM
#13
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

This is a great mod, thanks.
I'm trying to format the upload name in the order email. I can't seem to control it through the email .css. Any ideas?

Is there any way to show the uploaded image in the admin or order email? I guess that would involve ctreating a thumbnail of the upload if it's an image.

Cheers and thanks again,

1 Dec 2010, 3:03 AM
#14
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

I just tried the new uploads.php file but it gives an error - zc.orders not found.

1 Dec 2010, 3:36 AM
#15
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

marknew:

I just tried the new uploads.php file but it gives an error - zc.orders not found.

Details, please! What is the exact text of the error message? What version of ZC are you running?

1 Dec 2010, 10:06 PM
#16
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

That problem was when i used the "updated" uploads.php from 3DPeruna. I have gone back to the original uploads.php.

The problem i have now is uploaded jpegs named filename.jpg download correctly but files where the extension is in capitals - EG filename.JPG can't be downloaded. When i click the link it says the file can't be found.

The error message is -
File "/home/newmedia/public_html/photosoncanvas.net.au/images/uploads/54.jpg" does not exist (251)

I have checked an the file is the but any files ending in .JPG aren't found.

Zencart 1.3.9d

Also, is there a way to remove the old files from the download list?

Thanks

2 Dec 2010, 4:54 AM
#17
decartwr avatar

decartwr

New Zenner

Join Date:
Feb 2005
Location:
Syracuse, New York, USA
Posts:
39
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

I haven't had time to thoroughly investigate this (and it's almost midnight my time, so fatigue is working against me here)...BUT, it does appear that the uploads.php code assumes file extensions will always be lowercase, which is bogus.

See if these changes help:

Around line 229 of uploads.php, find a line like this:

$file_extension = strtolower( substr( strrchr( $fileName, '.' ), 1) );

and change it to be like this:

$file_extension = strtolower( $fext = substr( strrchr( $fileName, '.' ), 1) );

and then around line 249 find:

$fs_path = DIR_FS_UPLOADS . $index . '.' . $file_extension;

and change it to:

$fs_path = DIR_FS_UPLOADS . $index . '.' . $fext;

and then (optionally, only if you want to preserve the case of the extension when you download the file) around 256 find:

$nfile = 'zc_order' . $oid . '_' . $index . '.' . $file_extension;

and change it to:

$nfile = 'zc_order' . $oid . '_' . $index . '.' . $fext;

I have NOT tested these mods, but try them and post results here (being on opposite sides of the world is a challenge, time-wise).

20 Dec 2010, 6:13 AM
#18
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

there's no delete function on this add on, did anyone tried adding a delete function?

21 Feb 2011, 5:55 PM
#19
thomaswhiteeagle avatar

thomaswhiteeagle

New Zenner

Join Date:
May 2007
Posts:
93
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Thanks for the above changes to fix the issue with uppercase and lowercase file extension. Found out I had the issue when I installed this mod, found this forum and made the changes and they work perfectly.

Of note too, is having a delete function on these uploads would be perfect so I'm on the list for seeing that come about too.

23 Feb 2011, 4:45 PM
#20
myth3_16 avatar

myth3_16

New Zenner

Join Date:
Jun 2010
Location:
United Kingdom
Posts:
24
Plugin Contributions:
0

Re: Customer Uploaded Files - List and Download

Hi All,

I've just downloaded this contribution but I don't think all the files are there?

I have the following directory Structure:

MACOSX
|-uploads1.01
| |-admin
| | -includes
| | |-boxes
| | | |- .
.DS_Store
| | |-languages (this directory is Empty)
| |- ._.DS_Store
| |- .uploads.php
|- .
.DS_Store
|- ._readme.txt

uploads 1.01
|-.DS_Store
|-licence.txt
|-readme.txt

Is there supposed to be more files as it doesn't seem to be working at all.

Regards,

Brett Rogers