Guest Posted September 12, 2002 Share Posted September 12, 2002 Is there a way to add a thumb nail image of the product item to the shopping basket. So you basket looks like this: Remove QTY. "Image" Product Name Total Link to comment Share on other sites More sharing options...
Ajeh Posted September 12, 2002 Share Posted September 12, 2002 You could edit /includes/modules/order_details.php and look at the <td> sections for each peice shown. Then do a quick select of the products_image for the product and display it similar to the product_info or product_listing Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2002 Share Posted September 12, 2002 I thought it would be in the shopping_cart.php file. It should look something like this: Here is a link http://www.pgatourstop.com/cstShoppingBask...=0&a=5134&c=835 Make sure you select from http--->c=835 and paste in browser Thanks for the help Link to comment Share on other sites More sharing options...
Ajeh Posted September 12, 2002 Share Posted September 12, 2002 order_details.php is called via the shopping_cart.php file for the specifics. Around line 87 require(DIR_WS_MODULES. 'order_details.php'); Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2002 Share Posted September 13, 2002 echo tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], 50, 50); I inserted this code and the image is missing. It does display the area where the image should go but there is no image. Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2002 Share Posted September 15, 2002 echo tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) ; I placed this code around line 60 in the order_details.php file. This code does not work. It doesn't display the image, just an emty image area where the image is suppose to go. So Does anyone know what code to use or what I am missing. Thanks for the help Link to comment Share on other sites More sharing options...
Ajeh Posted September 16, 2002 Share Posted September 16, 2002 I added this to order_details.php for ($i=0; $i<sizeof($products); $i++) { echo ' <tr>' . "n"; $my_products_id= $products[$i]['id']; $my_products_image= tep_get_my_products_image($my_products_id); echo ' <td align="center" valign="top">'; echo tep_image(DIR_WS_IMAGES . $my_products_image, '' , SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); echo ' </td>' . "n"; Then I added the function ... somewhere like general.php or your fav function file: //// // Return a product's image // TABLES: products function tep_get_my_products_image($product_id) { $product_normal_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $product_id . "'"); $product_normal = tep_db_fetch_array($product_normal_query); return $product_normal['products_image']; You will have to decide your sizes for these. Link to comment Share on other sites More sharing options...
Ajeh Posted September 16, 2002 Share Posted September 16, 2002 oh ... and you should adjust your columns to accomodate the extra <td> for this or move the code placement. Otherwise your tables are technically lopsided :D Link to comment Share on other sites More sharing options...
Ajeh Posted September 16, 2002 Share Posted September 16, 2002 One other thing you might do is shrink the image with: echo tep_image(DIR_WS_IMAGES . $my_products_image, '' , SMALL_IMAGE_WIDTH*.50, SMALL_IMAGE_HEIGHT*.50); Link to comment Share on other sites More sharing options...
Ajeh Posted September 16, 2002 Share Posted September 16, 2002 One more try here :D This is a lot cleaner code and you do not have to play with adding new columns in order_details.php for ($i=0; $i<sizeof($products); $i++) { echo ' <tr>' . "n"; // BOF: WebMakers.com Added: Display Product Image at 50% $my_products_id= $products[$i]['id']; $my_products_image= tep_get_my_products_image($my_products_id); // Delete box only for shopping cart if (strstr($PHP_SELF, FILENAME_SHOPPING_CART)) echo ' <td align="center" valign="top">' . tep_image(DIR_WS_IMAGES . $my_products_image, '' , SMALL_IMAGE_WIDTH*.50, SMALL_IMAGE_HEIGHT*.50) . '<input type="checkbox" name="cart_delete[]" value="' . $products[$i]['id'] . '"></td>' . "n"; // EOF: WebMakers.com Added: Display Product Image at 50% Link to comment Share on other sites More sharing options...
Guest Posted September 16, 2002 Share Posted September 16, 2002 Thanks so much Ajeh IT WORKED Link to comment Share on other sites More sharing options...
Ajeh Posted September 16, 2002 Share Posted September 16, 2002 Glad that worked for you Fermin. Just play a bit with the image size to get it looking nice on the shopping_cart.php and your layout should come out clean for the customer :D Link to comment Share on other sites More sharing options...
mortal Posted June 5, 2005 Share Posted June 5, 2005 could someone please tell how this is done today with the newer versions missing orders_details.php ? Link to comment Share on other sites More sharing options...
pixelhub Posted July 30, 2005 Share Posted July 30, 2005 could someone please tell how this is done today with the newer versions missing orders_details.php ? <{POST_SNAPBACK}> any body know how to do this Link to comment Share on other sites More sharing options...
mortal Posted August 4, 2005 Share Posted August 4, 2005 Please Linda. i tnink you hold the solution. Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2006 Share Posted November 13, 2006 Thanks in advanced for your help could someone please tell how this is done today with the newer versions missing orders_details.php ? Does anyone know how to do this? Link to comment Share on other sites More sharing options...
RC Heli Pilot Posted April 11, 2008 Share Posted April 11, 2008 This sounds like a nice feature to me,... I wouldnt mind having the images show in the shopping cart either in the osCommerce of today. Can anyone update this for us? Anyone? RCHP Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.