Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help with product listing!


Guest

Recommended Posts

Posted

hi can someone tell me where i can change my product listing from ascesnding to decending by default so that my latest products show first! I have posted this numerous times and had no joy! Im sure it cant be that difficult!

Thanks!

Posted

search for "order by" in your catalog\index.php

 

this code:

	  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	  $listing_sql .= " order by pd.products_name";
	  break;
	}
  }

 

just change it to

$listing_sql .= " order by p.products_id desc";

Posted

How frustrating!

 

I have just realised that it didnt work properly! It only changed the order of my products on the first page! when i went to the second page it started going back up again!

 

Any sugguestions?

 

thanks!

  • 4 weeks later...
Posted

The same old question!!!

 

Hi everyone!

 

I still need to know how to do this! The code which i was given on the previous reply didnt work correctly! Do i need to enter this code somewhere else???

 

Please please help!

Archived

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

×
×
  • Create New...