Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with contributions ! ! !


4cl

Recommended Posts

Hi,

 

I have installed osCommerce 2.2MS2. But I need to make a few modifications.

 

1. The shopping cart uses "small Image Width" and "small Image height" values in the product specific pages. I need to show a bigger picture in this page and get rid of the pop up window and the ?click to enlarge? link below it.

 

If I increase the small image size values, It increases the image size everywhere where the "small image width and height" is used.

 

Is there a contribution that will add one more feature to the "images" where I can have "large image width" and height used in the product specific pages?

 

Or even better?

 

Is there a contribution that will calculate the dimensions of the picture and show it on that page as is. Like it?s done on the popup window, only it?s on the page itself.

 

It would be great to have the second option available, but I?ll settle for the first option.

 

thank you

 

Sheriff

Link to comment
Share on other sites

The simplest way to do this in say the shopping cart is to change the defines to the size you want, eg. in shopping_cart.php change:

 

<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .

 

to something like:

 

<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], '80', '120') . '</a></td>' .

 

or to show the actual image size, leave them out altogether:

 

<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name']) . '</a></td>' .

 

Matti

Link to comment
Share on other sites

Hi,

 

well, that's simpler than I expected.

 

My only problem, is that I don't know which file to change.

 

I want to change the size of the picture on the page listed below and the other similar pages.

 

http://www.4catlovers.com/oscommerce/produ...?products_id=28

 

What file should I open. I thought I'd change the codes on "include -> Languages -> English -> product_info.php. But there are no codes in this page that resembles the codes you mention. It's actually a very short page.

 

Which file should I open to change the image size on all the pages like the one I have listed above?

 

Thanks for your patience. God knows you need some for guys like me :blink:

 

Sheriff

Link to comment
Share on other sites

PS: I am not looking at changing all the images on this page. Only the image shown in the center section. The images on the right and left column can still use the "small image width and height".

Link to comment
Share on other sites

They can be found in catalog/product_info.php (both instances):

 

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript: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>'; ?>
</noscript>

 

Matti

Link to comment
Share on other sites

All right,

 

I think I did it, but sometimes, while things look good on the outside, there may be a mistake in the codes that's going to come back and hunt me.

 

I changed the code you just gave me to:

 

<td align="center" class="smallText">

<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), 'hspace="5" vspace="5"'); ?>

 

I made it so the picture shows up in its natural size, and I deleted the link to the pop up.

 

It looks good on the outside. But did I do the job right?

 

I also deleted the <nonscript> section.

 

Thanks for the great support

 

Sheriff

Link to comment
Share on other sites

  • 2 weeks later...
The <nonscript> section is needed if the client browser has javascript disabled :blink:

 

Matti

hi Matti,

 

Why would the <nonscript> be needed if I deleted the <script>?

 

Sheriff

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...