SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Glasgow
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php checkout assistance

    ok, i have a checkout page on a site i'm building.

    hopefully to increase customer conversion, i'm removing the need for customer registration prior to checkout.

    what i have on my checkout page is 2 forms. one is for existing customers, the stick in their email address and it pulls up their existing details, shipping address, tel no.

    if that form finds their email address it populates the 2nd form. if not then the customer has to complete the 2nd form manually.

    now here's the thing I'm at a cross roads with, if the customer is new, I want their details to be passed to my database (simple enough insert record), but need to check if the email address already exists, if it does then customer details shouldn't be passed to the database and user should be told

    however at the same time, that 2nd form also has to post its contents to the payment gateway.

    Can I achieve both objectives using the same form?

    Thanks,
    S

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Glasgow
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shameless bump up

  3. #3
    SitePoint Zealot
    Join Date
    May 2006
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could give the user the option to login at the top of the form, or before you even display the form. Then you could check to see if the person is logged in on the form page and if they are get the info from the DB and populate the fields with the data.

    When the user submits the form, if the user is logged in process the order. Or if the user is not logged in do a simple SELECT on the database with your clients infomation in it and check to see if the email is being used. If the email is being used then don't process the order and give the user a error.

    I can't provide you with any code because I don't know how your system works.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •