Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort by prduct date added? Any1?


kalkal

Recommended Posts

Posted

Hey everyone,

 

Ive seen all the ways to have all the products listed by "date added" but none of them work for me. Can someone point me in the direction of any help with this? Im trying to have the most recent items be on top. There was a contribution for this but I think its way too old. Didnt work for me, just got errors. Heres the code from my index.php Ive changed the code on the 4 blocks above this as well as some of the options below it with NO results.

WHAT AM I DOING WRONG?????

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'PRODUCT_DATE_ADDED') {

$HTTP_GET_VARS['sort'] = $i+1 . 'd';

$listing_sql .= " order by products_date_added";

break;

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...