Zen Cart Logo
Forums / General Questions / Image handler replacing additional images on other products.

Image handler replacing additional images on other products.

Views: 626

Results 1 to 7 of 7
28 May 2015, 2:13 PM
#1
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Image handler replacing additional images on other products.

Hi,

We've noticed that images uploaded using the image handler are being added as secondary images to other products.

Could it be to do with images having the same file name when they are being uploaded?

28 May 2015, 2:23 PM
#2
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Re: Image handler replacing additional images on other products.

Looking more into it.

Other products main images are being added to random products additional images.

If we remove the additional image from the products, then it also deletes the main images for the other products. We have no idea why this is happening, but it's causing us a lot of grief

28 May 2015, 2:58 PM
#3
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Re: Image handler replacing additional images on other products.

Right, I found out what is happening!!

The main image file name is "b.jpg"

So any image that starts with "b" is being added. This seems to be an error with code.

28 May 2015, 3:49 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Image handler replacing additional images on other products.

joecooper:

Right, I found out what is happening!!

The main image file name is "b.jpg"

So any image that starts with "b" is being added. This seems to be an error with code.

May seem, but not the case.

See: https://www.zen-cart.com/content.php?211-how-do-i-add-more-than-one-image-of-a-product

28 May 2015, 4:05 PM
#5
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Re: Image handler replacing additional images on other products.

I know how the original method works, it finds images that starts with the same name in order to add them as additional images. You would think that an image handler would support this, and add a unique identifier to the file name in order to prevent this issue.

28 May 2015, 4:10 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Image handler replacing additional images on other products.

You would think that an image handler would support this, and add a unique identifier to the file name in order to prevent this issue.
They are following the naming convention established

28 May 2015, 4:15 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Image handler replacing additional images on other products.

It is also something identified in the documentation.

There are several methods that can be used to prevent this from happening, between filenaming, folder usage, etc...

To add, IH4 is undergoing reviision, code improvements are welcome. See the thread on IH4 which also would have been the more appropriate place to address all of this.