jenn Posted December 9, 2002 Posted December 9, 2002 How do I get only one product to be listed in the "what's new" section and the "what's new" sidebar? Also, when the products_new.php page displays new items, just below each product title is the "Publisher:" tag ... how can the "Publisher:" tag be taken off the page?
Ajeh Posted December 9, 2002 Posted December 9, 2002 Sounds like you are using my add-on. If so, edit /includes/modules/products_new.php These lines display the output and has the manufacture included. Afraid I did not make that a switch: <table> <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_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $products_new_array[$i]['image'], $products_new_array[$i]['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_array[$i]['id'], 'NONSSL') . '"><b><u>' . $products_new_array[$i]['name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . $products_new_array[$i]['date_added'] . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new_array[$i]['manufacturer'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td> <td align="right" valign="middle" class="main"><?php echo tep_get_button_check('<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>',$products_new_array[$i]['price'],$products_new_array[$i]['specials_price'],$products_new_array[$i]['quantity']); ?></td> </tr> </table>
jenn Posted December 12, 2002 Author Posted December 12, 2002 Thank you for your help with this. The coding doesn't work. I get an error on line 5. Any ideas?
Ajeh Posted December 12, 2002 Posted December 12, 2002 Try just replacing that peice of code above with: <table> <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_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $products_new_array[$i]['image'], $products_new_array[$i]['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_array[$i]['id'], 'NONSSL') . '"><b><u>' . $products_new_array[$i]['name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . $products_new_array[$i]['date_added'] . '<br>' . TEXT_PRICE . ' ' . $products_price; ?></td> <td align="right" valign="middle" class="main"><?php echo tep_get_button_check('<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>',$products_new_array[$i]['price'],$products_new_array[$i]['specials_price'],$products_new_array[$i]['quantity']); ?></td> </tr> </table>
jenn Posted January 2, 2003 Author Posted January 2, 2003 I used the coding and received this error on the what's new page: Fatal error: Call to undefined function: tep_get_button_check() on line 5 thanks Jenn
Ajeh Posted January 2, 2003 Posted January 2, 2003 Do a search for function tep_get_button_check on all your files. If you do not find one, then you do not have this loaded and are not using one of my add-ons. If you do find it, then you do not have it loaded right and it is not getting loaded in the code.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.