Support Forums

Old 03-15-2007, 01:26 PM   #1
Junior Member
 
Join Date: Feb 2007
Posts: 9
Rep Power: 0
eschulze is on a distinguished road
Default Default Sort in showlistings.tpl.php

I have found where I can modify the default sort in the following files:

category.php
searchresults.php

Here is the problem. I followed a mod found on this site to display an extra user registration field on the showlistings page by adding u.extra to the query. That is working perfect. I want the default sort when the page display to sort by "u.extra ASC" ... I entered that on each of the pages, but it does not seem to be working properly. My defined sort is by featured listings.

Here is the code and a link for each page. You will see that clearly the pages are not sorting by the u.extra field which is "School/Organization":

category.php (My Category Listing Page)
Code:
$sSQL .= " ORDER BY ".MAIN_PRODUCT_SORT." ".MAIN_PRODUCT_SORT_OPTION.", u.extra ASC";
searchresults.php (My Search Results Page)
Code:
$sSQL .= " ORDER BY ".MAIN_PRODUCT_SORT." ".MAIN_PRODUCT_SORT_OPTION.", u.extra ASC";
Does anyone have a suggestion on how to make this work? If you click on the header it will sort it correctly, but not when the page comes up.

Last edited by eschulze; 03-15-2007 at 01:29 PM.
eschulze is offline   Reply With Quote
Old 03-15-2007, 01:43 PM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,847
Rep Power: 111
Eric Barnes is a jewel in the rough
Default

I think you need to put your new sort order first.

For example:
ORDER BY u.extra ASC, ".MAIN_PRODUCT_SORT." ".MAIN_PRODUCT_SORT_OPTION."
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 03-15-2007, 02:28 PM   #3
Junior Member
 
Join Date: Feb 2007
Posts: 9
Rep Power: 0
eschulze is on a distinguished road
Default Not quite what I'm looking for

That fixed the sort, but now the featured ads don't display at the top which won't work. Part of our marketing is that the featured ads display at the top of each category page. Any other suggestions?
eschulze is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pnphpbb2 usersaring help !! darryll v3.1 Questions & Support 0 02-26-2007 07:02 AM
Selecting a default State manilaboy v3.1 Questions & Support 2 10-17-2006 12:40 PM
Default of sorting search results robgo777 v3.1 Questions & Support 1 06-10-2006 12:18 PM
3.0.xx upgrading to 3.1... is this normal? Mikael v3.1 Questions & Support 4 05-23-2006 04:36 PM


All times are GMT -4. The time now is 11:34 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0