Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Sort by Price Automatically


Guest

Recommended Posts

Posted

The product listing automactivally sort by product name. I need to have the listings sort by lowest price first. How do I accomplish this?

 

Carl Brooks

http://www.palmloyal.com

Posted

when you list the produts, there is a little + sign to the right of the column heading. You can click on the price heading to have it list by price instead of by column.

 

There is a "triangles" contrib that switches the plus and minus symbols for up and down triangles - - that seems a little more intuitive.

 

If you need it to list by price by default, I'm sure that we can figure out how to do that. It'd be in product_info.php if I remember correctly.

 

-jared

Posted
If you need it to list by price by default, I'm sure that we can figure out how to do that.

 

Yes, I need it to be sorted by price by default. I looked in the product_info.php file but could not determine the variable to change. Any assistance would be appreciated.

 

Carl Brooks

http://www.palmloyal.com

Posted

index.php change

 

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

 

to

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

Posted

Thanks, Kepa.

 

That did the trick :)

 

Carl

Archived

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

×
×
  • Create New...