Guest Posted December 2, 2002 Posted December 2, 2002 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
Ajeh Posted December 3, 2002 Posted December 3, 2002 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
Guest Posted December 3, 2002 Posted December 3, 2002 Check out this link http://www.jcdtools.com/default.php?cPath=3&osCsid Notice the sort order obtained by putting numbers in front of the products name. How can I obtain that same sort order without the numbers? Rich
nick Posted December 3, 2002 Posted December 3, 2002 I was working on something like this a while back - actually before the forums were around. It's in the email archive in General forum -> http://www.oscommerce.com/forums/viewtopic.php...ight=mysql+nick There were some other threads about sorting by manufacturer and the like but try that for now
Ajeh Posted December 3, 2002 Posted December 3, 2002 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.
Ajeh Posted December 3, 2002 Posted December 3, 2002 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.