Make customer address and phone non compulsory info at checkout?

I’ve been talking with @MyriamBoure @sauloperez and @pierredelacroix about this issue and we have a proposal :tada:

Scope

It seems that the most urgent action needed is to make billing address not compulsory in the checkout form. We’ll talk about the phone field in the details section in another iteration since it seems that there is only 1 person complaining. @MyriamBoure will check with them what’s the real issue and the underlying need.

Coupling

Now that we’ll focus on the billing address we suggest to couple this “setting” to the payment method instead of the enterprise as we think it will allow more flexibility in the future. The idea is to add a new “setting” to the payment method model that will express if the payment method requires a billing address or not.

Implementation

In order to implement this proposal we’ll need to modify both backend and frontend:

Backend

  • add a new billing_address_required boolean field to the spree_payment_methods table (default true)
  • add a checkbox to the views to show / edit the setting
  • check Spree::Order#billing_address validations
  • cover everything with tests

Frontend

In the frontend we’ll need to change the order of the checkout sections to be able to select the payment method before we are asked to introduce the billing address. In this way we can change the JS form validations based on the choosen payment method.

Right now the checkout sections are showed in the following order:

  • Details
  • Billing information
  • Shipping information
  • Payment method

We propose to change it in the following order:

  • Details
  • Payment method
  • Billing information
  • Shipping information

If we all agree on this point we’ll need to develop the following tasks for the frontend:

  • change checkout sections order in JS
  • make billing information validation dynamic based on payment method
  • check the submit request
  • implement the same behavior in /admin
  • cover everything with tests

Estimations

We need to discuss this once everybody agree with the proposed implementation both at product (UX) and technical level.

Who can work on it?

Keeping in mind that the Spree upgrade is a priority, from Coopdevs/Katuma we’ll be happy to help with this and help OFN France.

cc/ @Kirsten @oeoeaio @CynthiaReynolds @lin_d_hop @danielle and so on… :smile:

1 Like

Thanks @enricostn for summarizing all that. I find it very logical to ask first the payment option and then ask the billing address if needed. But of course we are happy with that proposal in France. We will iterate from that on the other aspects (make possible for a hub to check by default if only one payment and shipping options, etc.)
Precision about associating the billing address with payment method : if a buying group with pick up shipping method offers two payment method : pay on invoice or pay by cash on collection, if the user chooses the invoice one the hub needs the billing address to make the invoice :slight_smile:

About the phone, I didn’t manage yet to talk with our user, will share feedback when it’s done.

Hope we can move forward quickly on that, thanks everyone for your feedbacks !

Ok sounds fine to our user to start with billing address and iterate from that if needed, they are in Corea at the moment so hard to talk to them for now :wink:

1 Like

hmmm. This seems a bit ‘wrong-way around’ to me. I think it’s pretty standard to do shipping method first because it’s weird to ask about payment before shipping decisions that might affect cost have been made. And then it’s payment method, process order, done. Putting them the other way around feels wrong.

Is there any reason it can’t be in order of Details, Shipping information, Payment method (and billing info if needed) ?

Is it worth running this past Yuko? @danielle @sstead?

Other than that it seems fine to me

Hum… I understand your point @Kirsten that it feels logical to add first about the shipping option, if added fees it’s added to total, then payment option, if added fees added to total, then when click on “checkout” the payment box opens if online payment.
@enrico can’t we imagine that the entreprise can say that by default address is not asked, and make it possible in the payment method to make address compulsory, so after shipping option stage, if address not filled in, if choose after a payment method like “invoice” that requires shipping method, the user is sent back to shipping section and has to fill in the address?
OR, like if you have a “delivery type” shipping option, you have a box on the delivery address and as if it’s same as shipping address, if you choose a payment method where address is compulsory, and the address has not been filled in above, it can open again the billing address fields in the payment section so that it can be filled in there, with a message like “a billing address is required for that payment method” ?

What do you think about that @enricostn ?

I like the latter suggestion. Being jumped up the page (first option) would be jarring

In my proposal we can still have Shipment info right after Details, the important part is that we choose a Payment method before we ask (or not) for a billing address.

Yes, that sounds logical. So if I sum up we have:
1- General info (name)
2- Shipping method choice
2.1- depending on shipping method choice, ask delivery address
3- Payment method choice
3.1- depending on payment method choice, ask billing address
4- confirm checkout and proceed to payment (if online payment)

So when a hub set up a payment method he will have to determine if he asks the billing address or not.

Do we agree on that @Kirsten @enricostn ?

Then we can see after we have sorted that out if we want to allow a hub not to ask a user to check the shipping and/or payment method if only one proposed, but let’s take this step by step.

This is the current behavior, right @MyriamBoure ?

One thing comes to mind… I investigated what Zones were as part of instructions for new instances. This is what I found at the time …

“What do Zones do? When the customer gets to the final stage of checkout and enters their address, the system checks which zone they are located in. This then dictates which taxes are applied and which Shipping Methods are available.”

If this is the case, the customer needs to indicate their location before shipping methods are filtered and offered to them?

hmmm. given the current experience with spree upgrade, and the likelihood that something like zones would be very useful for some instances, I think we should really try not to break it!

@enricostn yes this is the current behavior BUT today it’s stage 3 as 2 is “billing information”.

@sstead I got your point, I don’t think any instance use this zones thing today (as VAT management is not adapted to our needs) but for sure in the discussion we had about VAT overhaul and first spec we will need them.
I understand that in some cases the shipping option will be charged with the VAT of the “emission zone” and some other of the “reception zone” but this depend on the delivery address, not of the billing address I guess… I’m not sure, I guess we have to dive again in the VAT rules in the US, Canada, etc. So should we just postpone that for after the Spree upgrade is complete and we have deep dived into the VAT thing ?
I think the way we will use the “zones” will change quite a bit in the VAT overhaul so probably we’ll find another way around to make checkout more adapted to hubs’needs…
@enricostn can you confirm that the dirty solution @pierredelacroix had first found is too dangerous (risk to break things) and we should then just wait for now on that ?