jgreene69
Starting Member
USA
10 Posts Pre-sales questions only (More Details...)
|
Posted - 08/14/2020 : 07:23:08
Hello all! If this question has been asked before, I apologize but I haven't been able to come up with anything useful when I search for a solution. I want customers to be able to upload an image or other file to be put on products that I am offering. I thought this capability was built into the newer template software but I have been unable to find it. In an older version of the cart program, I inserted my own file uploader code into a custom field but many people have trouble using it properly. I am hoping there is a built-in method to do this so that it will work better with the cart. Is there an uploader built into the current cart program or maybe an add-on that works well with this cart? Thanks for any help with this, Jon. Ecommerce Plus PHP v7.1.10
|
dbdave
ECT Moderator
USA
10410 Posts |
Posted - 08/14/2020 : 07:28:31
Hi, sure, that is a new feature and you can see details in this thread - https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=112093 quote: Order Image Uploader You can now accept image uploads attached to an order if required. For instance, if you sell fabric you could allow a customer to upload an image of a design with the order. The image upload happens after payment to deter hackers from trying to circumvent security and the images can be safely stored outside the web root. To enable the image upload, the first thing you will need to do is specify the upload directory on the admin main settings page. The path to the site root is given to help find the directory location, but for security reasons you should always specify a location outside the web root. Then on the admin products page, in the "Quick Entry..." choose "Image Upload" and check the products that allow an image upload. Other parameters related with the image upload are... uploaditemsperorder=1 $uploaditemsperorder=1; Normally only one image is allowed per ordered item but you can increase that with this parameter. uploadmaxfilesize=2*1024*1024 $uploadmaxfilesize=2*1024*1024; uploadfiletypes=".bmp,.gif,.jpe,.jpeg,.jpg,.pdf,.tif,.tiff"; $uploadfiletypes=".bmp,.gif,.jpe,.jpeg,.jpg,.pdf,.tif,.tiff"; Specifies the filetypes of the images that can be uploaded.
You need to be running version 7.1.5 or newer. If you are having problems after setting this up, please post back and I'm sure someone will help. Thanks, David
|
jgreene69
Starting Member
USA
10 Posts Pre-sales questions only (More Details...)
|
Posted - 08/14/2020 : 07:38:46
Awesome! Thanks for the link David, I will give that a whirl!
|
jgreene69
Starting Member
USA
10 Posts Pre-sales questions only (More Details...)
|
Posted - 08/14/2020 : 11:00:56
Ok, the image uploader is now sort of working but I have a few issues with it. I added the following lines to my includes.php file (I am assuming that is where these variables need to be put as no file is specified) -
// Image Uploader $uploaditemsperorder=10; $uploadmaxfilesize=100*1024*1024; $uploadfiletypes=".bmp,.gif,.jpe,.jpeg,.jpg,.JPG,.pdf,.tif,.tiff,.png,.psd,.ai,.zip";
I entered these lines as referenced in the article shown by your link to try and increase the file size allowed and allow more file types to be uploaded. I am still unable to upload most of the files that I have tried.
These are some of my results: Filename Status IMG_0738.JPG 413:Refused by server 1.92MB file img007.jpg 413:Refused by server 21.2MB file 113-0417...4(1).pdf #9989; 137KB file 113-0417...9414.PDF #9989; 119KB file IMG_0128.JPG 413:Refused by server 1.34MB file IMG_0126.jpg 413:Refused by server 1.87MB file HB Grandma.ai 413:Refused by server 1.1MB file tt_wcwkshp_2016.jpg #9989; 152KB file
I thought I had found a pattern but after more testing, I am lost as to why certain files are refused by the server. Is there an instruction page for this feature? The manual I downloaded has nothing regarding this feature. Thanks, Jon.
|
dbdave
ECT Moderator
USA
10410 Posts |
Posted - 08/14/2020 : 13:03:33
Hi Jon, it's quite likely a limitation of your server as far as file size. Can you ask your host if they have a limit set on max upload file size?
It's also possible that your host is disallowing zip files, so ask about that too.
(.jpg,.JPG)
I think you want to remove the duplicate .JPG there.
Thanks, David
|
jgreene69
Starting Member
USA
10 Posts Pre-sales questions only (More Details...)
|
Posted - 08/16/2020 : 12:40:59
Hi all, Progress is being made but I still have problems with the uploader. You were correct, David, that the hosting company was throttling my uploads (1mb max, very lame). I have copied the site to my other service and now I can upload larger files, about 10mb or so, but I am still having issues with file types being rejected and larger files get restarted and fail. What kind of code are you using for your uploader? I modified an html5 uploader for another site and I can upload any file type I want up to 120mb (on same server). I'm using the same php.ini file for both sites. Apache version 2.4.43; PHP version 7.2.32; mysql version 10.2.32-MariaDB-log. I have updated my includes.php file with: [quote]// Image Uploader $uploaditemsperorder=10; $uploadmaxfilesize=100*1024*1024; $uploadfiletypes=".bmp,.gif,.jpe,.jpeg,.jpg,.pdf,.tif,.tiff,.png,.psd,.ai,.eps,.zip"; [/quote] Any thoughts on what to try next? Thanks, Jon
I just added my other upload script to my item on the new site and it works just like it does on the old site. I was able to upload a 28MB psd file and a 1.1MB ai file, neither of which can I upload using your uploader. Please let me know how to fix this. I much prefer the way your script works after the payment and I like the way it keeps track of who uploaded what for which order. Thanks, Jon
Further addendum - I just put my script in the new cart program on the first server that wasn't letting me upload more than 1MB and I can now upload the same 28MB psd file, a 2.6MB jpg, and a 1.1MB ai file with no issues - so much for their supposed 20MB cap on uploads (that is what the told me originally). So, the limit is definitely in your upload script. If you would like to see the script I am using, just let me know. I would still much prefer to get yours working but will use mine if I have to. Thanks, Jon
Edited by - jgreene69 on 08/16/2020 14:24:57
|
Vince
Administrator
42761 Posts |
Posted - 08/17/2020 : 02:22:29
|
Vince
Administrator
42761 Posts |
Posted - 08/18/2020 : 02:29:01
Hi Jon I've got your uploads working I do believe and it seems to be to do with the fact that the POST size IS limited, but if you send as multipart/form-data then this doesn't seem to be restricted. So what I've done is allow for both and to use the alternative you need to add the parameter... $uploadusemultipart=TRUE; ...to your includes.php file. (I've already done this for you and it all seems to be working.) I'll get these changes into the updater now. Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
|
jgreene69
Starting Member
USA
10 Posts Pre-sales questions only (More Details...)
|
Posted - 08/18/2020 : 05:56:45
Hi Vince, Thank you very much! The testing I just did this morning was all successful except I was unable to upload an .ai file, that gave me an illegal file type error. That's not a big deal but I do have that extension in my list so it is still being blocked somehow. I can work around that for now. Thanks for your help and a great product! Jon
|
tgorski
Ecommerce Template Expert
USA
910 Posts |
Posted - 12/12/2023 : 10:03:24
Can someone help us find some info on "Order Image Uploader"?
We assume it's something that can be used to allow customers to upload images, but can't find anything on how to install or configure it?
Tim Gorski
|
Phil
ECT Moderator
United Kingdom
7680 Posts |
Posted - 12/12/2023 : 11:49:09
|
tgorski
Ecommerce Template Expert
USA
910 Posts |
Posted - 12/12/2023 : 12:23:40
Thank You for the posts ... is there somewhere we use the form to experience it first-hand? That might be easier for us to get our head around using it instead exchanging a bunch of questions based on the written description.
Tim Gorski
|
Vince
Administrator
42761 Posts |
Posted - 12/13/2023 : 04:22:17
|
quadrant
Ecommerce Template Guru
United Kingdom
1110 Posts Pre-sales questions only (More Details...)
|
Posted - 12/13/2023 : 06:51:20
Hi Tim,
It might also be worth adding you need to go to: Store Admin > Image File Uploads and add your upload directory location
Regards, David
|
|
|