Active
Project:
Ubercart
Version:
7.x-3.11
Component:
Orders
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2018 at 20:52 UTC
Updated:
24 Oct 2019 at 02:46 UTC
Jump to comment: Most recent
I know that you can change the layout of the order history/order listings pages by editing the uc_orders_user View (which I have done a bit), but how can you theme the order details page?
For example, http://mysite.com/admin/store/orders/1450
Comments
Comment #2
tr commentedYou can theme that page the same as you would theme any other page in Drupal - is there something specific to Ubercart that's causing you a problem?
Comment #3
m.roma commentedProbably theming was a bad choice of words....what I want to do is move around the elements on that page - like a view. Add and subtract different fields and such.
Comment #4
tr commentedIn addition to CSS,
hook_uc_order_pane_alter()will allow you to modify the 'panes' of information shown on that page.Comment #5
chrisckHi TR,
I noticed my other post was marked as duplicate because the it's similar to this support request. I'm still learning how to use hooks and I've used hook_form_alter but not so sure about this one. I looked into uc_order.module and found what I needed to change.
However, my code below doesn't seem to be correct:
And this doesn't work either:
Am I close to getting it right? Any help would be greatly appreciated.
Comment #6
tr commentedYou need the second form, with the &$panes argument - that allows you to modify the $panes variable and have the modified $panes passed back to the calling routine.
I suggest printing out the contents of $panes so you can see the structure, to ensure you're setting the correct values. But yes, that looks about right.
But if you're just trying to reorder the checkout panes, try the configuration settings at /admin/store/settings/checkout instead - just drag the panes into the order you want then save.
Comment #7
chrisckThanks for the reply. I had a look around the uc_order.module because I couldn't seem to figure out how to print the content of $panes. If would be really nice if I could see the array structure.
I'm trying to reorder the panes in the admin order edit form. Checkout is all good.
Comment #8
m.roma commentedOK, so what you want to do is something like:
Keep in mind that your admin theme may be something different from your website user theme.
This should spit out a nicely formatted list of the array.
Comment #9
m.roma commentedHowever - the problem with all of this is that it still doesn't reveal the information I would like to manipulate. It shows the pane itself, but not the products listed in the pane (i.e. $panes contains information about the structure of the panes on this page, but not the variable or arrays for the data itself).
For example:
I need the information on the data listed in the panes - not regarding the panes themselves.
Comment #10
chrisckm.roma can you explain what exactly you would like to do, inside of which panes?
Comment #11
chrisckComment #12
m.roma commentedI would like to count the number of products and use other data points like product status and that sort of thing in the pane that lists the products.
Comment #13
m.roma commentedIs there no way to accomplish this?