phildemarco Posted February 20, 2006 Posted February 20, 2006 Can someone please help with this problem?I would like to totally remove the small thumbnail (whats new gif image) in the top right hand corner on all my new products pages.Where would I look to change this code? :'(
Guest Posted February 20, 2006 Posted February 20, 2006 catalog\products_new.php <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
phildemarco Posted February 20, 2006 Author Posted February 20, 2006 catalog\products_new.php <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> enigma1, could you please guide me through the process?I am a total newbie when it comes to codeing and changeing HTML code. Do I remove all the code? or do I contribute it out //? if I block the code out where do I place // at? thank you for all your help. Phil :'(
Guest Posted February 20, 2006 Posted February 20, 2006 ok so: 1. Backup your files before doing modifications (always) 2. Remove the code I posted from that file, save it and test it.
phildemarco Posted February 20, 2006 Author Posted February 20, 2006 ok so:1. Backup your files before doing modifications (always) 2. Remove the code I posted from that file, save it and test it. enigma1, I did as you instructed me to do I am still getting the small gif image box white with a red x inside any other suggestions oh by the way I cleared all cookies and refreshed my browser every time I made a change. Phil :unsure:
Guest Posted February 20, 2006 Posted February 20, 2006 what is the php script on the browser that is running when you're seeing the problem? Does it say products_new.php? There is also the Image Required switch in osc admin->Configuration->Images I am not sure whether you're trying to remove the default images or if simply not enforcing an image for each product/category.
phildemarco Posted February 20, 2006 Author Posted February 20, 2006 what is the php script on the browser that is running when you're seeing the problem? Does it say products_new.php? There is also the Image Required switch in osc admin->Configuration->Images I am not sure whether you're trying to remove the default images or if simply not enforcing an image for each product/category. enigma1, the broswer I am looking through is IE and yes it says products_new.php what do you mean enforcing an image for each product/category? I just want to delete the default small gif image I dealeted "Whats new here" but little box image did not go away so all I get is a little white box with a small red x in it. What is the image requried switch?is that little gif image requried for "Whats new here" ?
♥14steve14 Posted February 20, 2006 Posted February 20, 2006 removing all that code should remove the image and its placeholder, so you cant have done something right. REMEMBER BACKUP, BACKUP AND BACKUP
phildemarco Posted February 20, 2006 Author Posted February 20, 2006 removing all that code should remove the image and its placeholder, so you cant have done something right. Steve, Thank you so much for your input PROBLEM SOLVED!!! I feel like a big idiot enigma1 was right taking code out was correct and worked my problem was in my admin config images I had images requried set to true when I changed it to false my problem went away. Phil :thumbsup:
Guest Posted February 20, 2006 Posted February 20, 2006 to remove the "product was added string" in catalog\product_info.php file find this code: if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> and remove it.
phildemarco Posted February 20, 2006 Author Posted February 20, 2006 to remove the "product was added string"in catalog\product_info.php file find this code: if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> and remove it. Mark, When I remove all this code as you instructed I get the following error Parse error: parse error, unexpected '<' in /home/pd1pd2/public_html/product_info.php on line 190 How do I correct?
Guest Posted February 21, 2006 Posted February 21, 2006 oops I did it wrong, I had one extra line. You want to keep the very last line from my previous post. So here is the code to remove if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php }
phildemarco Posted February 21, 2006 Author Posted February 21, 2006 oops I did it wrong, I had one extra line. You want to keep the very last line from my previous post. So here is the code to remove if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } Ok Mark that worked I am not getting the error anymore but why when I open up (Whats new ) I get my image the price and Monday 20 February 2006 still showing up under my product title is there another place I have to remove or change the code to remove that date in whats new?
Guest Posted February 21, 2006 Posted February 21, 2006 what the script filename that shows on the browser is it index.php?
phildemarco Posted February 21, 2006 Author Posted February 21, 2006 what the script filename that shows on the browser is it index.php? Mark, Showing product_new.php
Guest Posted February 21, 2006 Posted February 21, 2006 then post the source code of the entire product_new.php file (Is it product_new or products_new.php)
phildemarco Posted February 21, 2006 Author Posted February 21, 2006 then post the source code of the entire product_new.php file (Is it product_new or products_new.php) Mark, its products_new.php here is the file that is on my server. <?php /* $Id: products_new.php,v 1.27 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCTS_NEW); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($products_new_split->number_of_rows > 0) { $products_new_query = tep_db_query($products_new_split->sql_query); while ($products_new = tep_db_fetch_array($products_new_query)) { if ($new_price = tep_get_products_special_price($products_new['products_id'])) { $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])); } ?> <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td> <td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td> </tr> <tr> <td colsp?an="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } } else { ?> <tr> <td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> </table></td> </tr> <?php if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <?php } ?> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Guest Posted February 21, 2006 Posted February 21, 2006 ok here is another instance for that date you need to take out. Backup the file first then remove this code . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>'
phildemarco Posted February 21, 2006 Author Posted February 21, 2006 ok here is another instance for that date you need to take out. Backup the file first then remove this code . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' Mark, BINGO!!!!!!!!! that did it your the BOMB!!!!!!! Thanks for all the great help :thumbsup: Phil
LysanderSpooner Posted March 16, 2006 Posted March 16, 2006 Mark, BINGO!!!!!!!!! that did it your the BOMB!!!!!!! Thanks for all the great help :thumbsup: Phil I have to add that it is real nice to see a thread with replys to it and actual information one can use. I searched for an hour to find this thread. I got a lot of them with the questions, but no answers! :thumbsup: btw I followed the steps and it worked first time. "On your death bed you will achieve total awarenss, so you got that going for you." Don't stand where I told you to stand. Stand where I told you to stand!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.