Show Billing in Checkout

Is there a way to show the Billing section automatically in checkout for 2.0--instead of the checkbox?
Comments
  • brettbrett FoxyCart Team
    Hi @jwmsales. We can help you with a little customization there, but I'd love to know your use case and why you'd like to do that.

    Do you want to have the checkbox checked by default, or do you want to just always force both sets of address fields to be filled in? Knowing what you're after will help us get you a good solution.
  • Thanks, Brett

    I need the checkboxes checked by default. The site is an older one, but this issue is recurring for the client.

    www.sympathysolutions.com

    Their customer base is mostly older. They almost always ship to a different address and they prefer to have everything laid out before them. They frequently call (once a day) because they can't figure out where billing goes.

    Thanks for the prompt reply,
    Jack
  • fc_adamfc_adam FoxyCart Team
    edited November 11
    @jwmsales,

    Thanks for clarifying. A little javascript can help with that to default the billing address to be active. Specifically, you'll paste the following code into the "footer" textarea of the "Add custom header and footer code to your templates" option, found on the "configuration" page in the Foxy administration:
    {% if context == "checkout" %}<script>
    FC.client.on("ready.done", function() {
    FC.json.use_alternate_shipping_address = true;
    FC.json.use_different_addresses = true;
    FC.Template("checkout").clearOutput();
    FC.checkout.render();
    });
    </script>{% endif %}
    After adding that, you should see the billing address fields displayed on checkout load.
  • jwmsalesjwmsales Member
    edited November 9
    Thanks, Adam, but not getting any changes.

    image
  • fc_adamfc_adam FoxyCart Team
    @jwmsales,

    Following up on our private message to you about this - I've just made a small change to the code I provided previously. The code I added shouldn't have stopped it from working for you - but it just ensures it only adds it to the checkout where it's needed, rather than also to the cart and receipt.

    If you could give it another try - adding it to the option found on the "configuration" page in your store's FoxyCart administration, and ensuring that you're adding it to the correct store - we can take another look for you if it's still not working.
  • Adam, thanks. It is working well now. I appreciate it.
Sign In or Register to comment.