raj20 Posted February 21, 2003 Share Posted February 21, 2003 Is there anyway to display the Upcoming Products like the New Products box on the default page? Its in the form of a list right now - but I was wondering if there was any contribution out there which would help me displaying it like the New Products box. Thanks! Link to comment Share on other sites More sharing options...
greree Posted February 24, 2003 Share Posted February 24, 2003 I'm working on a contribution that does this. I'll let you know when I'm finished. Link to comment Share on other sites More sharing options...
raj20 Posted February 24, 2003 Author Share Posted February 24, 2003 Ok I figured it out - believe it or not - the guy who had originally responded to Jeff1 - some guy called burt on the previous thread at http://www.oscommerce.com/forums/viewtopic.php...highlight=jeff1 gave a real good starting point. So here is the deal: -in the file catalog/includes/modules/upcoming_products.php add p.products_image to the SQL query so it looks like this: $expected_query = tep_db_query("select p.products_id, p.products_image, pd.products_name, products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS); - then go to line approx 36 and replace this: echo ' <td class="smallText"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id'], 'NONSSL') . '">' . $expected['products_name'] . '</a> </td>' . "n"; WITH this: echo ' <td class="smallText"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . $expected['products_name'] . '</a> </td>' . "n"; Basically all i did was added the line .tep_image(DIR_WS_IMAGES . $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . right before the part where the code picks up the product name - and VOILA! it worked like a charm. Now, one thing to remember - make sure if you have any upcoming products, you mark them as "Out Of Stock". Otherwise the product will show up twice - once in the New Products box on the main page AND in the Upcoming products list. I couldnt make the Upcoming Products section as pretty as the New Products box - maybe someone can play around with it and make it look better. But i personally prefer the list method for the Upcoming products because it kinda differentiates it from the New Products. I hope this was helpful. Link to comment Share on other sites More sharing options...
fenner21 Posted April 13, 2003 Share Posted April 13, 2003 Any one know how to make Upcoming Products section as pretty as the New Products box? Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.