Add 'view' operation to Order History

Posts: 7
Joined: 10/01/2008

A minor one,

Under the user's profile view, when 'view orders' permissions are enabled (a recently added option i believe) all previous orders are listed and further information is displayed upon clicking the order number.

Unfortunately clicking the order number simply is not obvious to our customers. uggh.

My suggestion is to add "View" under an "Operations" column, to make this usability improvement.

See attached screenshot. Currently i'm using a hacked uc_orders to achieve this but it would be awesome to get this into uc base/core.

Cheers, Chris.

AttachmentSize
order-history.png6.92 KB
Posts: 554
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

I believe it's in a theme_ function, so easily modifiable by redeclaring it in your template.php and make the change.

For sure, I agree with you and it would be cool to see that in core as it's more user friendly and it would avoir you to redeclare the theme_ function for each project you do.

But it's very minor issue with a very low level of priority IMHO.

Posts: 974
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I had to deal with this same problem when I wrote my Package Tracking module (http://www.ubercart.org/contrib/2852), because I needed to display a tracking number with a link to the tracking information on the order page.

There is no theme function to override here. That page is generated by uc_order_history(), so the whole function needs to be replaced. Without hacking core, I overrode the user/#/orders menu to call my own function instead of uc_order_history() - you can look in my code to see how I did this.

I think uc_order_history() could be re-designed so that it is easy to hook into. For this to happen, someone has to rewrite the code and post it as a proposal. I don't have the time myself.

Actually, what I REALLY think needs to be done is that "Order" needs to be a node type (for many reasons I've discussed before) instead of just DB tables as it is now. If that were done, then a page listing the order history could trivially be generated with views, and trivially themed to include/exclude/reformat information using the normal Drupal theming mechanisms. Ubercart's capabilities would be increased, while at the same time a lot of Ubercart code could be eliminated because this stuff would be done by core modules or other contributions. Again, I don't have time to tackle this project myself.

--

<tr>.

Posts: 974
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

One more comment, about the usability issue:

I agree, clicking on the order number is non-intuitive, and easily overlooked. I know this issue has been raised before. I agree this page could use minor tweaks in core, right now, to make it easier to user. Your suggestion is a good one.

--

<tr>.

Posts: 5625
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Two quick questions... would you also recommend taking the link off of the order number and maybe adding another operations link for the pop-up invoice? Also, I'm willing to entertain the idea of orders as nodes in UC 3.x, but I'm curious if the same problems would be solved by exposing order tables to Views 2.0. Puzzled

Posts: 7
Joined: 10/01/2008

The initial request was a simple suggestion for core (a 2 liner) to save fiddling with menus and uc_order_history to improve usability. Although theme override would be an awesome addition as would views support.

I don't know if a link to invoice would get much use being in the same predicament.

Posts: 554
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

Orders as node, OMG, is my wonderfull dreams will be realized ? ^^

Posts: 5625
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Heh... I think that's a discussion for another thread, but I'd be happy to have it. With Views 2.0 not being dependent on nodes any more, I just wonder if it's even necessary.

Posts: 974
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

Ryan wrote:
Two quick questions... would you also recommend taking the link off of the order number and maybe adding another operations link for the pop-up invoice?

The icons have never really "worked" for me - I always have to hover my mouse over the icons and read the tooltips to figure out which does what. So I personally would just turn those into text links for view, delete, edit, etc. I don't think it's necessary to add a link to the invoice in the order summary, since the first thing a user will do is drill down into the order view to see if it's what he wants, and the invoice tab is right there once you've drilled down.

Ryan wrote:
Also, I'm willing to entertain the idea of orders as nodes in UC 3.x, but I'm curious if the same problems would be solved by exposing order tables to Views 2.0. Puzzled

That would help with a number of small issues. I wouldn't assign much priority to it though. The big win comes only when you switch orders to nodes, then things like the order summary list would just be a normal list of teasers that users can theme with css, theme functions, or templates! Data added to orders by contributed modules would then be automatically included in all the order views, rather than having to implement various ubercart hooks. etc. As you said, fodder for another thread...

--

<tr>.

Posts: 554
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

To return to the original purpose of the post, it's true that the order history page should be easily themed. If it's not the case, there is a problem ^^

declaring this funtion as a theme_ function should not be so difficult, no ?

Posts: 5625
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Well... it could be wrapped in a theme function, but the theme layer isn't necessarily supposed to change something like all the contents of a table. It's more to be used for changing the HTML output of an element... if it's just CSS you need to adjust, I should be able to add a class to the table no problem.

I suppose what should happen is this should be turned into a TAPIr table, though I'll need to investigate how effective paging is with TAPIr right now. In fact, I think that might be the best thing to do right now. Reason being... when I look at the table in 1024 x 768 with two sidebars, there's no room for another column in the table. If I'm going to overcrowd it, I'd like for people to be able to turn off columns to make it fit in their theme. Thoughts on that? This would most likely then become a D6 feature only.

Posts: 554
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

This would be a perfect solution. But, provide the possibility to enable/disable column for tapir generated table make me remember the tapir integration of 5.x. Why did you removed this dependency ? in 5.x, we could choose the column of the cart form, order, and some others tables like that, and now the feature is removed.

It is to prepare a view integration for all listing ? (*dream*)