OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?

VehicleManager component support

Go to bottom Favoured: 0

Can I Sort Inventory

ajarduini (Visitor)
Posts: 0
graphgraph
User Offline
Can I Sort Inventory 14 Years, 4 Months ago
Karma: 0  
Greetings and thank you for your support in the past.

I was wondering if there is a way I can automatically sort the inventory in my categories by Year without using the "Reorder" function in the vehicles portion.

When I click on "inventory" on my website www.autosportco.com I would like the items to be listed by year.

I thank you in advance for your help.

Tony
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8367
graph
User Offline Click here to see the profile of this user
Re:Can I Sort Inventory 14 Years, 4 Months ago
Karma: 102  
Hello,

Ordering special created for reordering all yours cars exactly as you wish

For ordering in Vehicle Manager as you wish you need in file vehiclemanager.php function "showCategory" change
Code:


$query = "SELECT id, hits, price, vmodel, vtitle, catid, fk_rentid, year, link, image_link FROM #__vehiclemanager_vehicles"
. " WHERE catid = '$catid' AND published='1' AND approved='1'"
. " ORDER BY ordering";


to
Code:


$query = "SELECT id, hits, price, vmodel, vtitle, catid, fk_rentid, year, link, image_link FROM #__vehiclemanager_vehicles"
. " WHERE catid = '$catid' AND published='1' AND approved='1'"
. " ORDER BY vtitle";


or to
Code:


$query = "SELECT id, hits, price, vmodel, vtitle, catid, fk_rentid, year, link, image_link FROM #__vehiclemanager_vehicles"
. " WHERE catid = '$catid' AND published='1' AND approved='1'"
. " ORDER BY year";



Thanks,
OrdaSoft team
Logged Logged
Last Edit: 2010/07/23 09:27 By admin.
The administrator has disabled public write access.
ajarduini (Visitor)
Posts: 0
graphgraph
User Offline
Re:Can I Sort Inventory 14 Years, 4 Months ago
Karma: 0  
That works great! Thank you. Just one more quick question. That code orders from oldest vehicle on top to newest, is there any way to change it so it orders from Newest on top to Oldest?

Thank you for your support of an awesome component, it is appreciated.

Tony
Logged Logged
The administrator has disabled public write access.
ajarduini (Visitor)
Posts: 0
graphgraph
User Offline
Re:Can I Sort Inventory 14 Years, 4 Months ago
Karma: 0  
I found the solution to my second question on the internet. This can be achieved by editing line 2251 to reflect "nORDER BY ordering DESC";

Thank you again.
Logged Logged
The administrator has disabled public write access.
Go to top
»