Guest Posted July 27, 2003 Posted July 27, 2003 Hello everyone, after searching 125 matches and not finding the right answer I hope that you can help a rookie on OSCommerce. Here is our problem: Our preview pictures have a size of 70 x 70 px - the regular pictures have a size of 300 x 400 or 250 x 250. We like to save both picturesizes in seperate files on our servers e.g. images imagespreview to filename will be the same. Our regular pictures have a size of 9kB - the preview pics of 1.2 - 2kB so the loading time will be much quicker. Does anybody of you have experience with that - or know what kind of files I have to change? Thank you for your response. Regards from Germany Markus
Guest Posted July 27, 2003 Posted July 27, 2003 there are a number of ways to go about this. One way is to install a contribution that allows big images and small images and define the directory on upload. But if you have a more or less original configuration the easist and quickest way to acheive this is to open popup_image.php and replace <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?> with <?php echo tep_image(DIR_WS_IMAGES . 'large_images/' . $products['products_image'], $products['products_name']); ?> which assumes that your previews are in images and the larger images are in images/large_images if you want to be clever with this and check to see if there is a larger image available you could do: if (file_exists( DIR_WS_IMAGES . 'large_images/' . $products['products_image'] )) { <?php echo tep_image(DIR_WS_IMAGES . 'large_images/' . $products['products_image'], $products['products_name']); ?> } else { <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?> }
Guest Posted July 27, 2003 Posted July 27, 2003 Thank you Meltus, that brings me on the right way... now I have to change all my pictures... :D but I will get better loading times... Take care Markus
Recommended Posts
Archived
This topic is now archived and is closed to further replies.