Drupal、Ubercart:如何以编程方式获取订单可打印版本?
我需要从 Ubecarts 订单生成 pdf。我知道如何从浏览器访问订单的可打印版本:即“admin/store/orders/45/invoice/print”
但是,我想知道如何从 php 访问该页面,也许使用 ubercart apis ?
我需要的是相当于node_view的订单(不是节点)。
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定是否有实际的 API,但您可以使用
uc_order_load_invoice
,您需要的订单对象可以通过uc_order_load
生成 功能。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 theuc_order_load
function.