Re: Image Handler 3 Support Thread
Recently upgraded to IH3 from IH2, but that's irrelevant.
I've got a problem - since the camera my mum uses is set to make a new folder every day (makes it easier to organise things), the names of the files are numbers are saved subsequently. For example, there is a folder from yesterday and a folder for today. 10 photos were taken in both days. In EACH of the folders have the names of the images as '01.JPG' all the way to '010.JPG' in each folder. They collide with each other - I mean like, if I upload a product using the image '38.JPG', then if I ever upload another product called '38.JPG', all of the additional images are added on to that product, creating a problem.
Is there a way around this?
Re: Image Handler 3 Support Thread
The best bet is never to use numeric filenames for exactly this reason. Rename them to something that realtes to the product. this will help in three ways
1. No more overwriting when you upload
2. You can see easily what the photo refers to
3. You can add multiple images to a product easier because fred1, fred2, fred3 etc will always show in the product fred without having to do anything clever
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
kbear
The best bet is never to use numeric filenames for exactly this reason. Rename them to something that realtes to the product. this will help in three ways
1. No more overwriting when you upload
2. You can see easily what the photo refers to
3. You can add multiple images to a product easier because fred1, fred2, fred3 etc will always show in the product fred without having to do anything clever
I'd love to do that instead but unfortunately the only way the camera names images is numerically. I'd name the files separately (well, my mum would), but it involves far too much effort for the prices she sells some of her items (she only has 1 of each product and sells them for like £5.99 each). Isn't there a way around this?
Re: Image Handler 3 Support Thread
Sometimes the camera settings allow you to NOT start the numbering again from scratch - my small cannon certainly does. Check in the preferences menu - or it may be mentioned in the manual
Unfortunately, after that you are stuck, since storing them in multiple subdirectories will mean you have to tell zen cart where to find them each time - for instance when you set up the product, instead of pointing to the main folder to store the picture, you will have to point to the correct sub folder. So you will end up with a structure like
images
images/2012
images/2012/2012-01-01
etc
all of these subfolders could have images in of the same name since IH3 creates its own names to store the resized images I think
Re: Image Handler 3 Support Thread
Thanks a lot for your help, I double checked the camera settings, found an option, changed it and then took a few pictures - they're being named differently now. Thanks! ^^
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
Dothra
I'd love to do that instead but unfortunately the only way the camera names images is numerically. I'd name the files separately (well, my mum would), but it involves far too much effort for the prices she sells some of her items (she only has 1 of each product and sells them for like £5.99 each). Isn't there a way around this?
No.. this behavior is not caused by Image Handler. It's default Zen Cart behavior since the file names is how Zen Cart links additional images to a product.. Please refer back tot he IH3 readme.. We provide a link to the Zen Cart FAQ and other articles on this..
1 Attachment(s)
Re: Image Handler 3 Support Thread
a couple of questions...
1) will this mod allow me to watermark images that have already been uploaded?
2) will this mod allow to to resize images that have already been uploaded?
3) I always like to be safe and compare the source code supplied to what I already have on the site and noticed this dicrepancy?
the module supplied with image handler is on the left and my standard module that it wants to replace is on the right?
any cause for concern before overwriting the standard module?
see attachment
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
jjj0923
a couple of questions...
1) will this mod allow me to watermark images that have already been uploaded?
2) will this mod allow to to resize images that have already been uploaded?
3) I always like to be safe and compare the source code supplied to what I already have on the site and noticed this dicrepancy?
the module supplied with image handler is on the left and my standard module that it wants to replace is on the right?
any cause for concern before overwriting the standard module?
see attachment
1) Yes.
2) Yes.
3) The screen shots are too small to see any detail. If you have any code that conflicts with this mod's code...you will need to merge your files carefully. If you don't know how to do that...best that you hire someone to do it for you. I believe there's a section of the forum that contains a link to a site where one can find individuals proficient in ZC.
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
ScriptJunkie
1) Yes.
2) Yes.
3) The screen shots are too small to see any detail. If you have any code that conflicts with this mod's code...you will need to merge your files carefully. If you don't know how to do that...best that you hire someone to do it for you. I believe there's a section of the forum that contains a link to a site where one can find individuals proficient in ZC.
thanks - I've already merged what needs to be merged.
the code on the right that's not in the module supplied with this mod is:
PHP Code:
$products_image_base = preg_replace('/'.$products_image_extension.'/', '', $products_image);
$products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
$products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
// check for a medium image else use small
if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
$products_image_medium = DIR_WS_IMAGES . $products_image;
} else {
$products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
}
// check for a large image else use medium else use small
if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
$products_image_large = $products_image_medium;
} else {
$products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
}
which is replaced in the new module supplied in this mod with just the following:
PHP Code:
$products_image_base = preg_replace('/'.$products_image_extension . '$/', '', $products_image);
$products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
$products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
I use Beyond Compare from Scooter Software to compare modules - it's great and the free trial never expires.
Re: Image Handler 3 Support Thread
Just follow the install instructions and you'll be fine..
Quote:
Originally Posted by
jjj0923
thanks - I've already merged what needs to be merged.
Oh it eventually expires.. just takes a long time because of the way they count the number of trial days.. Invest in the software.. worth the cost.. Free updates.. (something the trial version doesn't get you)
Quote:
Originally Posted by
jjj0923
I use Beyond Compare from Scooter Software to compare modules - it's great and the free trial never expires.