Guest Posted February 21, 2004 Posted February 21, 2004 In OSC 2.2MS2 there is a problem with the Upcoming Products listings on the index page. I did a search on the forum and could find any posting so I thought I would share it with everyone The bug: If you have a product which has a 'Date Available' date set in the future and the product is disable, then it will show up in the 'Upcoming Products' section on the produst home page (index.php). The problem is when you click on this link it will take you to the product_info.php page and this will display that it can't find the product. The fix: You need to change the SQL in the following file: catalog/includes/modules/upcoming_products.php from $expected_query = tep_db_query("select p.products_id, 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 = '" . (int)$languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS); to: $expected_query = tep_db_query("select p.products_id, 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_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS); This will prevent disabled products showing up in the 'Upcoming Products' section on the index.php page Rob
Recommended Posts
Archived
This topic is now archived and is closed to further replies.