Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Increasing the size of product picture


Guest

Recommended Posts

Hello All,

 

I am trying to increase the size of my product picture: Please see this link to see what I mean

 

http://www.smartpackagingstore.com/product...bd48c523e794c36

 

The only way I have been able to increase the picture size is by increasing the size in admin: configuration: images: small image width

 

When I do this it also increases the size in the whole of the product images in the previous breadcrum path.

 

Is there anyway around this.

 

Merry Christmas Richard

Link to comment
Share on other sites

Hello All,

 

I am trying to increase the size of my product picture: Please see this link to see what I mean

 

http://www.smartpackagingstore.com/product...bd48c523e794c36

 

The only way I have been able to increase the picture size is by increasing the size in admin: configuration: images: small image width

 

When I do this it also increases the size in the whole of the product images in the previous breadcrum path.

 

Is there anyway around this.

 

Merry Christmas Richard

 

Not quite sure what you are trying to accomplish. Do you want the picture that is displayed on the product page to be bigger or the picture that appears in the "click to enlarge" to be larger?

 

If it is the latter then simply increase the size of the picture itself. Your current product picture is 180X180 pixels. Use a graphics program to increase the size and replace the 180X180 with the new picture. Or you can download and install a contribution to enlarge the size of the picture with a mouse click.

 

Switch to GIF or JPG instead of BMP. More people have problems viewing BMPs then they do with Gif or JPGs.

 

IF ... your desire is to increase the size of the picture as it appears on the product page you'll have to adjust your display page table to accommodate the new size and then alter the size of the graphic dimension's coding. And then, of course, increase the size of your product picture to the new dimensions of the picture.

 

Mike

Link to comment
Share on other sites

If you want to make the image on the product info page bigger or smaller than any other image in your entire site then the only thing I could think of is to create a new image size/class in the database. It wouldn't be that hard. Backup your database & this file: catalog/product_info.php before doing this.

 

Run this using your phpMyAdmin or how ever you edit your database:

INSERT INTO `configuration` VALUES ('', 'Product Info Image Width', 'PRODUCT_INFO_IMAGE_WIDTH', '100', 'The pixel width of product info images', 4, 9, '2006-12-14 09:19:21', '2006-12-06 20:37:57', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Product Info Image Height', 'PRODUCT_INFO_IMAGE_HEIGHT', '80', 'The pixel height of product info images', 4, 10, NULL, '2006-12-06 20:37:57', NULL, NULL);

 

Find this code in the catalog/product_info.php. I copied this code from a fresh copy of catalog.

			  <td align="center" class="smallText">
<script language="javascript"><!--
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'], PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>

 

Change it to this:

			  <td align="center" class="smallText">
<script language="javascript"><!--
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']), PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_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'], PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>

 

All that did is define a new image size & you only used that new image size on the product information page. Remember that if you want that new image size to be display on other pages like product reviews & etc you will have to change the SMALL_IMAGE_WIDTH & SMALL_IMAGE_HEIGHT on those pages to PRODUCT_INFO_IMAGE_WIDTH & PRODUCT_INFO_IMAGE_HEIGHT.

 

You edit this new image size in the same area of your Admin's CP. If you want the image on those pages to display the same size of the image is w/out making the image smaller or bigger just set the pixel size for the new image size to 0.

Link to comment
Share on other sites

Thanks for the quick response,

 

I know how to do everything except for the editing of the database:

 

"Run this using your phpMyAdmin or how ever you edit your database:

 

CODE:

 

INSERT INTO `configuration` VALUES ('', 'Product Info Image Width', 'PRODUCT_INFO_IMAGE_WIDTH', '100', 'The pixel width of product info images', 4, 9, '2006-12-14 09:19:21', '2006-12-06 20:37:57', NULL, NULL);

INSERT INTO `configuration` VALUES ('', 'Product Info Image Height', 'PRODUCT_INFO_IMAGE_HEIGHT', '80', 'The pixel height of product info images', 4, 10, NULL, '2006-12-06 20:37:57', NULL, NULL);"

 

 

 

I'm in mySQl admin and can find 'configuration', but see anyway of editing it.

 

Regards,

 

Richard

Link to comment
Share on other sites

Open phpMyAdmin & click on your store database name. A long the top of the page you will see tabs. From left to right you have Structure, SQL, Search, Query, Export, etc

 

Click on the SQL & insert that code into the input box then click go.

Link to comment
Share on other sites

Thanks for the quick response,

 

I know how to do everything except for the editing of the database:

 

"Run this using your phpMyAdmin or how ever you edit your database:

 

CODE:

 

INSERT INTO `configuration` VALUES ('', 'Product Info Image Width', 'PRODUCT_INFO_IMAGE_WIDTH', '100', 'The pixel width of product info images', 4, 9, '2006-12-14 09:19:21', '2006-12-06 20:37:57', NULL, NULL);

INSERT INTO `configuration` VALUES ('', 'Product Info Image Height', 'PRODUCT_INFO_IMAGE_HEIGHT', '80', 'The pixel height of product info images', 4, 10, NULL, '2006-12-06 20:37:57', NULL, NULL);"

I'm in mySQl admin and can find 'configuration', but see anyway of editing it.

 

Regards,

 

Richard

:)

great addition ! thanks will use , why did I not find this when I needed it, I read about this just about every day suggested that osc a product image size and here it is!

think you should make this a contrib,

Rusty

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

Link to comment
Share on other sites

:)

great addition ! thanks will use , why did I not find this when I needed it, I read about this just about every day suggested that osc a product image size and here it is!

think you should make this a contrib,

 

 

Hi

 

I am experimenting with this ..working great except for when you click on the image in says forbidden,,cannot view this page.........

 

2 solutions..

 

1. how do you make an image link not 'pop up' with is not not really needed here as the image is larger,

and

..this is the code that will need a slight change( I believe) ... I am not sure how to comment out this,,

 

<td align="center" class="smallText">
<script language="javascript"><!--
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']), PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_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'], PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>

 

2. or solve this is error if you needed,

 

thanks for the help

 

russell

Rusty

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

Link to comment
Share on other sites

Hi

 

I am experimenting with this ..working great except for when you click on the image in says forbidden,,cannot view this page.........

 

2 solutions..

 

1. how do you make an image link not 'pop up' with is not not really needed here as the image is larger,

and

..this is the code that will need a slight change( I believe) ... I am not sure how to comment out this,,

 

<td align="center" class="smallText">
<script language="javascript"><!--
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']), PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_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'], PRODUCT_INFO_IMAGE_WIDTH, PRODUCT_INFO_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>

 

2. or solve this is error if you needed,

 

thanks for the help

 

russell

You error isn't a problem in my code. It is your permissions & this code works just fine. You have to use the JavaScript to make the pop-up window to view the extra pictures.
Link to comment
Share on other sites

The replies here are *way* overcomplicating such a simple thing... To change the size of the product picture on the product info page just add a '+ [value]' to the image width:

 

<script language="javascript"><!--

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

//--></script>

 

You'll need to remove the SMALL_IMAGE_HEIGHT to constrain the image proportions.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...