I got the sort to work. Here's the code:
Original code from "customer_testimonials.php"
<?php
if ($testimonial_id != '') {
$full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE testimonials_id = $testimonial_id");
}
else {
$full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE status = '1' ");
}
while ($testimonials = tep_db_fetch_array($full_testimonial)) {
$testimonial_array[] = array('id' => $testimonials['testimonials_id'],
'author' => $testimonials['testimonials_name'],
'testimonial' => $testimonials['testimonials_html_text'],
'word_count' => tep_word_count($testimonials['testimonials_html_text'], ' '),
'url' => $testimonials['testimonials_url'],
'url_title' => $testimonials['testimonials_url_title']);
}
require(DIR_WS_MODULES . 'customer_testimonials.php');
?>
Replace with:
<?php
if ($testimonial_id != '') {
$full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE testimonials_id = $testimonial_id");
}
else {
$full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE status = '1' order by testimonials_id DESC");
}
while ($testimonials = tep_db_fetch_array($full_testimonial)) {
$testimonial_array[] = array('id' => $testimonials['testimonials_id'],
'author' => $testimonials['testimonials_name'],
'testimonial' => $testimonials['testimonials_html_text'],
'word_count' => tep_word_count($testimonials['testimonials_html_text'], ' '),
'url' => $testimonials['testimonials_url'],
'url_title' => $testimonials['testimonials_url_title']);
}
require(DIR_WS_MODULES . 'customer_testimonials.php');
?>
Enjoy!