Zen Cart Logo
Forums / General Questions / Additional IMages

Additional IMages

Locked

Views: 1,104

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
21 Dec 2009, 11:26 PM
#1
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Additional IMages

Hi All,

Quick Question. I name my images the model number. However some products are model number PCA-223 & another PCA-223A

When viewing the page PCA-223 both images appear.

I need additional images turned on as I use them but all additional images are suffixed with _01 _02 etc.

What can I do?

22 Dec 2009, 11:05 AM
#2
tino_schlegel avatar

tino_schlegel

Totally Zenned

Join Date:
Nov 2007
Location:
Melbourne, Australia
Posts:
532
Plugin Contributions:
0

Re: Additional IMages

  1. Change the way how zencart looks for additional images. Maybe allow only the underscore as a delimiter for additional images. in /includes/modules/additional_images.php or similar

or

  1. Change your names so that one is not part of onther product's image name.
22 Dec 2009, 5:21 PM
#3
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Additional IMages

Hi,

I am trying to edit module/additional_images.php but cannot get it to work.

Does anyone now what code to change?

thanks

22 Dec 2009, 5:30 PM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Additional IMages

It would probably be much easier to rename the images. For example, rename PCA-223A to PC-A-223A. It'll still be readable for you, but Zen Cart will see it as completely different from PCA-223.

22 Dec 2009, 5:38 PM
#5
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Additional IMages

The problem is there are a lot of images all with there model numbers so it would take a lot of effot to rename them all. surely it must be possible..

22 Dec 2009, 6:00 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Additional IMages

WHen a product's images are in a subfolder like /images/books/ instead of /images/, the _ is required as an additional images delimiter. Finding the code that does that would be a first step to making it required everywhere.

22 Dec 2009, 6:00 PM
#7
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Additional IMages

I use the model number as the image name on my website too, if you want to go that route you should consider splitting the images folder into sub folder, in my case I have a different folder for each brand.

Second you can download a utility tool that will do bulk rename for you, I am using bulk rename utility its free and does wonder.

Or you can change the way Zen Cart handle the image name. I am using image handler so I changed the additional image reference from (-) to (_).

22 Dec 2009, 6:04 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Additional IMages

That brings to mind that a simple fix would be to move all product images to a subfolder. Even if they are all in one place, the fact that they are in a subfolder will force the _ distinction.

22 Dec 2009, 6:09 PM
#9
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Additional IMages

By the way you can change the (-) to something else it can be done in modules/additional_images.php around line 28

    $products_image_match = str_replace($products_image_extension, '', $products_image_match) . '_';