Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Click to enlarge" image location?


cornflame

Recommended Posts

Hi,

Where are the LARGE images located? When a imges shows in the store and it says "Click to enlarge" where do I load the large images to? or adjust the image to be larger? And if they are just adjustments how do I make the imges small and show a larger image such as a 300x400....

Thanks

Link to comment
Share on other sites

all images are small | big whatever.

by default the image size is nothing more than it being defined in html code.

you can set sizes in your admin --> images

 

if you leave either hight or width empty and set calculate image size to true, images are automaticaly adjusted in size to its original proportions.

Link to comment
Share on other sites

Hi,

Where are the LARGE images located? When a imges shows in the store and it says "Click to enlarge" where do I load the large images to? or adjust the image to be larger? And if they are just adjustments how do I make the imges small and show a larger image such as a 300x400....

Thanks

 

Cornflame (cute name!),

 

I am not satisfied to stuff a 300x400 into 100x133 thumbnail size because the photo clearly looks stuffed. I found this tip by accident and it made me very happy :) Of course, if you have more than one photo per product, This suggestion may not work for you :)

 

jon

 

--------------------------

http://www.oscommerce.com/community/contri...earch,thumbnail

--------------------------

"By changing the image name within product_info.php, you can specify a different image to display.

 

For example, in catalog/images you have two images, identical except one is bigger that the other:

Image1A.jpg 100x100 pixels big.

Image1B.jpg 500x500 pixels big.

 

In your products display, you use Image1A.jpg as your thumbnail image. When people click on the link and enter the product info page, product_info.php changes the image it looks at by taking the image name (Image1A.jpg) removing the last 5 characters (A.jpg) and adding "B.jpg" instead, which makes the page display Image1B.jpg.

 

Here's how to do it:

 

1. BACKUP!

2. Open product_info.php and look for:

 

document.write('<?php
echo '<a href="java script:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
?>');

3. Replace this with:

 

document.write('<?php
$product_substr = $product_info['products_image'];
$product_substr = substr($product_substr,0, strlen($product_substr) - 5) . "B.jpg";
echo tep_image(DIR_WS_IMAGES . $product_substr, addslashes($product_info['products_name'])); ?>');

What this does is:

a) Displays ImageB.jpg

B) removes the link "click to enlarge"

c) Changes the image, so that it doesnt link to the pop up window.

 

REQUIREMENTS:

1. The naming convention of images is important so that the correct number of characters are removed and replaced by the right characters.

2. Images are stored in catalog/images (This can be changed, but I haven't had the chance to experiment with that)."

It's all just ones and zeros....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...