Image Upload

Miscellaneous Actinic / SellerDeck patches and anything not covered above.
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Image Upload

Post by Jeff P »

Norman:
About ready to proceed with the Image Upload patch and a question came to mind. Is there any way to link the Image Upload with the Dynamic Image patch?

So, if a person selected a particular shape item...a square instead of a rectangle...that would become the recipient of the image. Or, would each shape, size, etc. have to be a different product?

Also, for apparel could the Dynamic Image change and let them see their design on a red shirt or a white shirt, etc.?

While waiting for your response I'll check with host regarding PHP availability.

Thanks.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Both might be possible but only with a huge amount of unique (and thus very expensive) customisation.

It would cost many hours of time just to even estimate how much work this would involve.
Norman
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Then let's just leave well enough alone. I'll transfer the funds via PayPal.

Look forward to adding this to the site.

Jeff
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Problem in installations

Post by Jeff P »

Norman:
Followed instructions, created a product to test the 'simple' method. Get the pop-up upload image window but then get a 404 Resource Not Found message.
Checked and the file imageuploadfilename.php is in the acatalog directory.
You can see the test for yourself at

http://solutions-marketing.net/acatalog ... Items.html

Since you know what you're doing...what did I do wrong.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

The upload form image_upload_form.html (which works) posts it's data to image_upload.php (which does not appear to be on your server in the acatalog directory). Make sure this bit (which may be omitted from the file I sent you) from the ReadMe has been done:-
In Actinic go to Advanced / Additional Files and add the files

image_upload.php

In addition you need a "tmp" directory off your servers acatalog one. This doesn't seem to be there. You should manually FTP to your sites acatalog directory and create a "tmp" directory off that. I may have missed this essential bit of info from the ReadMe. Sorry for that. I'll amend the master ReadMe now.
Norman
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Thanks...will give it a go when I get back later this p.m. Will advise if problems or working.

Jeff
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Norman:
Did both steps. Uploaded as additional file image_upload.php and went to my control panel and created /tmp subdirectory in the acatalog directory. Get a string of error messages which flash in the popup way to quick to read and are then gone.
What have I done wrong...again!!! :roll:
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Hi, Jeff

Everything seems to be in place but we're hitting a permissions problem. The folder in tmp you've created is there, but isn't writable to by the PHP scripts we're running.

The alternative is that the "owner" of this tmp directory needs changing to the same user as the scripts are running under.

If you know what I'm talking about you'll probably know how to fix it.

If not, it might help to explain the above to your server admin and see what they suggest.
Norman
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Phew! I see that it's working now.

Again, I send my apologies for missing those steps in the installation readme.

I stood outside in a sleet storm for my penance :!:
Norman
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Strike up the band...pip pip...voila (forget that it's French). It was the permission on the tmp file. It defaulted to 775 and needed to be 777.

Next ?problem?: My product manufacturer wants files at least 2 meg. Procedure currently has 500k limit and did reject one image I wanted to test. Is this a problem to remove?

Finally--well, for now anyway...if someone uploads an image, decides they don't like the way it looks and wants to upload another one...here's what happens: it transmits the picture but doesn't replace the first one uploaded. Message says transfer completed but Lord knows where it went. The only way I could make the change was to shut the browser and reopen...probably closes the session cookie or something. Any thoughts?

If you want to see how they handle it...https://www.crystal-album.com/step1.aspx

If there's a cost to my needs...let me know and, hopefully, we'll be able to afford it.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Hi, Jeff

Image not refreshing: This is because the "Product" that you've attached the image to isn't a buyable product. The Cart and Quantity fields need to be displayed for the patch to work. Try making a normal product using the image upload template.

Upload file size. This can be changed. Unfortunately it needs to be done in several places.

in image_upload_form.html look for the lump

Code: Select all

    <input type="hidden" name="MAX_FILE_SIZE" value="520000" />
    <input type=hidden name=prodref value="" />
    <!-- Name of input element determines name in $_FILES array -->
    Use my image (JPG only - maximum file size 500Kb):
change the 520000 to 2048000 (or whatever). Also change the informative 500Kb

then also look in image_upload.php and change the line

Code: Select all

$maxfilesize = 500;   		// amend this if requirements change
to be

Code: Select all

$maxfilesize = 2000;   		// amend this if requirements change
Note that PHP installations impose a limit on the maximum file size that can be uploaded. The default is usually 2Mb but it may be different on your server. Here's a quote from the PHP manual
The MAX_FILE_SIZE item cannot specify a file size greater than the file size that has been set in the upload_max_filesize ini-setting. The default is 2 Megabytes.
Norman
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Will get to the changes post haste and let you know. Will contact host to see if they can alter the php default.

Standing outside in a sleet storm isn't penance...it's cruel and unusual punishment and heartily NOT endorsed by this party...especially for people who can write the kind of code you can. We--the Actinic community--need you healthy.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Will get to the changes post haste and let you know. Will contact host to see if they can alter the php default.

Standing outside in a sleet storm isn't penance...it's cruel and unusual punishment and heartily NOT endorsed by this party...especially for people who can write the kind of code you can. We--the Actinic community--need you healthy.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Hi, Jeff

In from the cold now and I've also noticed some unusual behaviour on your site.

PHP is meant to create a unique filename for every file uploaded. This doesn't seem to be happening on your site as subsequent uploads seem to overwrite prior ones. I've never seen this behaviour on other sites. Again, this may be something you will want to ask your hosts about.
Norman
Jeff P
Posts: 35
Joined: Mon Jan 09, 2006 3:55 pm
Location: US
Contact:

Post by Jeff P »

Okay...edited the two items. My host has no limit on php file size so I set it at 4096kb and it works fine.

Image is not passing to the cart, however. Is that because I'm using the simple method or is there a glitch somewhere?

Also, in order to see a second image uploaded you have to reload the page. Is there a simple line of code that would automatically reload the page after an upload is completed?

It's a real treat to see it working Norman and now I have to find lots of products that can be done in this one-of-a-kind fashion.
Jeff Pollack
http://www.alldawgs.com
http://www.profleeceusa.com
(coming)4dogclubsonly.com
Post Reply