Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

enlarged images


chamtech

Recommended Posts

Hi,

 

After reading few of comments and suggestions regarding enlarging the images here is what I have done so far:

 

1) Created a sub-directory named images_big under images

2) For testing purposed, edit an existing images (product_id number 2) named skin_2

3) Using Photoshop edited and created another image from skin_2.jpg which is (80 W, 86 H) pixel to (275 W, 227 H)

4) Named that image skin_2.jpg and placed it in /images/images_big directory

5) Modify the popup_image.php

...

define('IN_IMAGE_SUBDIR','images_big/');

// maybe you have to remove '/'. or adjust the path, depends on your configuration

if (is_file(DIR_FS_CATALOG.'/'.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'])){

$image=DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'];

//echo DIR_FS_CATALOG.'/'.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'];

}

else{

$image=DIR_WS_IMAGES.$products_values['products_image'];

//echo DIR_FS_CATALOG.'/'.DIR_WS_IMAGES.$products_values['products_image'];

}

echo tep_image($image, $products_values['products_name']);

...

 

6) Modify the resize function

function resize() {

if (navigator.appName == 'Netscape') i=40;

// if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);

if (document.images[0]) window.resizeTo(document.images[0].width +190, document.images[0].height+160-i);

self.focus();

}

 

7) Configuration->images

 

Title Value Action

Small Image Width 85

Small Image Height 76

Heading Image Width 75

Heading Image Height 67

Subcategory Image Width 84

Subcategory Image Height 72

Calculate Image Size true

Image Required true

 

Visit My Website

 

After all these modification, the images are not enlarged and the resize is not working properly either.

 

Any help is appreciated

 

Thanks

Link to comment
Share on other sites

I think you trtied to do too much. Here's a post for enlarging images.

 

BIG thanks to cymonguk

 

Ok so in catalog/includes/ configure.php

 

1. you need to define the folder that will show the enlarged images

 

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_IMAGES2', 'images2/'); <-- images2 is my folder where enlarged images go

 

2. Change this line in popup_image.php

 

<body onLoad="resize();">

<?php echo tep_image(DIR_WS_IMAGES2 . $products_values['products_image'], $products_values['products_name']); ?>

</body>

 

Where it use to only say DIR_WS_IMAGES , change it to DIR_WS_IMAGES2

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

Topic discussion >> http://www.oscommerce.com/forums/index.php?showtopic=211617

Link to comment
Share on other sites

Bryce,

 

I am going to try your suggestion and see if it works. I am now having database connectivity issues with my site which I have to take care first.

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...