prestshop -需要在payment.html文件中添加额外的变量


Prestashop - Need to add extra variables in the payment.html file

我试图在payment.html文件中添加变量,但无法找出变量是从哪些文件传递的。

当前有变量正在传递:total_paid,我似乎无法弄清楚这个变量是从哪个文件传递的

总算弄明白了

它在orderHistory文件类/order/orderHistory.php中

检查addWithemail函数并在$data数组中添加新字段:例子:

        $data = array(
            '{lastname}' => $result['lastname'],
            '{firstname}' => $result['firstname'],
            '{id_order}' => (int)$this->id_order,
            '{order_name}' => $order->getUniqReference(),
            '{order_receipt}' => 'R'.sprintf('%06d', $order->id),
            '{order_invoice}' => 'W'.sprintf('%06d', $order->id),
            '{order_date}' => date('d/m/Y')
        );