Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort Products By Price


Guest

Recommended Posts

Well on index.php look for

 

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

 

and change that to

 

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

 

 

That will take care of it on the product listing part of the pages where it shows all products in a catagory, I believe.

 

There are other pages such as products_new.php that will also need to be edited. If you open them in an editer just search for "order by" and change how it is being ordered to the order by p.products_price

 

That should take care of it I think.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Well on index.php look for

 

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

 

and change that to

 

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

That will take care of it on the product listing part of the pages where it shows all products in a catagory, I believe.

 

There are other pages such as products_new.php that will also need to be edited. If you open them in an editer just search for "order by" and change how it is being ordered to the order by p.products_price

 

That should take care of it I think.

 

Any way you can give me a list of every file I have to edit? That would be helpful.. I dont want to mess anything up.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...