Support

Home Forums Event Espresso Premium EE4 SPCO Checkout Auto-Fill Address from Contact List (NOT WP User Integration)

EE4 SPCO Checkout Auto-Fill Address from Contact List (NOT WP User Integration)

Posted: December 28, 2016 at 7:37 pm


jmahan

December 28, 2016 at 7:37 pm

Without using WP User Integration how can I accomplish the following in EE4 Single Page Check-Out:
================
1) First Time Primary Registrant (Scenario-1)
================
1A) Primary Registrant is NOT in Contact List (based on exact Personal Info)
1B) Event collects Personal Info. Only for Primary Registrant no Additional Registrant Personal Info. or Address collected
1C) Payment Address will be added to Contact List after Payment Processing
================
2) Returning Primary Registrant (Scenario-2)
================
2A) Primary Registrant is in Contact List with Address
2B) Event collects Personal Info. Only for Primary Registrant no Additional Registrant Personal Info. or Address collected
2C) Personal Info (First Name, Last Name and Email) exactly match Contact List
2D) Payment Address will be auto-filled to Payment Form from Contact List
2E) If changed during Checkout, Payment Address will be used to update Address in Contact List after Payment Processing
================
3) Returning Primary Registrant (Scenario-3)
================
3A) Primary Registrant is in Contact List with Address
3B) Event collects Personal Info. and Address for Primary Registrant no Additional Registrant Personal Info. or Address collected
3C) Personal Info (First Name, Last Name and Email) exactly match Contact List
3D) Contact Address will be auto-filled in Registration Form from Contact List
3E) If changed during Registration, Contact Address will be used to update Contact List before Proceeding to Checkout
3F) Payment Address will be auto-filled in Payment Form from Contact List
3G) If changed during Checkout, Payment Address will be used to update Address in Contact List after Payment Processing
// END //


Josh

  • Support Staff

December 29, 2016 at 12:16 pm

Hi there,

Some of the above items already happen, for example 3E, Contact Address will get an update if they input a different address than what they input previously.

Beyond that if you need the other items like populating Contact fields from the billing fields, or also auto populating billing fields directly from stored contact info, you can inquire with a recommended developer to build an add-on to your specification. The add-on could make use of some of the same hooks that the WP User integration uses to change the form inputs during registration and checkout.


jmahan

December 29, 2016 at 12:46 pm

THX Josh,

So it looks like EE4 Contact Address and Payment Address are not currently connected in any manner. Also, it would be great if you can identify any hooks I could use to read/update Contact Address and Payment Address and to auto-fill forms. I’m using Authorize.net AIM


Josh

  • Support Staff

December 29, 2016 at 1:12 pm

FHEE__EE_Billing_Attendee_Info_Form__populate_from_attendee
and
FHEE__EEM_Answer__get_attendee_question_answer_value__answer_value

If you see a place in core code that could use an additional action hook or filter hook, we welcome pull requests on Github:

https://github.com/eventespresso/event-espresso-core/


jmahan

December 29, 2016 at 2:32 pm

THX again Josh. The 2 hooks look good. Is there any more documentation showing how/where to invoke the hooks. Also, I’m still trying to understand how SPCO handles Attendee and Billing Address Data.

So far, it appears Primary Attendee Address Data is updated by the Billing Process (per this content:
https://eventespresso.com/features/intelligent-single-page-checkout/ )
, but there is no standard auto-fill of Attendee or Billing Address


Josh

  • Support Staff

December 29, 2016 at 2:51 pm

The best place to learn how to use the hooks is by checking the source code to see how those hooks work in the context of the code they are in. The same goes for understanding how SPCO handles the form field data.


jmahan

December 29, 2016 at 3:02 pm

I will be bleary-eyed reviewing EE code:) It appears the 2 php programs need to be located in /includes/models/ but I can’t find the directory?

Also, it would be good if you can confirm if Primary Attendee Address Data is currently updated by the Billing Process. If yes, will that conflict with the new code?


Josh

  • Support Staff

December 29, 2016 at 3:10 pm

No, it doesn’t, and that’s not expected. A billing address is just that, a billing address. A Contact address is a separate piece of information. So for convenience, the address information from the primary registrant’s registration form will get passed to the Billing form. If they change the fields there on the billing form, it does not change the data in the Contact record.

It appears the 2 php programs need to be located in /includes/models/ but I can’t find the directory?

I’m not sure where you’re getting this information from, and /includes/models/ isn’t a valid directory. What I can suggest is you contract with a developer that’s familiar with extending Event Espresso.


jmahan

December 29, 2016 at 5:13 pm

THX Josh, I’m almost where I need to be.

Before diving more into the code I’m hoping to get a clearer understanding of how the standard EE4 works pertaining to Contact and Payment Addresses to decide if/what to change (I don’t want to debug 2M lines of code like Nedry in Jurassic Park;)

THIS IS MY CURRENT UNDERSTANDING:

3D) Contact Address WILL NOT be auto-filled in Registration Form from Contact List (with exact match of Personal Info)

3E) If changed during Registration, Contact Address WILL be used to update Contact List before Proceeding to Checkout

Josh said:
3E, Contact Address willL get an update if they input a different address than what they input previously.
============
3F) Payment Address WILL be auto-filled in Payment Form from Contact List

Josh said: So for convenience, the address information from the primary registrant’s registration form will get passed to the Billing form.
John says: My test system doesn’t auto-fill Payment (will research further)
===============
3G) If changed during Checkout, Payment Address will NOT be used to update Address in Contact List after Payment Processing

Josh said: If they change the fields there on the billing form, it does not change the data in the Contact record.
John says: PLEASE CONFIRM THIS PER ==>
https://eventespresso.com/features/intelligent-single-page-checkout says:
Updating a Contact’s Personal Information
When a registrant’s first name, last name and email address perfectly match that of an existing contact profile, that existing contact address information is also updated to remain as accurate and up-to-date as possible.

John Says: This appears to be in context of Billing, but it may be referring to Contact Registration (Confusing?)
===============
John Said: It appears the 2 php programs need to be located in /includes/models/ but I can’t find the directory?
Josh Said: I’m not sure where you’re getting this information from, and /includes/models/ isn’t a valid directory.
John Says: Sorry for the confusion. I have located the PHP code. I was sidetracked because // Location: /includes/models/EEM_Answer.model.php is at the bottom of the PHP code.
// END //


Josh

  • Support Staff

December 30, 2016 at 8:05 am

For item 3F, you said it the billing form isn’t autofilled with address details. Does the registration form include address fields?

For item 3G, I’ll add some emphasis to what’s mentioned in the product page, and try to explain a bit more:

When a registrant’s first name, last name and email address perfectly match that of an existing contact profile, that existing contact address information is also updated to remain as accurate and up-to-date as possible.

The context, and where the contact info is checked, is during the registration form step. The billing form information for the payment is not tied to the Contact.

The support post ‘EE4 SPCO Checkout Auto-Fill Address from Contact List (NOT WP User Integration)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso