AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started by: Sam_78 on January 09, 2017, 05:35:09 PM
-
Any idea how can I print payment method on invoice $paymentOption tried few things but couldn't make it work
\admin\view\default\template\responses\sale\order_invoice.tpl
Able to change html but not able to display the value of variable $paymentOption = default_COD I am not able to print default_COD
I also tried storing variable in cookie and then using it as php variable but still no success
-
have you be altering core coding? Out of the box - AbanteCart prints the payment method on the email invoice as shown here:
Order ID: [/color]18[/size][/b][/color]
Date Ordered: 06/01/2017
Payment Method: Cash On Delivery
Shipping Method: Flat Shipping Rate
[/size]
[/color]It also shows up on the invoice when access thru the admin side.
So I would suggest you've managed to amend something that is giving you a different result. [/size]
-
llegrand : It doesnt show payment method in my invoice even if looked from admin panel. I am using v 1.2.8 is there any setting that you need to turn on or something?
-
I've figured it out. You have to go to
cart slash admin slash controller slash response slash sale slash invoice.php
Inside:
$this->data['orders'][] = array(
Look for the line:
'total' => $total_data
After the last line in orders add a comma and pament_method_key so it looks like this:
'total' => $total_data,
'payment_method' => $order_info['payment_method_key']
That will add the appropriate data to the orders variable before it gets passed to the invoice.
After that go to edit
cart slash admin slash view slash default slash template slash responses slash sale slash order_invoice.tpl
and add the line:
<?php echo $order['payment_method']; ?>
Where you want the payment method.
Apologies for the awkward formatting; this is a new account so I can't post links or code.