We have 2+ sales people (i.e. joomla users) which handle orders in VM. We want to see the user who performed each order status change.
Is this information stored/available in the system?
We can do the template override if it's accessible. Thanks
It really depends where you want to see this information
In the orders table modified_by gives the user id that last modified the order - but that might not be what you are looking for as there may be many statuses set in the life of an order
If you want to see the detail for every status in the order detail screen
The order detail contains the status data along with the "virtuemart_order_histories" table data which holds the user_id that set the status in created_by modified_by fields
This can be looked up in the joomla "users" table to get the corresponding name
You could probably do this by loading the virtuemart user model and getting user details using a function within that model
If the user_id is sufficient - then a view override would probably be sufficient
Once you have the variable populated - you can display
Thanks.... I am almost there in creating the ideal override.
One thing missing... how do I get the user object, from the user_id? (from within the order.php template)
I need it to display the username for each order status update.
A specific code example would be very much welcome.
Thanks!
JFactory::getUser($order->created_by) or so.
Thank you, it worked.