Hi,

I tend to find that most users would like their billing and delivery addresses to be the same, so it makes sense to make this the default behaviour.

Unfortunately, the JS that powers this doesn't listen to the checkbox being checked by default, so that's not an option. There's some hacks out there that I've used before:

http://www.ubercart.org/forum/support/9447/assume_billing_shipping_default
http://www.ubercart.org/forum/support/6830/delivery_and_billing_informat...

But these aren't really ideal.

So I've created a patch that makes a new checkbox option in the checkout settings to do this by default. It required a minor change to the Javascript to support this.

A side effect of the uc_cart-side changes is now if there's a validation error when the addresses are the same, it doesn't uncheck the checkbox again, which our users find confusing. It doesn't solve the problem of reporting the field errors twice though.

Hope this is helpful for someone and/or can make it into core!

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

http://drupal.org/project/uc_checkout_tweaks includes this feature (and more!)

neilnz’s picture

I see it implements it with a second JS load event, which I guess works fine too. That's how I used to do it.

I still think this belongs in core though, since it's a fairly minor change that makes Ubercart more useful out of the box.

I'm generally not a fan of these big Ubercart contrib modules that do more than one thing (eg. UC Power Pack), even though they contain useful features, it's hard to get just the ones you want.

Thanks for the pointer though, I'll have a closer look at the server-side bits of that code.

bwynants’s picture

somebody converted this for 7.x?

Status: Needs review » Needs work

The last submitted patch, ubercart_default_copy_address.patch, failed testing.

TR’s picture

Version: 6.x-2.4 » 7.x-3.x-dev

New features should go into Ubercart 7.x-3.x first, then be backported to 6.x-2.x if needed.

longwave’s picture

Title: Support to copy the billing -> delivery (or vice versa) by default (patch) » Support to copy the billing -> delivery (or vice versa) by default
Status: Needs work » Active
sambonner’s picture

Rerolled patch to apply on top of 2.13.