|
|
#1 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 13 ![]() |
Hi,
I've added a couple extra fields and have modified category.php to assign them to smarty variables so I can display them in subcategories.tpl.php. I've like the page to display these listings sorted by one of the new extra fields. The current sort order is defined in category.php like this: Code:
$sSQL .= " ORDER BY ".MAIN_PRODUCT_SORT." ".MAIN_PRODUCT_SORT_OPTION.", p.dateadded DESC"; How do I reference this extra field to sort with it? Thanks, Jim
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
|
|
#2 |
|
Coder
Join Date: Mar 2006
Posts: 4,574
Rep Power: 111 ![]() ![]() |
Are you talking about the javascript sort when the ads are displayed or you want to sort the query itself?
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 13 ![]() |
I want to sort the query - I'm not using the javascript sort.
Thanks, Jim
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
|
|
#4 | |
|
Coder
Join Date: Mar 2006
Posts: 4,574
Rep Power: 111 ![]() ![]() |
Quote:
This means you would somehow need to include the extra fields in the main product query itself as opposed to collecting them after the inital query so they can be used to sort the data and I am not sure this is doable. I played around with it at one time and was having a heck of a time building a query to do it but I am far from an sql expert. If someone can build a query to do this I would also be interested. I think in V4 this functionality is supposed to be built in. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| admin > category > extra fields info disappearing | kgrinsteiner | v3.1 Questions & Support | 0 | 12-16-2007 07:27 PM |
| Extra Search Field | Greg H | v3.1 Modules & Modifications | 2 | 10-04-2007 12:04 AM |
| Adding extra field to search.php... | abkeller | v3.1 Modules & Modifications | 4 | 06-05-2007 12:15 AM |
| listing extra field value when it is an array? | Mike-N-Tosh | v3.1 Modules & Modifications | 13 | 04-21-2007 09:31 AM |