Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Click to Enlarge


dstegall

Recommended Posts

I want to use this feature. Currently, I upload a thumbnail size (150x150) and when you click to enlarge it shows this size. So my question is where or how to I upload the larger size? Do I upload in the add product section and it will automatically resize for the thumbnail size? I have tried this but am having a hard time uploading the larger size. Is it too large? Is there a limit on the size of images to upload? My thumbnails are around 5-6K where the larger sizes are around 50-60K. Thank you!

 

Faithfully,

 

Dawn

Link to comment
Share on other sites

As far as pop_ups..

 

I had to edit some code on this page.

catalog/popup_image.php

 

with this:

 

<body onload="resize();">

<?php

if (strpos($products['products_image'], 'tmbNl'))

{ $flSz_img = str_replace('tmbNl', 'flSz', $products['products_image']);

echo tep_image(DIR_WS_IMAGES . $flSz_img, $products['products_name']);

}

else

{ echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']);

}

?>

</body>

 

I uploaded all images in different folders I created in the images folder. All images are named the same except placed in directories, 'tmbNl' and 'flSz'.

The checked the path with the above code and if 'tmbNl' was present I swapped it with 'flSz'.

 

Since osC's default upload is to the images folder I had to change that as well on the admin/categories page.

 

if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES . 'display/tmbNl/')) {

$categories_image = tep_db_input('display/tmbNl/' . $categories_image->filename);

tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $categories_image . "' where categories_id = '" . (int)$categories_id . "'");

}

 

Sounds like fun huh?

Lloyd

Link to comment
Share on other sites

As fun as that sounds, Lloyd, I'm not sure I want to do all that and more importantly that I will mess it up!

 

Can I just upload the larger item when I add the product and it will automatically resize for the thumbnail size product listing?

 

I'm trying this but I can't make it pass the preview. It won't do anything or I get an error. Any ideas? Thanks.

 

Faithfully,

 

Dawn

Link to comment
Share on other sites

  • 3 weeks later...

Yes, 150k is too large for an image.

 

You need to optimize your images by opening them in your imaging software and saving them at a resolution of 72. Then you need to save your images at or around 400px wide. This insures a good quality image that takes up less space.

 

If you have an image 400px by 300px and saving at a resolution of 72 your image will be around 16k. My larger images of 500px x 400px are under 50k.

 

You then need to upload the larger image and oscommerce does the thumbnailing so when you click to enlarge there is an image to enlarge.

 

 

No 50-60K is not to large, my enlargements are around 150K.

If you are just having troubles uploading it may be your connection.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...