Master_Roshi Posted December 7, 2004 Posted December 7, 2004 Rather than having a large graphic scaled down (which cause long load times) I decided I wanted to have separate thumnail images. Here's what I hacked/did (in case anyone would like to know). Using MyPHP admin, I added a new column to the table 'products' and named it products_image_lrg I therefore put my thumbnail image in the products_image column, and my full sized graphics in the products_image_lrg column. Warning - for those who only want to work in the oscommerce admin utility, You won't see the added column in the gui. You'll only see the form window for adding the single graphic (I used that for the thumbnail). Like I said, it's a hack and I haven't tried to figure out how to add the new column in the "new products" form. If you decide to continue on... then go on to edit the 'popup_image.php' file within the <body></body> tags (at the base of the page), replace the <?php> code there with this: <?php if (empty ($products['products_image_lrg'])) { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); } else { echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name']); } ?> also, At, the top of the page, you'll need to add 'p.products_image_lrg' into the $products_query so it looks as follows: $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); Your pop up will display whatever graphic is listed in the 'products_image_lrg' field. And if it is empty, will display whatever is in the standard 'products_image' field.
boxtel Posted December 8, 2004 Posted December 8, 2004 Rather than having a large graphic scaled down (which cause long load times) I decided I wanted to have separate thumnail images. Here's what I hacked/did (in case anyone would like to know). Using MyPHP admin, I added a new column to the table 'products' and named it products_image_lrg I therefore put my thumbnail image in the products_image column, and my full sized graphics in the products_image_lrg column. Warning - for those who only want to work in the oscommerce admin utility, You won't see the added column in the gui. You'll only see the form window for adding the single graphic (I used that for the thumbnail). Like I said, it's a hack and I haven't tried to figure out how to add the new column in the "new products" form. If you decide to continue on... then go on to edit the 'popup_image.php' file within the <body></body> tags (at the base of the page), replace the <?php> code there with this: <?php if (empty ($products['products_image_lrg'])) { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); } else { echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name']); } ?> also, At, the top of the page, you'll need to add 'p.products_image_lrg' into the $products_query so it looks as follows: $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); Your pop up will display whatever graphic is listed in the 'products_image_lrg' field. And if it is empty, will display whatever is in the standard 'products_image' field. <{POST_SNAPBACK}> there is a multiple images contribution already which does exactly this and more. Treasurer MFC
Guest Posted December 12, 2004 Posted December 12, 2004 there is a multiple images contribution already which does exactly this and more. <{POST_SNAPBACK}> "?" Where can I find the multiple images contribution so I can implement it to mine?
arundelr Posted December 21, 2004 Posted December 21, 2004 "?" Where can I find the multiple images contribution so I can implement it to mine? <{POST_SNAPBACK}> I would also like to use this multiple images contribution, where is it please? Rob.
kahml Posted December 21, 2004 Posted December 21, 2004 Or, you could eliminate the pop-up altogether and use a full-sized image: http://www.oscommerce.com/forums/index.php?showtopic=119912 Larry
Recommended Posts
Archived
This topic is now archived and is closed to further replies.