Can Amember skip 2 step checkout with 1shopping cart?

Discussion in 'Payments processing' started by lyle45, Aug 25, 2009.

  1. lyle45

    lyle45 New Member

    Joined:
    Aug 10, 2009
    Messages:
    6
    When a user joins my membership they have to do the following
    1) fill out amember form
    2) confirm order with 1shopping cart
    3) enter billing and address information in AGAIN

    This is a 3 step process. Is there anyway to skip step 2? I know in 1shoppingcart they give two URLs when setting up a product, 1 for two-step checkout and 1 for one-step checkout.

    Also, can amember pass the address information over to 1shoppingcart?

    Thanks,
    lyle
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I've been able to skip step 2 with a hack to the 1sc plugin, no luck on passing address variables.

    Heres the hack:
    In /amember/plugins/payment/1shoppingcart/1shoppingcart.inc.php

    function do_bill($amount, $title, $products, $u, $invoice){
    you'll see the line:
    return $this->encode_and_redirect("http://www.marketerschoice.com/app/netcart.asp", $vars);

    replace it with this:
    return $this->encode_and_redirect("https://www.mcssl.com/app/javanofpp.asp", $vars);

    David
  3. lyle45

    lyle45 New Member

    Joined:
    Aug 10, 2009
    Messages:
    6
    Thanks David!

    That took care of the problem.
  4. cpubgroup

    cpubgroup New Member

    Joined:
    Jul 18, 2007
    Messages:
    3
    fyi - 1shoppingcart 1-step-signup

    For anyone reading this, we are currently testing a 1SC "hack" that allows a one form sign up (the 1sc form) and uses the 1sc integration with amember.

    here's the basics of what we're doing (and so far it works). I am going to experiment with possibly taking a username/pw on the 1sc form (as custom fields) and passing those to amember later.... but for now we're just doing what is described below.

    here's the summary...

    1. Create a script that forwards to signup.php with all necessary variables already filled in in the get/request. The script uses "fake" info and an automatically generated "fake" username (randomly generated) and a consistent fake email, name, etc (like "fakeuser@fakewhatever.com").

    2. The script sets a cookie with the temporary username.

    3. The user pays, and gets returned to a CUSTOM thanks.php page in the 1SC folder. That page does the following:

    - Tries to retrieve the username from the cookie. If it can't find it, it looks up the user by IP address in the amember system and (hopefully) finds a match, and in either case, it gets their user record.

    - Modifies the user record with the POST data that 1SC passes to any php thank you page. It updates email, name, address, etc. from that data for that user.

    - generates a username and password for the user using amember's built in functions.

    - saves the user record and displays a page with their user info, and also emails their user info to them since the original email probably went to the fake/tmp email address.

    That's the sum of it. I wrote it after writing asking how much it would be for the amember folks to do the same, and they told me it wasn't possible.

    So, I did it myself via the above "hack" and it appears to be functioning fine so far.

    One side effect worth noting is that you will have a lot more junk data in amember (a new temporary user for every time someone hits the order link).

    Other than that, doesn't seem to be an issue. We'll see if in the long run it causes problems, and if it does we may have to look at other/better solutions.

    Hope this helps someone.

    Also if you notice any potential issues with the above you might note them here. For me, for now, it appears to be working fine.


    P.S. Forgot to mention, this is COMBINED with the above change to the 1sc inc file so that it does not do the "cart" step in 1sc.

    So it goes ORDER LINK--->PAY---->SEE USERNAME/PW on THANK YOU PAGE.
  5. claude203

    claude203 New Member

    Joined:
    Dec 31, 2008
    Messages:
    1
    cpubgroup,

    Did you ever complete this hack and/or make it available (to people who don't know how to write scripts, etc.)?

    Thank you,
    Claude
  6. cpubgroup

    cpubgroup New Member

    Joined:
    Jul 18, 2007
    Messages:
    3
    Yes, it was finished, we've been using it for a while and it seems to work fine.

    We are moving away from 1shoppingcart eventually so perhaps I can post the code here once we are no longer using it. I'll try to remember to come back and do that.

Share This Page