,胡克在V1.6中OrderHistory僅用於:: changeIdOrderState由:
Hook::exec('actionPaymentConfirmation', array('id_order' => (int)$order->id), null, false, true, false, $order->id_shop);
所以,你必須在到$ params的id_order。掛鉤通常增加Exec中的Cookie和車:
if (!isset($hook_args['cookie']) || !$hook_args['cookie']) {
$hook_args['cookie'] = $context->cookie;
}
if (!isset($hook_args['cart']) || !$hook_args['cart']) {
$hook_args['cart'] = $context->cart;
}
但是,當有疑問,而如果後續代碼var_dump或同類者不起作用,我用的是
file_put_contents("file.log", print_r($params, true) . PHP_EOL, FILE_APPEND);
它保存到文件中的變量。如果在admin中調用使用它的函數,該文件位於admin文件夾中。
請試試看,非常感謝! – Ieuan