Customer edit account details

Highlighted
New Member
5 0 0

Hey everyone,

I want to give the customers the ability to edit their account informations.

I've set up a form in the account template but i couldn't find anywhere an endpoint that allows me to do that..

I could send an admin api request but that would mean writing the api key + password in my liquid files, which looks like a bad idea.. I thought about making my own backend that would consume the api, but even in that case, I need to check if the customer is logged in in my backend so that no customer changes the data of another customer.

Do you guys have any idea on the RIGHT way to do that ?

0 Likes
Highlighted
Excursionist
21 3 5

can you share what code you have written on account template page

0 Likes
Highlighted
New Member
5 0 0

I'm basically having two containers, #account-container that contains the account infos and #edit-container that contains the edit form, then when i submit the form, i want to edit the customer's informations.

0 Likes
Highlighted
New Member
5 0 0

This is starting to get a little urgent, can anybody help please ?

0 Likes
Highlighted
Shopify Expert
498 9 96

I would recommend doing this with an app like, Customer Fields.

Highlighted
New Member
5 0 0

Hey, isn't there any way to do it without having to pay for an app because that's literally the only thing i want to do ? (I don't need the other features )

Can't I just send an api request through ajax in my liquid templates ? 

0 Likes
Highlighted
Excursionist
21 3 5

Definitely, You can update customer details by calling Api. 

Apis available at https://shopify.dev/docs/admin-api/rest/reference/customers/customer.

0 Likes
Highlighted
New Member
5 0 0

Yes but if I use that, i'll have to write the api key and password in the js of my liquid templates... 

0 Likes
Highlighted
Shopify Expert
498 9 96

The customer can update their addresses (edit address form) and password (password reset form) themselves. The only way they can update their email or name is through the API or have someone do it for them in the admin upon request. For API edits, you can either build your own app or pay for one that someone else built.

0 Likes