If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Features Wish List / File Uploader needed

File Uploader needed

Locked

Started by maxima on 22 Jun 2006, 5:40 AM · Views: 1,607

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
22 Jun 2006, 5:40 AM
#1
maxima avatar

maxima

New Zenner

Join Date:
Jun 2006
Posts:
86
Plugin Contributions:
0

Post #1 by maxima

I am using ZenCart for a print shop and would like to include 4 fields for file uploads. These fields would be in the 3rd section of the checkout process. Most times only 2 fields are required so there should be no error message if any field is empty.

The uploaded files can be stored in a single folder but the filenames should be included in the existing confirmation email that goes to client and owner and also in the database for the shopper history.

I think this would be a valuable and worthy addon to this already superior Shopping Cart Program.

22 Jun 2006, 6:32 AM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

I'm not sure if you've checked out the ability to upload files as part of a product WHILE adding it to the cart.
This is done by the built-in attributes system.
This FAQ talks about how to set up attributes, and mentions FILE as an available choice:
http://www.zen-cart.com/forum/faq.php?faq=cats_and_prods#faq_add_attributes

If you install a copy of Zen Cart (perhaps in another folder+another database), and choose the "demo" products, you'll see examples of this in action if you check out the "A Bug's Life - Collector's Edition" product, which shows off many of the various attribute capabilities.

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

22 Jun 2006, 1:32 PM
#3
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Post #3 by styledata

You and I are looking for the exact same thing. I tried the included file uploader and it is too basic for uses such as ours. I am currently using ezupload which allows upload of several files at a time, plus other info fields I defined. You can find it at http://www.scriptscenter.com/ezupload/. What I am trying to figure out now is how to integrate it into the cart. Perhaps we can noodle on this together. PM me if you like.

Give us your best shot!
http://www.photoimprints.com

22 Jun 2006, 4:28 PM
#4
maxima avatar

maxima

New Zenner

Join Date:
Jun 2006
Posts:
86
Plugin Contributions:
0

Post #4 by maxima

DrByte we have tried the file upload attribute but there are a few changes I need for it:

1 It has to be during the checkout since by then the shopper would have registered otherwise timewasters will be uploading files for fun.

2 We print on both sides of paper so 2 files are required. It needs 3 more fields otherwise we will be on the phone explaining file compression all day

3 The file sizes vary from 2MB to 20MB and it seems to time out while sending a 10MB file


Styledata, we did look at ezupload during our search and it certainly is powerful but would pose an integration challenge. We did use another upload tool but the problem we had was clients would bookmark the upload page and access it directly to send us files without going through the payment process.

If only we knew PHP coding!!

22 Jun 2006, 5:08 PM
#5
maxima avatar

maxima

New Zenner

Join Date:
Jun 2006
Posts:
86
Plugin Contributions:
0

Post #5 by maxima

DrByte it also renames the uploaded files with numbers which poses a bit of challenge for the pre-press staff who has FTP access to the folder but don't have admin access to the ZenCart.

22 Jun 2006, 5:14 PM
#6
drbyte avatar

drbyte

Sensei

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

Post #6 by drbyte

maxima:

3 The file sizes vary from 2MB to 20MB and it seems to time out while sending a 10MB file

This may be related to two settings in your server's PHP configuration (which your host should be able to help you with tweaking):
post_max_size = 8MB
upload_max_filesize = 2MB

and your admin setup for Admin->Configuration->Maximum Values->Maximum File Upload Size

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

23 Jun 2006, 12:26 AM
#7
maxima avatar

maxima

New Zenner

Join Date:
Jun 2006
Posts:
86
Plugin Contributions:
0

Post #7 by maxima

DrByte, I read through the article you posted along with some other information and realised that by option naming upload1, upload2 etc. and assign to the product, I could display multiple upload fields. I was also able to change the upload limit so it works somewhat ok now except for the uploaded filename change. Thanks for the guide.

23 Jun 2006, 12:39 AM
#8
drbyte avatar

drbyte

Sensei

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

Post #8 by drbyte

The "real" name is stored in the database ... in the "files_uploaded" table, linked to the session-name during which the upload was done, and the customer id if they were logged in when the upload happened.

This is all done by the shopping_cart class. (you could search for TABLE_FILES_UPLOADED as a reference to where this is done).

Perhaps simply pulling the relevant records from this table may be all you need to display the information you desire. ... or at least it may be a help in the right direction.

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