Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort Order for Products under a catagory list?


Guest

Recommended Posts

Posted

I've searched for this and found how to sort product attributes for drop down lists but not how to sort the products themselves in a list. Right now we are doing it by putting a number in front of the product name. Tips, tricks and contibutions suggestions would be appreciated

Posted

Where are you trying to sort the names?

 

You can add to any select statement: order by products_name

 

Otherwise, you need to be a bit more specific as to what you are trying to do here ... :D

Posted

If I am not mistaken, the last time someone needed this fix I had them add this to the header.php

 

<?php

if (!isset($HTTP_GET_VARS['sort'])) {

$HTTP_GET_VARS['sort']='3a';

}

?>

 

3a should be the products name.

 

Now, first time in the display is by name, and unless they change it by clicking a heading, it will stay that way.

Posted

And on that 3a ... if you click your title for the order you want it will display in the URL the order ... ie sort=1d or sort=2a etc.

 

That is what you want to use.

Archived

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

×
×
  • Create New...