Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I sort the order of products displayed?


Jet200

Recommended Posts

Default sorting is by product_name...

 

you would find the line below in index.php

		  $listing_sql .= " order by pd.products_name";

 

You may replace pd.products_name - to the field you would like to use for sorting.

 

 

Cheers

GS

Best Regards,
Gaurav

Link to comment
Share on other sites

i've searched and searched but cannot find where these things are defined. really need some help with this as it just looks stupid having the products sort by alphabet. otherwise i will have to resort to some lame product names ;)

Link to comment
Share on other sites

  • 3 weeks later...

Hey why don't you take that line of code

 

$listing_sql .= " order by pd.products_name";

 

and change it to your product id

 

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

 

this way its how you insert the products not by the name. :thumbsup:

Link to comment
Share on other sites

  • 3 weeks later...

Archived

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

×
×
  • Create New...