"Billing same as" copies shipping fields not rendered on billing

Created on 2 May 2022, almost 3 years ago
Updated 30 September 2024, 6 months ago

Problem/Motivation

When a custom field has been added to a profile, but is only rendered/displayed on the Shipping, it is "copied" to Billing even if Billing does not render that field. This is slightly different from the scenario described (and worked-around) in #3191764: Prevent extra profile fields to be duplicated in the "My shipping is the same as my billing info" fieldset. β†’ .

Steps to reproduce

  1. Add "Delivery instructions" field to config/people/profile-types/manage/customer/fields.
  2. Under "Manage form display", expand "Custom display settings" and check both "Billing" and "Shipping". Save. This is the core difference between this issue and #3191764: Prevent extra profile fields to be duplicated in the "My shipping is the same as my billing info" fieldset. β†’ . The other issue says "use a different profile type entirely" or "use code". This particular approach, though, is using the core-provided options for form display of a Profile.
  3. Under "Manage form display", add "Delivery instructions" ONLY to the Shipping form display.
  4. Under "Manage display", add the "Delivery instructions" field to the "Default" view mode.
  5. Add a product and checkout. Under "Shipping information", fill in "Delivery instructions.
  6. UNCHECK "My billing information is the same as my shipping information." The billing fields load in and, as configured, the "Delivery notes" field does not show up. So far so good.
  7. CHECK "My billing information is the same as my shipping information."
  8. Fill in your shipping and payment information. Then "continue to review".
  9. "Delivery instructions" and the filled value show for both Shipping and Payment information.

Proposed resolution

If a field is not rendered in Billing, it should not be copied from Shipping.

OR:

Remove the ability to enable different "Billing" and "Shipping" custom display settings, so that people are steered to the "working" approach of #3191764: Prevent extra profile fields to be duplicated in the "My shipping is the same as my billing info" fieldset. β†’ (i.e. use a different Profile type for Shipment types).

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States morbus iff

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @Morbus Iff and @vipin.j is this still valid? Then it should probably be a Merge-request now and should have a test to show the issue?

Production build 0.71.5 2024