mercredi 22 avril 2015

call external php file from shopify registration page

i've been searching around for a way to call a php file on either the login or registration page of shopify.

I need to connect to another system and validate my users details and then if the users is a valid member assign the wholesale tag to the member otherwise they should remain a normal shopper.

I've tried ajax but I forgot about 'cross domain' calls so that did not work. I've also started to read up on shopify apps but it seems to be used mainly to interact with the shops database and not with external scripts or am i missing something.

What i want to do is take my users login details, do a quick checkup if they are wholesale members and then update their tag before they register.

or would it be better to perhaps have my registration page outside of shopify and perhaps do what i need with the details and then try to register the users using an API?

---------------------- EDIT --------------------------

Ok so after looking into webhooks and almost getting what i needed from that it feels as if the API will be the only way forward.

When using webhooks and the Customer creation event i received alot of info that i needed, but for me to verify the users i needed both their UN and PW and for webhooks just did not supply that for me.

So i will update my registration.liquid page to basically be a container for my iframe.

Aucun commentaire:

Enregistrer un commentaire