Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

image size problem


ed.advertise

Recommended Posts

Hello,

we transfered our shop from one to another hosting and in product info the basic image is taken wrong. it should take image like product1-160x160x.jpg, but it displays only product1.jpg which has bad dimensions and the proportions are wrong and the image is for example heighter than it sholud be.

we didn't change source files and i don't know, ehy it doesn't take the right image file.

 

can anyone help?

Link to comment
Share on other sites

The product_info page displays product images according to the database values (file path) received from the table 'products' row 'products_image'.

You can check the database entry for the product_id and then read the file path. Is it correct??

If not try resetting the image for the product in your Admin Panel first - Catalog - Categories/Products - edit product.

 

If the database entry is correct for the product then you have a file path issue in your configuration file.

'catalog/includes/configure.php'

Lloyd

Link to comment
Share on other sites

The product_info page displays product images according to the database values (file path) received from the table 'products' row 'products_image'.

You can check the database entry for the product_id and then read the file path. Is it correct??

If not try resetting the image for the product in your Admin Panel first - Catalog - Categories/Products - edit product.

 

If the database entry is correct for the product then you have a file path issue in your configuration file.

'catalog/includes/configure.php'

 

 

the database is the same like on the old hosting, so the images names are right. but in the database, there are filenames without - 160x160.

i don't know, how the shop is programmed, that it takes the original filename and adds 160x160 part, which is created when a new product is added. asi i wrote, on old hosting product.info takes product1-160x160x.jpg file and on the new hosting only product1.jpg. i just don't get it.

Link to comment
Share on other sites

Is the 160x160x the height and width of the image?

 

You are saying that on your old hosting this was appended to the image name when you uploaded the image - so that means that every image for every product has the size appended to the image name?

Lloyd

Link to comment
Share on other sites

yes, it is the width and height, but the shop makes the file automatically during the upload..

to one product, there are at least 3 images, for example:

Excellanc_dam_hnede_ps.jpg

Excellanc_dam_hnede_ps-100x80.jpg

Excellanc_dam_hnede_ps-160x160.jpg

 

shop on old hosting was taking Excellanc_dam_hnede_ps-160x160.jpg in product_info page, transfered shop is displaying Excellanc_dam_hnede_ps.jpg.

i transfered all datas and the database, so i don't get it, why it is now not displaying the right file.

Link to comment
Share on other sites

I do not know why the old store appended the image size to your image names. It should not have..

 

Are there three product id's as well as three images for the same product?

How did it apply three images to the same product?

 

If you look in your Admin Panel Configuration/Images you will see the height and width of displayed images.

Small and large.

 

These sizes should be setting the image dims.

 

Check in the Admin Panel for the image specified for the product - is it the correct one - are there three products for the same product?

If not to both - all I can say is to reload the correct image.

 

By the way - you did check the file paths in your config file since the move?

Lloyd

Link to comment
Share on other sites

there is one product one id and shop is making a new file with dimensions for thumbnails..

 

here is the concrete problem:

product on old hosting:

http://www.chronoplus.net/product_info.php...83iq9usipu0i205

and product on new one:

http://24e-shop.cz/product_info.php?cPath=...products_id=685

 

as you can see, the image on new is displayed bad. and if you look on the properties of the image, on the old hosting it is:

http://www.chronoplus.net/images/Excellanc..._ps-160x160.jpg

and on the new:

http://24e-shop.cz/images/Excellance-damsk...tradicni_ps.jpg

 

i think the paths are set correct, or it wouldn't work at all..

Link to comment
Share on other sites

If you look in your Admin Panel Configuration/Images you will see the height and width of displayed images.

Small and large.

 

Check the settings 'Small Image Height' and 'Small Image Width' - try changing to 160, 160.

 

It seems that you have uploaded large images for your products, these will display fine when a small product image is clicked on to display the enlargement.

When the same image is compressed you will lose some quality in the browser - browsers are not image editing programs - they can only resize the image with no affect on pixel improvement.

If you click on both images - both websites - you will see the same picture - so apparently, for some reason the old website is producing a better compressed image than the other - may be in server php.ini settings, I dont know.

 

What you can do is upload better quality thumbnails for the products then edit the 'catalog\popup_image.php' page to display the enlargement on click.

This is what I did on my website:

<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']);

}

?>

 

I placed the words 'flSz' or 'tmbNl' in my images then searched for 'tmbNl', if present - switched it to 'flSz' and opened.

Such as:

flSz_picture-1.jpg

tmbNl_picture-1.jpg

Lloyd

Link to comment
Share on other sites

If you look in your Admin Panel Configuration/Images you will see the height and width of displayed images.

Small and large.

 

Check the settings 'Small Image Height' and 'Small Image Width' - try changing to 160, 160.

I just took a look at the image in photoshop - if you want to keep the same proportions for that thumbnail you should change the settings to:

Height:120 Width:160

Lloyd

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...