Page 2 of 3

Re: File Upload mod for v1.x?

Posted: Sat Oct 24, 2009 10:25 am
by readyman
I'm not sure I've ever seen a cart or store that lets you upload *anything* to their server before you become a customer.
Oh, yeah, I thought about that too, but if the order is not completed, you could have a script run via cron or similar that cleans out all files that are not attached to an order. This script/function could sit there and just wait for any trigger, eg. if order is set to cancelled - trigger the function.

Re: File Upload mod for v1.x?

Posted: Wed Oct 28, 2009 2:44 pm
by internet54
Do you have an update on this Readyman?

Re: File Upload mod for v1.x?

Posted: Wed Oct 28, 2009 7:52 pm
by readyman
Still working on it.

- I've got half the admin code done so you can add the upload options per product from the options tab.
- Upload options track to the cart just like the text options all the way to the invoice.

- Admin todo - configurations, allowed filetypes etc.
- Still need to add the ajax uploading part now.
- It should also work without javascript hopefully (but it's not a deal breaker).

Re: File Upload mod for v1.x?

Posted: Sat Oct 31, 2009 11:18 am
by readyman
Uploading and posting to the cart done.
Language file done.

Todo
- Admin configuration page to control filetypes, require login to upload, and any other settings.
- Link to the file for download on the order page.
- Non javascript upload using cart page instead of ajax upload (1/2 done at the moment).

Maybe will be released today in time for halloween ::)

Re: File Upload mod for v1.x?

Posted: Sat Oct 31, 2009 7:05 pm
by zone97
readyman wrote:Uploading and posting to the cart done.
Language file done.

Todo
- Admin configuration page to control filetypes, require login to upload, and any other settings.
- Link to the file for download on the order page.
- Non javascript upload using cart page instead of ajax upload (1/2 done at the moment).

Maybe will be released today in time for halloween ::)
You are the man....

Re: File Upload mod for v1.x?

Posted: Sat Oct 31, 2009 8:35 pm
by Qphoria
readyman wrote: Maybe will be released today in time for halloween ::)
Hmm... will it be a trick... or a treat! ??? Image

Re: File Upload mod for v1.x?

Posted: Sat Oct 31, 2009 11:40 pm
by Silver
amazing news :)

Re: File Upload mod for v1.x?

Posted: Sun Nov 01, 2009 11:21 pm
by readyman
File Upload options added...
You can get the updated Text and file upload options add-on here.
http://bit.ly/4ufLxj

Re: File Upload mod for v1.x?

Posted: Mon Nov 02, 2009 12:50 am
by zone97
Good job.

I have a few questions. Everything seems to be working, I just need to customize some files again.

1> How do you get to view the uploaded image? can a link to it be added to the order summary in the admin order page?
2> Can you add other file types? Such as PNG?

Code: Select all

add under line #138 "png" => "image/png",
3> Anyway to check that an image is uploaded before allowing them to add to cart? In my business if they do not upload an image we can not sell the product.

4> In the product view template, can the "Please enter the following details:" text and box be removed unless the option is in use? I know the code says isset? but doesnt seem to work. I tried with your tpl and my modified one and its the same.

Bug?

1> I noticed after all is said and done (adding the mod that is...) that none of my items that once had standard options no longer had those? does this mod override that? do we have to re-add options?

Re: File Upload mod for v1.x?

Posted: Mon Nov 02, 2009 2:35 am
by zone97
zone97 wrote:Good job.

Bug?

1> I noticed after all is said and done (adding the mod that is...) that none of my items that once had standard options no longer had those? does this mod override that? do we have to re-add options?
Couldn't edit my last post for some reason? But i solved this one as well. You added a mode function to sql and as such standard options no longer show up unless you go into my sql and add select as the mode for that items option.

Re: File Upload mod for v1.x?

Posted: Mon Nov 02, 2009 8:15 am
by readyman
"<b>Please enter the following details:</b><br />" section, can just be deleted from the template altogether. It's only showing if the text options array exists (& it always does, even if it's blank).
Ummm... Try this instead above the existing <?php if (isset($txtoptions)) { ?>

Code: Select all

<?php if (!empty($txtoptions) || !empty($uploadoptions)) { ?>
<b>Please enter the following details:</b><br />
<?php } ?>
            <?php if (isset($txtoptions)) { ?>
This will only display if there are either textoptions or uploadoptions set.

Re: File Upload mod for v1.x?

Posted: Mon Nov 02, 2009 8:19 am
by readyman
IMPORTANT for NEW INSTALLATIONS - Yes, if your previous options are not showing, it's because this mod is looking for the mode in the database tables. I've made the 'normal' options as 'select' in the mode column.

So add 'select' (without the quotes) to your mode column for all your existing options. It would be wise to add these before adding any text or upload options.

## Upgrading from textoptions
If you have the previous text options module installed (without upload) you don't have to do anything to your database. Just upload the new files.

Re: File Upload mod for v1.x?

Posted: Wed Nov 04, 2009 2:31 pm
by zone97
Anyone using this? Does yours work with IE6 or IE7?

Re: File Upload mod for v1.x?

Posted: Wed Nov 04, 2009 2:38 pm
by readyman
I tested it on IE7... I got one support query that it was crashing the browser that was IE6, but it's the same uploader that was used in opencart, soooo..... I'll look into it.

Re: File Upload mod for v1.x?

Posted: Thu Nov 05, 2009 12:24 am
by Silver
Hi very nice script mate, but required login didn't working.

marked or unmarked user can upload any type of file.

I follow steps on install.txt but something is wrong.

thanks

Re: File Upload mod for v1.x?

Posted: Fri Nov 06, 2009 1:30 pm
by readyman
There's issues in the product.tpl file at the moment. If you wait a day or two, I'll upload a new zip file.

Re: File Upload mod for v1.x?

Posted: Fri Nov 06, 2009 1:32 pm
by readyman
marked or unmarked user can upload any type of file.
Do you mean, logged in or not logged in can upload? It's validating the filetype, so I don't think you can upload any type of file. What's your server/browser setup there?

Re: File Upload mod for v1.x?

Posted: Sat Nov 07, 2009 5:47 am
by Silver
sorry for bad English.

I'm trying to say : if user is logged or not he can upload. I know the file would not be uploaded if he is not logged but message saying "your file was send" "name of file Uploaded" come always.

I think the right would be:

if user not logged = message comes saying please log-in for upload.

if user send a file that not supported = message comes saying this type of file is not supported.

Thanks a lot

Re: File Upload mod for v1.x?

Posted: Sat Nov 07, 2009 7:17 am
by zone97
This works fine on my side, I can select an image to upload then I get a messages that i must be logged in.

Re: File Upload mod for v1.x?

Posted: Sat Nov 07, 2009 8:31 pm
by Silver
zone97 wrote:This works fine on my side, I can select an image to upload then I get a messages that i must be logged in.

strange.

I never received this message.

I followed the install procedure and I never got this message.


Thanks