Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I have chosen to hide the Billing Information pane (since it is automatically pulling the address info in from the Shipping Info pane, and this particular product only requires a shipping address), but two fields from the Billing Information pane are still appearing: Saved Addresses and State/Province. It only appears to happen when a user is logged into their account. How can I get those two fields to be hidden along with the rest of the Billing Info fields for this one product?
Thanks!
Comments
Comment #1
arski CreditAttribution: arski commentedhmm, that's a weird one.. are those two fields standard Ubercart ones or do you use some additional module to get them to appear? I can imagine whe Saved Addresses would not be inside the actual Billing pane, but whe the State field is showing is very weird..
Comment #2
hockey2112 CreditAttribution: hockey2112 commentedThe "Saved Addresses" field is part of the Ubercart Addresses module. The "State" field is part of the standard Billing Address info.
RE: the "Saved Addresses" field, can that easily be lumped into the hideable fields, or would take significant programming to accomplish?
Comment #3
arski CreditAttribution: arski commentedwell, I imagine they add their stuff somehow via JS or either way outside the actual pane, thats why hiding the pane doesn't hide that. I would recommend you taking it up with them, as there is nothing this module can do if the object that needs to be hidden is not a pane and/or is dynamically generated with JS outside of a pane.
The state field is something weird indeed. I'll take a look.
Comment #4
hockey2112 CreditAttribution: hockey2112 commentedOK, thank you!
Comment #5
MegaChriz CreditAttribution: MegaChriz commentedThe reason the fields are shown is because Ubercart Addresses 6.x-1.x is adding them by using a form alter. It checks for the pane setting itself to see if the pane is there:
I've posted a patch in #1879278: Conflict with Ubercart Product Checkout Panes module? that replaces this check with a check if the pane exists in the form:
I think this issue can be closed then, but I noted above for reference. Maybe there are other modules that check the pane enabled setting directly and take actions based on that.
@hockey2112, #2
This is not complete true. Ubercart adds this field too when a customer with previous orders checks out (and either Ubercart Addresses is not enabled or the customer has no addresses in his/her address book).
Comment #6
arski CreditAttribution: arski commentedThat makes a lot of sense, thanks for the patch!
@hockey2112 - let me know if the patch has worked for you and/or if it has solved both your problems (probably just the one, but in any case..)
Cheers
Comment #7
arski CreditAttribution: arski commentedClosing for lack of a followup - if you're still encountering some problems, feel free to reopen.
Comment #8.0
(not verified) CreditAttribution: commentedmore details.