Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / customer uploads not related to purchases

customer uploads not related to purchases

Locked

Views: 783

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
5 Feb 2010, 9:52 AM
#1
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

customer uploads not related to purchases

Sorry guys... I completely missed this one - how do you enable customers to upload files to the site?

_thanks

5 Feb 2010, 10:37 AM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: customer uploads not related to purchases

create an attribute option name that is a file upload.

attach the attribute to the product.

the file type input will appear on the product info page.

hope that helps

5 Feb 2010, 8:56 PM
#3
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: customer uploads not related to purchases

.. it does help; thanks Nick. However I am looking simply to allow people to upload their images to the server - nothing to do with purchasing any particular product but completely separate.. I still don't really understand how/why they would need this... any suggestions/reasoning is very welcome <<

_thanks

6 Feb 2010, 4:08 PM
#4
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: customer uploads not related to purchases

I am not sure that I understand what you want to do with the images.

But :

To upload image to the server independently is possible but it would involve a bit of custom coding.

You could create a 'free product' that included an image upload. The images are going to be uploaded to the server and then you can do what you wish with them.

A bit more information about what you are trying to do would let us give a bit more tailored advice.

6 Feb 2010, 8:17 PM
#5
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: customer uploads not related to purchases

thanks again..

niccol:

A bit more information about what you are trying to do would let us give a bit more tailored advice.

I am trying to allow photographers to upload their images to the server obviously in a safe way. They don't need to purchase a product just perhaps fill in a form and upload.

_thanks

6 Feb 2010, 9:04 PM
#6
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: customer uploads not related to purchases

The two options above still stand, I think.

You can do a bit of custom coding to create that effect. Describing that is perhaps a bit beyond the scope of a forum post, I am afraid.

Alternatively you can use a 'product' to achieve the result. One attribute would be the file upload and other attributes could be the rest of the 'form'. The price would be zero. It is not an absolutely ideal solution but it is the best that can be done without dipping into code a bit, I believe.

But others may have better ideas?

6 Feb 2010, 9:09 PM
#7
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: customer uploads not related to purchases

I'll dip into the code but just thinking I want to keep everything safe - not allow people to just upload anything so it will have to be quite a dip..

_thanks

6 Feb 2010, 9:31 PM
#8
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: customer uploads not related to purchases

Well, the uploads are handled by the class upload.php which will cope with the some of the security issues for you. (Evidently, allowing uploads to your server is intrinsically insecure in some ways)

So, I would add an upload attribute to a test product and see how the <input type="file"> is configured by zen cart. That will give you a starting point.

THe issue is about how you 'document' the upload. What I mean by that is storing the details about who made the upload, the file name and any other pertinent information is just as important as the actual upload? In which case there is a bit more work than simply adding an input field.