Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image on product info page


Guest

Recommended Posts

Hi everyone.

On the product listing page i have set the size of the product images to that which is perfect for my design, i did this in the admin > images section.

Howver when the product is clicked to display the product details using the product info page, the image is the same size, when i increase it in the admin panel, the size of the images on the product listing pages also increases.

Is there a way to set the sizes of these images seperatly?

Many thanks.

Link to comment
Share on other sites

In product_info.php just replace SMALL_IMAGE_WIDTH (image width) and SMALL_IMAGE_HEIGHT (image height) with any size you want (in pixel).

Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent...

Link to comment
Share on other sites

In product_info.php just replace SMALL_IMAGE_WIDTH (image width) and SMALL_IMAGE_HEIGHT (image height) with any size you want (in pixel).

 

Hi, thanks for the reply,

I replaced

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

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

with:

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']),200px,200px, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], 200px, 200px, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

however i get the following error appear in my browser:

Parse error: syntax error, unexpected T_STRING in /mounted-storage/home86b/sub006/sc47507-QGSG/www/product_info.php on line 109

 

Have i done something wrong?

Many thanks.

Link to comment
Share on other sites

try:

 

'200px','200px'

(put apostrophe's around the values)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

try:

 

'200px','200px'

(put apostrophe's around the values)

 

Hi, thanks that sorted the error out. However replacing SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT with the '200px' hasent done anything, the images are still the same size.

Please help!

Many thanks.

Link to comment
Share on other sites

Hi, thanks that sorted the error out. However replacing SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT with the '200px' hasent done anything, the images are still the same size.

Please help!

Many thanks.

SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2

will double the size displayed

Link to comment
Share on other sites

SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2

will double the size displayed

 

Great thanks so much that worked. However do you have any idea how to get it to work with STS?

Many thanks.

Link to comment
Share on other sites

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...