Jump to content

Invoice Pdf Hasn't Payment Name

Recommended Posts



I wonder, why this piece of code


public function getOrderPaymentCollection()
 $order_payments = new Collection('OrderPayment');
 $order_payments->where('order_reference', '=', $this->reference);
 return $order_payments;


from Order.php:1406 does not return anything.


In template invoice.tpl


{foreach from=$order_invoice->getOrderPaymentCollection() item=payment}
 <td style="width: 50%">{$payment->payment_method}</td>
 <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td>
 <td>{l s='No payment' pdf='true'}</td>


show just No payment. I wonder why, I check the DB, the order reference is correct between the ps_orders and ps_order_payment.


Still nothing. I was thinking about create my custom function with custom sql query, but how can I get the return value from php functon (array of vaules from query) in Order.php to put it to the tempalte file invoice.tpl.



Link to comment
Share on other sites

  • 2 weeks later...
  • Create New...