• Resolved augustinore

    (@augustinore)


    Hello,

    I would like to display in an non-editable form the billing and shipping addresses at the final checkout step, so that the customer can verify these informations before submitting.

    I have tried to play with functions.php :
    add_action( ‘woocommerce_checkout_order_review’, ‘get_addresses’, 10 );
    but I don’t know what function to use instead of “get_addresses”.

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    Hello,

    the whole checkout is one page served by the server. Then the page is split into steps with the help of a JavaScript code.

    When you try to modify things in the functions.php file, the server doesn’t know yet the client’s address. You need to write the address review on the final step with a JavaScript, simply because the address gets modified in the form on the same page before it is sent to the server.

    This is not dependent on this plugin, the answer is valid also if the checkout page is not split into steps (as I’ve seen you posted the same question for the WooCommerce Checkout Manager plugin).

    Thread Starter augustinore

    (@augustinore)

    Thanks!

    For those who are interested, I was able to recover adresses by triggering this kind of javascript function on the “action-next” button :
    function get_addresses() {
    var prenom=document.getElementById(‘billing_first_name’).value;
    var nom=document.getElementById(‘billing_last_name’).value;
    var societe=document.getElementById(‘billing_company’).value;
    var prenom2=document.getElementById(‘shipping_first_name’).value;
    var nom2=document.getElementById(‘shipping_last_name’).value;

    document.getElementById(‘addresses’).innerHTML= “<div class=’row’><div class=’col medium-6 small-12 large-6′><h3>Billing address</h3>” + prenom + ” ” + nom + “<br>” + societe + “</div><div class=’col medium-6 small-12 large-6′><h3>Shipping address</h3>” + prenom2 + ” ” + nom2 + “<br></div></div>”;
    }

    microbie

    (@microbie)

    Hello, sounds interesting. Where do i have to put this code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Billing and shipping addresses at final checkout step’ is closed to new replies.