| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Order by productcode | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Order by productcode
Can anyone tell me how to get my products to order by productcode rather than by productid.
Do I need to change an sql query or template or what? I just can't seem to find where the products are ordered for products.tpl. |
|||||||
#2
|
|||||||||
|
|||||||||
In the /xcart/customer/ directory: products.php
Original query: Code:
I believe you just need to add the ORDER BY clause in here, like this: Code:
hope this helps. |
|||||||||
#3
|
|||||||
|
|||||||
?
Thanks for the reply!
That didn't seem to work. I think that there is some other "order by" statement somewhere that might be overriding this attempt to order. Any other ideas? |
|||||||
#4
|
|||||||||
|
|||||||||
Try this for the $search_query code:
Code:
If that doesn't work, look at this thread regarding sorting the products list: http://forum.x-cart.com/viewtopic.php?t=677 Or this one: http://forum.x-cart.com/viewtopic.php?t=1277 LOTS of info in there - you just have to extrapolate what you need for your purposes. hope this helps. |
|||||||||
#5
|
|||||||
|
|||||||
Got it!
Thanks for the help. I was able to figure it out using one of those links that you gave me.
Cheers |
|||||||
|
|||
X-Cart forums © 2001-2020
|