Zen Cart Logo
Forums / General Questions / Image upload by customers

Image upload by customers

Locked

Views: 691

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
4 Sep 2010, 9:20 AM
#1
freezerman avatar

freezerman

New Zenner

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

Image upload by customers

I would like to restrict upload image files to the site to bonafide customers.
Is there a way that this can be achieved e.g. cannot upload image/file until registered as customer.
Would appreciate some assistance.

4 Sep 2010, 2:28 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Image upload by customers

Well ... the problem is that if you just block the upload, it did not block the Add to Cart ... so you would have Guests with Products in the shopping cart without their uploads ...

You could try to build in a special test on the products that if they include upload attributes ... then the Product cannot be added until the Guest logs in ...

This would be a lot safer and ensure that a Product added to the cart has all the peices and parts to it ...

The Add to Cart/Buy Now are controlled via the function zen_get_buy_now_button in the functions_general.php ...

You can look at how the Customer Authorizations are done and do something similar by adding a test to see if the Product contains upload attributes ... and then send back a Login link instead of the button ...

4 Sep 2010, 4:53 PM
#3
freezerman avatar

freezerman

New Zenner

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

Re: Image upload by customers

Hi
Thanks for your info but I am a little confused.

To explain further. I want to allow customers to upload either pdf files or image files that we can use to design their logos for t shirts, workwear etc.

Obviously for security I do not want anyone to upload images/files that might have viruses attached etc so that is the reason why I wish to restrict to registered customers only.

Many thanks

4 Sep 2010, 5:26 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Image upload by customers

Correct ... but in addition to preventing the upload of files by guests, you need to prevent the add to cart on these products with uploads as well because if they cannot do the upload until logged in, they should not be able to add to cart these products until logged in ... otherwise they are now missing a vital component on the Product, that being the upload ...

If you want your whole shop set for customers must be logged in to add to cart, then that feature is built in ...

However, if you only want customers to not be able to use the upload/add to cart on specific products, then you need to customize the code for this ...

4 Sep 2010, 5:53 PM
#5
freezerman avatar

freezerman

New Zenner

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

Re: Image upload by customers

Thanks Ajeh