Zen Cart Logo
Forums / General Questions / 2 Problems with 'Additional Images' for Products

2 Problems with 'Additional Images' for Products

Locked

Views: 1,220

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
18 Dec 2008, 5:10 AM
#1
peeplead avatar

peeplead

New Zenner

Join Date:
Dec 2008
Location:
Florence, AL
Posts:
8
Plugin Contributions:
0

2 Problems with 'Additional Images' for Products

Hi All,

I'll discuss problem first, then provide links/info below.

(1) When I view a single product's page, and click on the image in order to display the 'larger image', it instead displays the thumbnail pic. My medium and larger images are both functioning fine, and display when I click on the 'larger image' thumbnails for each respective 'larger image'. Please help me get the primary item thumbnail to display either the Large or Medium image - preferably the Medium. (See more info on file names/locations below)

(2) I would like the link under my 'Medium' image to say 'Medium Image', instead of just 'larger image', as I have three sizes of images, and customers will not be able to see which thumbnail to click for what enlarged image. I found where to alter that text (includes/languages/english.php), only it updates all locations where that text resides, i.e., if I change that code in english.php, instead of displaying "larger image" in three locations (one under each image on the product page), it displays the changed text in three locations. I'd like to differentiate what image thumbnail gets what link text, i.e., Large Image = "Large Image", Medium image = "Medium Image", etc.

MY INFO:

I have more than 1600 products with triplicate images (more than 5600 image files). To make things easy on me, as image file names can be easily found when needed, I have inserted ALL product image files in the same directory: images/products/. I have created the files per the formula below:

  • 'productimagename'.jpg = presized thumbnail, 110p sq.
  • 'productimagename'_MED.jpg = presized medium image, 300p sq.
  • 'productimagename'_LRG.jpg = presized large image, 700p sq.

I have updated several products, and all images are found and able to be displayed. Here is a link to my site: http://www.cowboykicks.com/index.php (domain forwarding is on, and pointing to a construction page, so a direct link is required to reach page...).

18 Dec 2008, 6:04 AM
#2
kobra avatar

kobra

Black Belt

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

Re: 2 Problems with 'Additional Images' for Products

First off you can streamline this and only need "ONE" image if you install the 3rd party module ImageHandler 2

Secondly, if your template Monster template conforms, you can search your files for the variable highlighted

  define('TEXT_CLICK_TO_ENLARGE', 'larger image');

Then knowing the page display(s) you want to alter you will have to create another of the above and edit the page display files to reflect this change

How to find the files:
https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39

Zen-Venom Get Bitten

18 Dec 2008, 6:39 AM
#3
peeplead avatar

peeplead

New Zenner

Join Date:
Dec 2008
Location:
Florence, AL
Posts:
8
Plugin Contributions:
0

Re: 2 Problems with 'Additional Images' for Products

Thx for your quick reply kobra, and thx for the tutorial links. Intermediate developer...beginner zenner... ;)

I think I'm following you...

Going to start by trying to create a new 'term' for the code to refer to when displaying the Additional Image links?

"define('TEXT_CLICK_TO_ENLARGE_MEDIUM', 'Medium Image');"?

I have already found some instances of the original variable, and am going to muddle around a bit.

...However, as I do that - did you have thoughts on my first issue? Why, when I click on the main product image from the product's page, does it display the thumbnail ('product'.jpg) instead of the larger image it should ('product'_LRG.jpg)?

18 Dec 2008, 4:42 PM
#4
kobra avatar

kobra

Black Belt

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

Re: 2 Problems with 'Additional Images' for Products

I have inserted ALL product image files in the same directory: images/products/.

did you have thoughts on my first issue?
I suspect this is a location issue and you did not expound on your complete directory structure(Folders)

Are the large & medium images in folders named as follows?

images/medium/products/
images/large/products/

Again, your template may have some issues with this
Search for "template monster" here to educate yourself on them

Zen-Venom Get Bitten

18 Dec 2008, 8:02 PM
#5
peeplead avatar

peeplead

New Zenner

Join Date:
Dec 2008
Location:
Florence, AL
Posts:
8
Plugin Contributions:
0

Re: 2 Problems with 'Additional Images' for Products

RE: My directory structure;

I had read on several posts that it is optional as to whether or not to put the additional images in their own folders (large in /images/large/, and medium in /images/medium/), OR to just put them all in the same folder (/images/'selected folder'/).

For simplicity (or what I considered simple at the time...) I put all my product images in '/images/products/'. I will test around and see if this template will work better with the alternative strucuture of putting each file size in their own respective folders. Just hadn't tried that yet since I had read it was basically optional...

Thanks again for your reply and help on this kobra :)! Much appreciated!