The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Force Seperate Shipping Address

brucepbrucep Member
in Help edited September 2014
I'm sure it's simple and I'm just missing where to do so, but I need to force the customer to fill in both a billing and shipping address in the checkout.
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @brucep,

    Could you let us know what version you're working with please? The approach is a little different depending what your version is.
  • brucepbrucep Member
    edited September 2014
    @fc_adam,

    version 1.0. My thought is to have javascript change the value of the checkbox to display the shipping address. Is that the right direction?
  • @fc_adam,

    Probably not the prettiest code, but it seems to work.
    jQuery(document).ready(function() {
            $('#use_different_addresses').prop('checked', true);
    	$('#fc_use_different_address').hide();		
    	FC.checkout.displayShippingAddress = $("#fc_address_shipping_container").show();
            }
    

    Still open to better solutions.
  • fc_adamfc_adam FoxyCart Team
    @brucep.

    That would work - but we actually have a little-known built in function to achieve it too:
    FC.checkout.requireShippingAddress()
    
  • @fc_adam,

    Is there a place where all these jquery FC codes are referenced. I couldn't find anything.
  • fc_adamfc_adam FoxyCart Team
    @brucep,

    Unfortunately not. That function was a bit of an undocumented goodie. We're working on improving our documentation moving forward to make that better.
  • @fc_adam,

    FC.checkout.requireShippingAddress() is perfect as it also has the copy billing address functionality.

    Thanks!
Sign In or Register to comment.