s_t_e_v_e, I can't believe you! I think the guru's should take a leaf from your book though.
You've helped me now with a dozen or so problems and each and every time, you've responded with a one liner and each and every time it's been 100% spot on perfect.
You've hit the nail on the head here again and it seemed effortless, you're amazing!!
To summarise then, for anyone who wants the default order of their product listings to be newest-to-oldest then here's all you need do:
Admin/Product Listing/Product Listing/Display Product Listing Default Sort Order make sure that you edit this and leave it blank... don't put anything in there at all.... (NOTE: Leave Blank for Product Sort Order. Sort the Product Listing in the order you wish for the default display to start in to get the sort order setting. Example: 2a)
Now:
edit /includes/index_filters/default_filter.php:
replace approx lines 123-129:
PHP Code:
// sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER is left blank
// for reverse, descending order use:
// $listing_sql .= " order by p.products_sort_order desc, pd.products_name";
$listing_sql .= " order by p.products_sort_order, pd.products_name";
break;
}
}
with this:
PHP Code:
// sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER is left blank
// for reverse, descending order use:
// $listing_sql .= " order by p.products_sort_order desc, pd.products_name";
$listing_sql .= " order by p.products_date_added DESC, pd.products_name";
break;
}
}
Again Steve, thank you for your time. True genius!!
Bookmarks