Custom page with Ajax/API

Highlighted
New Member
19 0 0

Hello Shopify Community!  

 

I need to build a new page restrict to customers, which will have a form to change some customer basic data, like first name, last name, phone, etc. 

 

I'll submit this form and change the information using Ajax / API, through a custom JS file. What is the best way to do that according to authentication and security? 

 

To be honest, I didn't understand very well the Shopify documentation. I've been trying to call the REST admin API, but I don't have success with the PUT method. I also didn't understand how to create a custom APP and call the REST API from that. 

 

Thanks!

 

0 Likes
Highlighted
New Member
19 0 0

I need help to get this information. Please!

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

Hey @gfagnani ,

 

You can look into the following tutorials on how to build a Shopify App in NodeJS that can utilize the Admin API. This should help you get started, but feel free to ask more or make a new forum post if you have any specific questions

 

https://help.shopify.com/en/api/tutorials/build-a-shopify-app-with-node-and-express

https://developers.shopify.com/tutorials/build-a-shopify-app-with-node-and-react

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
1 0 0

So the only way to add/change data for a customer is to create and host a separate app?

 

I need to add a bunch of fields to the customer database, are you saying that isn't possible on the Shopify hosted site?

0 Likes
Highlighted
New Member
19 0 0

@scope123 wrote:

So the only way to add/change data for a customer is to create and host a separate app?

 

I need to add a bunch of fields to the customer database, are you saying that isn't possible on the Shopify hosted site?


Exactly! You cannot change the Shopify fields/data structure. To add these fields that you are saying, you can use meta fields.  But, the problem is, to change any meta field, you need to do it through a custom app because Shopify doesn't allow any POST or PUT method from your store. 

 

Let me know if you have any further questions. 

 

Thanks! :) 

0 Likes