Forum
Shop Customer Information
Hi,
After a customer has registered, I would like to access their details as an array using skip-template
. I am not sure how to get at this information - I need email, first name, last name and both the shipping and billing addresses.
What I am trying to do is pre-populate the customer_create_passwordless
form for if the customer wants to change their details after logging in.
That form is for creating a customer, so you don't want to use it for a logged in user at all.
You should be able to use the standard edit form.
Ah ok - so I would just use
Still I would like to populate this with their data if possible. If they just wanted to change the delivery address country for example I don't want them to have to re-input all their other information. Is this possible?
Actually that
perch_shop_registration_form
doesn't seem to be right for the update form, it is not updating. Do I need something different there?perch_shop_customer_edit_form()
should be good for editing the customer.perch_shop_edit_address_form()
can be used for editing a specific address.Hi Drew,
I have tried
perch_shop_customer_edit_form()
using the standard template. When I make changes and hitUpdate
I get a thanks message, but the details are not updated - when I go to select delivery options (which is on a separate page), the address and details have not changed from what was originally entered.I am using passwordless checkout if that makes any odds?
This looks like the pertinent part of the debug message:
These values are the new ones I have entered, so it is doing something, but the changes are not persisting beyond that page.
Update - the customer details are changing but the address details are not, using that standard form.
Can you show us what you're doing?
I am trying to replicate a Shopify-esque checkout process, to prove that Perch can provide the same functionality. These are the wireframe design layouts:
Cart
Checkout
Delivery Options
Payment
At the moment when people return to the checkout page they are logged out, to facilitate them using the
customer_create_passwordless
form again to make any changes. This isn't ideal, so I am checking whether they are logged in, and if so to show theperch_shop_customer_edit_form
insteadIf you look at the checkout process here:
A Fine Pair Of Shoes
That is the process I am tasked with emulating with Shop, with the same ease of switching back through steps and making changes. As you suggested previously I think I will need to use
pushState
and other fanciness to achieve it, but I would really like to get it working as I am being pushed to switch over to Shopify which I don't want (they never sent me any stickers!)I meant are you able to show us the code you're using to invoke the form that isn't doing what you want it to do?
Ah ok. This is my page:
And it's this part that isn't working?