Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products Expected Page


raj20

Recommended Posts

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

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

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...