Single page order submission ("checkout") for a site that doesn't use addresses or payments #3061
Unanswered
thisisjamessmith
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to make a single page "checkout" process in Commerce for a site that won't take payments, and also doesn't need to collect addresses. What it does need is the option for users to register an account during checkout. I assumed this would be very straight-forward in Commerce but I've come across a lot of problems.
Specifically, I want all users (regardless of whether or not they tick the box to register an account), to have their User element populated with their name. The only way I've found to do this successfully for users who tick the box is to have a two-stage process where they first add their email address and then full name into a field named
billingAddress[fullName]
, along with some dummy hidden billing address fields to appease Craft's required fields for billing addresses (even though I don't really need a billing address), in a form that uses thecommerce/cart/update-cart
action. Then in the second step they can choose to tick theregisterUserOnOrderComplete
box and complete their order using thecommerce/cart/complete
action.Problems:
registerUserOnOrderComplete
box, the Full Name field in their User element is never populated.Have I missed some simple/obvious solution to this? It seems like a lot of work for a relatively simple thing.
Some related discussion here: https://discord.com/channels/456442477667418113/456442867163070466/1062341996729081896
There is also a semi-related issue here, which prevents me from using
firstName
andlastName
as separate fields in this setup, as is possible when dealing with Address elements: #3015Beta Was this translation helpful? Give feedback.
All reactions