rockpretty Posted July 31, 2008 Posted July 31, 2008 Can I change the sort order of the New Products Page? I want the newest product added to be first. http://www.rockprettybaby.ca/products_new.php Thanks
spooks Posted July 31, 2008 Posted July 31, 2008 dont you have order by p.products_date_added DESC if you want to add a max age: $date = strtotime("-60 days"); // set max age of displayed product $date = strftime("%Y-%m-%d",$date); p.products_date_added > '".$date."' and Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
rockpretty Posted August 6, 2008 Author Posted August 6, 2008 Sorry, really analog here. Where do I find how I've got it sorted? What is the page name that I would correct the age on? Thanks dont you have order by p.products_date_added DESC if you want to add a max age: $date = strtotime("-60 days"); // set max age of displayed product $date = strftime("%Y-%m-%d",$date); p.products_date_added > '".$date."' and
diy Posted August 6, 2008 Posted August 6, 2008 look in catalog/products_new.php for something like <?php $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> or for just "order by p.products_date_added" after it it should be DESC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.