Vat hidden if "My billing information is the same as my delivery information" is checked
upupax - January 20, 2009 - 21:10
| Project: | Ubercart VAT Number |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Your module looks great and it is something I would like to use!
So here is a little bug: checking "My billing information is the same as my delivery information." checkbox, makes all the billing form disappearing, even if the VAT textbox is not filled.
I've seen the problem is $('#' + target + '-pane div.address-pane-table').slideDown(); in uc_cart.js, but I don't know how to prevent it from closing.

#1
I get the same problem, unfortunately I believe that the ubercart JS isn't flexible enought and it was not made to understand custom added fields in a hook_form_alter.
To make it works correctly, I just change the order between the billind and the shipping pane.
It's probably doable but I don't really want to add a complex JS code that copy the VAT number when you click on the button. I think this is the role of the core to understand what are the fields under the pane and copy them properly.
I'm open to others opinion to change my mind, but I'm pretty sure mine is the right way ;)
#2
My opinion is that the VAT number field should be visible with every address because what is now a shipping address can in the future be a billing address. This reasoning becomes specially important when you use the uc_address module.