views:

66

answers:

1

hi,

I need to generate a pdf from Ubecarts orders. I know how to access to the printable versions of orders from my browser: i.e. "admin/store/orders/45/invoice/print"

However, I was wondering how to access to the page from php, maybe using ubercart apis ?

What I need is the equivalent of node_view, for orders (which is not a node).

thanks

A: 

I'm not sure if there is an actual API for it, but you could use uc_order_load_invoice, the order object you need can be generated by the uc_order_load function.

googletorp
great, thanks: $invoice = uc_order_load_invoice(uc_order_load(45));
Patrick

related questions