Allow existing customers to edit their contact info

Created on 9 June 2017, about 8 years ago
Updated 15 May 2024, about 1 year ago

Problem/Motivation

If a logged in user buys something, they can't edit their email address during checkout. New Customers can. Ideally, existing customers should be able to edit their contact info. This is particularly useful for allowing administrators to place orders on behalf of others.

Proposed resolution

Provide configuration to allow the contact info (emails) to display on the checkout form for authenticated users if desired.

Remaining tasks

Testing
Extend configuration to be set by role rather than just for all "always"

User interface changes

New configuration item.

Feature request
Status

Needs work

Version

2.0

Component

Checkout

Created by

🇺🇸United States Greg Boggs Portland Oregon

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 year ago
    793 pass
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 year ago
    793 pass
  • 🇳🇿New Zealand RoSk0 Wellington

    Turned out that we are running this in production for a good five years now! So +1 for RTBC from me.

    Created a merge request with the patch from #2.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 year ago
    793 pass
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 435s
    #173736
  • Pipeline finished with Success
    about 1 year ago
    Total: 531s
    #173742
  • 🇺🇸United States willardb

    I apologize if this is not the best place for this, but I wanted to say

    A) thank you for the patch and
    B) although I recognize everything discussed here is for Commerce 8.x-2.x-dev, I am using 3.0.1 as of today and I updated the patch to handle a difference introduced in 3.x in this commit to OrderRefresh.php in 2021. Every time the order is refreshed, the email address for the authenticated user is syncd with the order email, which totally makes sense most of the time. But it doesn't make sense if you're allowing existing customers to update their contact info during checkout, so here's an quick updated patch that comments out the relevant bit in OrderRefresh and includes the rest of the changes provided in the original patch adjusted for a few other insignificant changes for anyone who finds this and is using 3.x.

  • 🇺🇸United States willardb

    I apologize if this is not the best place for this, but I wanted to say

    A) thank you for the patch and
    B) although I recognize everything discussed here is for Commerce 8.x-2.x-dev, I am using 3.0.1 as of today and I updated the patch to handle a difference introduced in 3.x in this commit to OrderRefresh.php in 2021. Every time the order is refreshed, the email address for the authenticated user is syncd with the order email, which totally makes sense most of the time. But it doesn't make sense if you're allowing existing customers to update their contact info during checkout, so here's an quick updated patch ( commerce_checkout-v3.x-allow_existing-customers-to-edit-contact-info-2885044-3.patch ) that comments out the relevant bit in OrderRefresh and includes the rest of the changes provided in the original patch adjusted for a few other insignificant changes for anyone who finds this and is using 3.x.

  • 🇺🇸United States Greg Boggs Portland Oregon

    Heck yea. Team work in the open source community.

  • 🇮🇱Israel jsacksick

    Instead of commenting out the part where the order email is synced, perhaps we should flag the order from the pane?
    So basically, something like:
    $order->setData('customer_email_overridden', TRUE);

    This way we could skip the email refresh, when this data flag is set?

  • Status changed to Needs work 2 days ago
  • 🇮🇱Israel jsacksick

    jsacksick changed the visibility of the branch 3.x to hidden.

  • Pipeline finished with Skipped
    2 days ago
    #538887
  • Pipeline finished with Skipped
    2 days ago
    #538889
    • jsacksick committed 0a7c90c8 on 3.x
      Issue #2885044 by rosk0, jsacksick, Juterpillar, willardb, greg boggs:...
  • 🇺🇸United States willardb

    That is much better in every way. Thank you so much!!

  • 🇮🇱Israel jsacksick

    I'm wondering if I should only set the data flag for logged in customers. Perhaps no need to store extra data for anonymous customers... What do you think?

    • jsacksick committed d925fc45 on 3.x
      Issue #2885044 followup: Only set the 'customer_email_overridden' flag...
Production build 0.71.5 2024