本文介绍了展会$参数数组('{}项目'=> ...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要一些帮助。在 PaymentModule.php
这code $ p中$ pstashop:
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()
);
我用 $ PARAMS ['名字']
为显示客户姓
键,什么也没得到。我插入 $ PARAMS ['名字']
在 /modules/bankwire/bankwire.php
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?
感谢
推荐答案
在你的阵列,你有一个 {姓}
键,但没有姓
键。
In your array you have a {firstname}
key, but no firstname
key.
如果你想获得的价值,你应该使用: $ PARAMS ['{}名字']
If you want to get value, you should use: $params['{firstname}']
这篇关于展会$参数数组('{}项目'=> ...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!