Giter Site home page Giter Site logo

Comments (4)

WriterDanGaidin avatar WriterDanGaidin commented on September 21, 2024

I guess a more appropriate question in the case of #2 above would be:

Am I doing this account creation thing right?

Is there a different, more direct, way of creating a customer account after a purchase is made? Right now I'm running through this set of steps when a customer clicks the "Finalize Order" button.

  1. Check availability of an account with the provided email address using a Register function call (/rest/cart/register)
    -- If not available, show an error message, (begin again)
    -- If available, or if there is already an account with that email address but it was created that day (handles server errors after checkout is submitted), an account is "created" and the cart is now logged in (proceed to Step 2)

  2. Submit the checkout request (/rest/cart/checkout)
    -- If Checkout fails, begin again
    -- If Checkout completes, all is well ( proceed to Step 3)

  3. Account gets populated by UltraCart after the order is completed

I sometimes tend to overcomplicate things if I'm not careful. Then again, this comment may just offer some more clarification on what I'm trying to accomplish.

Thanks.

Dan

from responsive_checkout.

WriterDanGaidin avatar WriterDanGaidin commented on September 21, 2024

Revisiting this...

At the time I submitted this ticket I was worried about a customer registering an account without completing the checkout process and then being able to use that account as a normal account would. Since then, I've devised a way to validate an account based on the purchase of a membership item, and this concern is now moot.

There is still the issue of the register method that I don't quite understand where making a call to /rest/cart/register returns without any errors if I pass it an email and valid password for an account that has already been made. Is this expected behavior? I'm just not clear on why that would be the case.

Thanks for all your help.

from responsive_checkout.

perrytew avatar perrytew commented on September 21, 2024

Dan,
I reviewed the code. You should be receiving a 400 response code (bad request) with a header UC-REST-ERROR that says "cannot create account. email already exists.". Can you confirm that you do not? There might be a bug there.

from responsive_checkout.

perrytew avatar perrytew commented on September 21, 2024

Closing due to inactivity. Dan, please reopen if the issue still exists.

from responsive_checkout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.