Is there a way to add the Payment method details to the invoice template? I have looked for clear and concise instructions on this and have not found anything.

Comments

TR’s picture

The payment method is already listed on the invoice, were you looking for something other than that?

Payments for an order may be obtained using the API function uc_payment_load_payments($order_id), which returns an array of payments for that order with array elements corresponding to the columns in the {uc_payment_receipts} table.

esquareddesign’s picture

Yes, with the payment method "Other" you can enter a description. The description field shows up when you chose the payment method "Other" and shows up when you view the order online but does not show up on the emailed invoice.

Example:

Payment method is set to: Other
Payment method description: Use credit card on file

Payment method "Other" shows up on the emailed invoice but the description does not.

TR’s picture

Status: Active » Fixed

$description = db_query('SELECT description FROM {uc_payment_other} WHERE order_id = :id', array(':id' => $order->order_id))->fetchField();

esquareddesign’s picture

Than you, that work wonderfully.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.