Forums / Addon Admin Tools / Image Manager addon

Image Manager addon

Views: 93,066

Results 241 to 260 of 284
9 Mar 2012, 1:31 PM
#241
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Image Manager addon

I'm wondering why this mod isn't replacing the image upload section of the products add page in the first place? This would avoid even more clicks.

...just a thought.

15 Mar 2012, 3:22 PM
#242
l0st1 avatar

l0st1

New Zenner

Join Date:
Mar 2012
Posts:
11
Plugin Contributions:
0

Re: Image Manager addon

Thanks for your hard work with this add on. I have now been able to upgrade to zencart 1.5. thanks to you. Everything seems to work quite well with maybe one exception. Should I be able to see the addtional images that I've uploaded from the admin area? I'm sorting with the image i.d., tried with and without errors, and have tested - uploading additional images works, but I can't see or delete them(both the pre-existing additional images, or the new ones) from admin. I'm assuming that I've missed something. They show up in the cart as expected.
Thanks in advance.

15 Mar 2012, 5:20 PM
#243
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

l0st1:

Thanks for your hard work with this add on. I have now been able to upgrade to zencart 1.5. thanks to you. Everything seems to work quite well with maybe one exception. Should I be able to see the addtional images that I've uploaded from the admin area? I'm sorting with the image i.d., tried with and without errors, and have tested - uploading additional images works, but I can't see or delete them(both the pre-existing additional images, or the new ones) from admin. I'm assuming that I've missed something. They show up in the cart as expected.
Thanks in advance.

Thank you!

Did you use IM to upload the additional images?
Try to filter in IM on a product ID that certainly has additional images. What shows up now?

Boudewijn

Boudewijn Sjouke
http://www.chinesedingen.nl

15 Mar 2012, 6:08 PM
#244
l0st1 avatar

l0st1

New Zenner

Join Date:
Mar 2012
Posts:
11
Plugin Contributions:
0

Re: Image Manager addon

boudewijn:

Thank you!

Did you use IM to upload the additional images?
Try to filter in IM on a product ID that certainly has additional images. What shows up now?

Boudewijn

Thanks for your help.
I tried with a product with 12 images first, previously uploaded, then added one with IM, then tried with a product with no additional images that I used IM to upload. I still see no additional in the admin area. I'll try with a new, test product next. Is it possible this could be an upload error of one of the php files? My connection has been trouble. If so, which would it be?

15 Mar 2012, 9:48 PM
#245
l0st1 avatar

l0st1

New Zenner

Join Date:
Mar 2012
Posts:
11
Plugin Contributions:
0

Re: Image Manager addon

l0st1:

Thanks for your help.
I tried with a product with 12 images first, previously uploaded, then added one with IM, then tried with a product with no additional images that I used IM to upload. I still see no additional in the admin area. I'll try with a new, test product next. Is it possible this could be an upload error of one of the php files? My connection has been trouble. If so, which would it be?

I'm not certain what the problem is with the two products that I used to test. They happen to both be linked and are in the same category if that matters. I'm testing in a copy of the cart with the admin area/catalog not using secure server, and I'm in a different operating system at the moment and all of the other products that I've checked seem to be working.:wacko:
Thanks for your time, and sorry to waste it.

17 Mar 2012, 8:36 AM
#246
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

l0st1:

I'm not certain what the problem is with the two products that I used to test. They happen to both be linked and are in the same category if that matters. I'm testing in a copy of the cart with the admin area/catalog not using secure server, and I'm in a different operating system at the moment and all of the other products that I've checked seem to be working.:wacko:
Thanks for your time, and sorry to waste it.

No problem!
it does not matter in which category products are. In fact, IM only uses the products image info and the info of what is in the images folder.
Btw what is the filename of the image that refuses to show it's addtionals?

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:06 PM
#247
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

mutinyzoo:

Thanks much for what looks like a terrific add-on, boudewijn.

I can't seem to figure out exactly what Autofix does. Does it apply combined copy/resize to all listed image files?

The script is working wonderfully with ZC 1.5, however when I try to do the combined copy/resize, it creates three greatly degraded images.

I had had IH3 running before I upgraded and it appears that I have removed all the IH3 files, however all of the IH3 line items are still appearing in the Configuration/Images listing. Could this be causing a problem?

Yes, all autofix does, is click on the first combined copy/resize links, over and over again. If you just added 100 products, it saves you 99 clicks.

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:08 PM
#248
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

mutinyzoo:

Okay my mistake not removing Image Handler (IH3) BEFORE upgrading to ZC1.5.

Ended up having to remove files manually and alter database through phpmyAdmin (Cpanel), using two SQL statements from the remove_image_handler function:

DELETE FROM zen_configuration WHERE configuration_key = 'LARGE_IMAGE_MAX_WIDTH' OR
configuration_key = 'LARGE_IMAGE_MAX_HEIGHT' OR configuration_key = 'SMALL_IMAGE_FILETYPE' OR configuration_key = 'SMALL_IMAGE_BACKGROUND' OR configuration_key = 'WATERMARK_SMALL_IMAGES' OR configuration_key = 'ZOOM_SMALL_IMAGES' OR configuration_key = 'ZOOM_IMAGE_SIZE' OR configuration_key = 'SMALL_IMAGE_QUALITY' OR configuration_key = 'MEDIUM_IMAGE_FILETYPE' OR configuration_key = 'MEDIUM_IMAGE_BACKGROUND' OR configuration_key = 'WATERMARK_MEDIUM_IMAGES' OR configuration_key = 'MEDIUM_IMAGE_QUALITY' OR configuration_key = 'LARGE_IMAGE_FILETYPE' OR configuration_key = 'LARGE_IMAGE_BACKGROUND' OR configuration_key = 'WATERMARK_LARGE_IMAGES' OR configuration_key = 'LARGE_IMAGE_QUALITY' OR configuration_key = 'WATERMARK_GRAVITY' OR configuration_key = 'IH_RESIZE' OR configuration_key = 'SHOW_UPLOADED_IMAGES';

Second Statement:

UPDATE zen_configuration SET configuration_value='REMOVED' WHERE configuration_key = 'IH_VERSION';

Maybe the two above statements could be combined, but I'm not sure.

(zen_configuration is the table name in the database and could have a different prefix ie: my_configuration)

Actually this is IH and not IM. Best is to post this in the IH support thread.....

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:10 PM
#249
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

mutinyzoo:

Both Combined copy/resize and Autofix seem to be making the small image (600px wide and @ 150kb) small BEFORE creating the medium and large images, which is resulting in all the images being pixilated.

So am able to create "large" image, but then the option to resize the small one doesn't seem to be offered.

If this happens, something else is wrong. The order is:

  1. copy to large, resize/watermark large
  2. copy to medium, resize/watermark medium
  3. resize/watermark small

Watermarking only takes place if a watermark image is in place, see the image_manager.txt file.

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:15 PM
#250
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

familynow:

Hi.

Is there any way I could ask to have the re-upload forced on large like it is on small?

Actually, I guess I should explain why I'm trying to do this...I get alot of ppl who don't know how to exit the js when the LRG isn't present. I fear this will hurt sales over the long run by frustrating shoppers. So I guess perhaps a simpler solution might be to figure out a way to tell ZC if it doesn't find a LRG just use the small?! OR have a 'copy2large' link in IM for any image you already know won't be larger than the small.

  1. No, images can only be uploaded as small images, and from there replace the existing medium and large version of the image.

  2. This is a coding issue in the front end (shop), where the images are gathered for display. As IM only acts in the back end (admin), IM cannot fix this.

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:19 PM
#251
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

familynow:

I'm wondering why this mod isn't replacing the image upload section of the products add page in the first place? This would avoid even more clicks.

...just a thought.

That is by design. When I started developing IM, I decided to make it an add-on (only additional code files) instead of an add-in (altering existing code). Basically IM is meant to maintain existing images, although later a link was added to upload new additional images. This was done because this function is not present in ZC.

However, I'll keep your suggestion in mind, thanks!

Boudewijn Sjouke
http://www.chinesedingen.nl

17 Mar 2012, 9:21 PM
#252
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

It seems I missed some posts lately, and I hope I answered all above here. If you are still waiting for an answer, please let me know.

Boudewijn Sjouke
http://www.chinesedingen.nl

20 Mar 2012, 2:24 PM
#253
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Image Manager addon

boudewijn:

It seems I missed some posts lately, and I hope I answered all above here. If you are still waiting for an answer, please let me know.

Hi. No worries. This one's a bit lengthy....

I posted here a question about re-uploading images to LRG that are not actually LRG. In a nutshell, many of my images are quite small and so they never actually need resizing from LRG, MED to small. Nevertheless, I need those images in place because people get stuck not realizing they can hit ESC to exit when there is no larger image view available.

My problem is that I can't apply a blanket solution in that there are many images that do have larger LRG files attached. I have no problem combining through IM, clicking upload and attaching a new "small" image to LRG. however, it's almost impossible to accomplish this task without IM. so far, I've done a 'diff folderA folderB' but the list is painfully long.

hopefully this makes more sense to you then it does when I reread myself ;)

20 Mar 2012, 2:48 PM
#254
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

familynow:

Hi. No worries. This one's a bit lengthy....

I posted here a question about re-uploading images to LRG that are not actually LRG. In a nutshell, many of my images are quite small and so they never actually need resizing from LRG, MED to small. Nevertheless, I need those images in place because people get stuck not realizing they can hit ESC to exit when there is no larger image view available.

My problem is that I can't apply a blanket solution in that there are many images that do have larger LRG files attached. I have no problem combining through IM, clicking upload and attaching a new "small" image to LRG. however, it's almost impossible to accomplish this task without IM. so far, I've done a 'diff folderA folderB' but the list is painfully long.

hopefully this makes more sense to you then it does when I reread myself ;)

Do I understand correctly that in fact you want to use the same size image for small, medium and large, if only a small size original image is at hand?

In that case you may fool IM by setting the config values for medium and large images to the same values as small images. See image_manager.txt how to do this. IM should consider the image large enough to copy it to medium and large, et voila.
I didn't test this myself, but there is a good chance it will work.
And don't forget to put the old config values back to their original values when you're finished :smile:

Please let me know it this work-around works out!

Boudewijn Sjouke
http://www.chinesedingen.nl

20 Mar 2012, 3:28 PM
#255
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Image Manager addon

First off, thanks for the quick reply!

boudewijn:

Do I understand correctly that in fact you want to use the same size image for small, medium and large, if only a small size original image is at hand!

Yes...Well, hm. Sort of. I need to do this only for products which are missing LRG images. A bit of background may be in order here...I wrote a slapstick script that incorporated imagemagick's mogrify and then ftp'd the results to my images folder. Somehow(not that surprising since I can't actually write scripts ! :)), the images that didn't get resized to smaller ratios didn't get uploaded. I'm guessing it's because they weren't 'touched'. Anyway...the result is that I'm missing TONS of LRG images. Almost all of which are images that would not have a larger size. Hence them not being touched by my script. Even if they did have larger originals, I have enough product turn-around not to care if the image isn't actually larger when the customer requests it. The script was a one time thing to get me started when we first added product (I had ~1,000+ images to handle in one go).

I just need to avoid that dreaded loop they don't understand how to exit from.

So...If I implement your suggestion(which I think I understand) will IM still know there is a missing LRG?

20 Mar 2012, 3:47 PM
#256
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

familynow:

So...If I implement your suggestion(which I think I understand) will IM still know there is a missing LRG?
Yes, IM will.
Best you can do is try this with one image, that will take no more than 5 minutes.
Keep in mind, that altering the config values will NOT make IM change all existing images. Unless you tell it to of course.

Another option is to change the ZC code. In includes/modules/main_product_image.php, the variables containing the different size image names are built. You could add an 'if', checking if the large image file exists, and if not, use the small image file instead. Can be done in one line of code.

Boudewijn Sjouke
http://www.chinesedingen.nl

20 Mar 2012, 3:56 PM
#257
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Image Manager addon

Again, thank you for the quick response.

boudewijn:

Another option is to change the ZC code. In includes/modules/main_product_image.php, the variables containing the different size image names are built. You could add an 'if', checking if the large image file exists, and if not, use the small image file instead. Can be done in one line of code.

I knew that was an option! I just didn't know how or where to do it. I would think most ppl would want this IF statement if not only for convenience but as a generic fail-safe? Speaking of which, I did a little digging and...

// 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)) {
  if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
    $products_image_large = DIR_WS_IMAGES . $products_image;
  } else {
    $products_image_large = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
  }
} else {
  $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
}

Is this not what you're referring to?

20 Mar 2012, 3:57 PM
#258
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Image Manager addon

oh. I think I just realized the above is likely for the product image itself rather than the 'display larger' js function...

20 Mar 2012, 4:07 PM
#259
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

familynow:

oh. I think I just realized the above is likely for the product image itself rather than the 'display larger' js function...

Right. The code is already doing what I suggested....
I just tried and removed a large image, and ZC displayed the medium instead. Just like it should.

What JS do you have for displaying the large images?

Boudewijn Sjouke
http://www.chinesedingen.nl

20 Mar 2012, 4:17 PM
#260
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Image Manager addon

As far as I know, I'm using the stock ZC function to display the larger image. Someone once told me it was a javascript function.

I don't suppose you'd know how I could double check that?