• Resolved paddelboot

    (@paddelboot)


    Hi there,

    Based on the customer address, we are doing a credit rating check. Depending on the result, the customer will have different payment options.

    Therefore we need to move the available payment options to a 2nd form or page that will be displayed AFTER the checkout form has been sent and the background check has been completed.

    Any experience with this?

    Thanks,

    Paddelboot

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    The payment box is updated with ajax, so you could run your check via an action fired during the update_order_review ajax call.

    https://github.com/woothemes/woocommerce/blob/master/includes/class-wc-ajax.php#L298

    Thread Starter paddelboot

    (@paddelboot)

    That looks promising, thanks.

    Thread Starter paddelboot

    (@paddelboot)

    Okay, I had a look into it, but I run into issues:

    – The AJAX request with the form data seems to be triggered at certain intervals. Since we do a credit rating check, this can become an issue, because every check with the remote API is charged at the expense of the client. Even if I only do the check after the last field is filled out, the user might still change/correct his input, which would require a new API request, etc.

    – Is there a way to trigger the AJAX request programmatically?

    – Is there a way to implement a 2 page solution? (1. page: checkout form, 2. page: payment options)?

    Thanks a lot,

    Padddelboot

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Split checkout form into 2 pages?’ is closed to new replies.