I have a mature catalog running on osCMax RC3 that already has over 2,000 product image thumbnails sized manually to 100x125. I previously removed the MoPics module and added one that lets you input a small image and a large image. Now I have decided I would like to increase the size of the small image to 125x150, but I don't want to redo all the previous images, which are actually 100x125 (not sized dynamically) and will distort if I increase to a size larger than they actually are.
In the interim, I had a computer crash and lost most of the original pics and my notes on the modifications I've made to my catalog. So I would like to make this change in image size apply only to products added from this point on.
Is there a way to change the code and database to search for a 100x125 image, and if there isn't one that size, then display 125x150? Or to set it based on the date the product was added. If so, can someone give me an example of the code to do that?
I don't understand php very well, but I believe the code that calls the small image now is
Also, what would i need to add/change in the database?Code:<?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <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> </td> </tr> </table> <?php } ?>





LinkBack URL
About LinkBacks









Bookmarks