Guest Posted July 10, 2006 Posted July 10, 2006 Hello all, I'm just setting up osC. It seems like the index page and the new products page list items based on the date ADDED only. I will have several items in my store where the info and price may be updated frequently. I'd rather the new products listings actually display things based on the date updated. Is this possible? Much thanks!
squalid Posted July 10, 2006 Posted July 10, 2006 http://www.oscommerce.com/community/contri...search,featured get the above and you can decide yourself what to show via admin
choosealogin Posted July 10, 2006 Posted July 10, 2006 Or else you could edit catalog/includes/modules/new_products.php if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); The first query is for the front page and the second is for the category pages. In one or both of them, change the 'order by' from order by p.products_date_added desc to order by p.products_last_modified desc Then you could change the heading "new products for July" to "latest updates" or something like that. For that matter, you could duplicate the whole new_products module, give it a new name new_updates, just with the small change to the 'order by' ...and show both modules.
Guest Posted July 11, 2006 Posted July 11, 2006 Much thanks, Choosealogin! That seems to have done the trick.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.