Need some help. Have this code in PaymentModule.php
in Prestashop:
$params = array(
'{voucher_amount}' => Tools::displayPrice($voucher->reduction_amount, $this->context->currency, false),
'{voucher_num}' => $voucher->code,
'{firstname}' => $this->context->customer->firstname,
'{lastname}' => $this->context->customer->lastname,
'{id_order}' => $order->reference,
'{order_name}' => $order->getUniqReference()
);
I use $params['firstname']
for showing customer firstname
and get nothing. I insert $params['firstname']
in /modules/bankwire/bankwire.php
Please tell me where I make a mistake?
Thanks
In your array you have a
{firstname}
key, but nofirstname
key.If you want to get value, you should use:
$params['{firstname}']
Try
or in the case that volkerk is right, try
there is variables for email template, it's just assoc array, for access use