MagicFire Posted March 4, 2013 Share Posted March 4, 2013 Hi, 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} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} 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. Thanks Link to comment Share on other sites More sharing options...
aneheli Posted March 15, 2013 Share Posted March 15, 2013 Hi i have this same problem, only way to print this is change checkboxes in orders state and check last box that say that payment for order is done. Link to comment Share on other sites More sharing options...
aneheli Posted March 15, 2013 Share Posted March 15, 2013 I find solution, put this then you got what you want {$order->payment} 2 Link to comment Share on other sites More sharing options...
Recommended Posts