OTO plugin - One Time Offer

Discussion in 'Customization & add-ons' started by olliejames, Jan 13, 2009.

  1. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    The only thought that comes to mind is whether cookies might be involved. On my setup, customers are logged in after they go through the signup and payment processes.

    Here's something that may indicate how strange these problems can be -- Every once in a while, my mailing list software won't display subscriber data on a particular page. To fix this problem, I have to clear out my site cookies. Here's the rub -- that software doesn't even USE cookies! Go figure.

    At the moment, I'm having difficulty reading SESSION variables in Drupal after members log in, but I'm sure that has something to do with how Drupal uses SESSION variables itself. There may be a conflict in my situation.

    Reading back, it seems the objective you're working towards is to offer an upsell based on the member's order history. One thing that would at least get you closer to that goal would be to set up OTOs based on the product just purchased, which can be done through the thanks.php page. I found a few solutions to this on the forums here.

    Another possible solution would be to do what I did to get around the problem I'm having with SESSION variables. In aMember's login function, I added a bit to store a cookie with the user data, which I pull when I need it. This was a 1 or 2-line addition. If nothing else, this will give you the member ID to use in pulling order data from the database. (I know I'm assuming a level of PHP skill here. If this is beyond you, I apologize, and suggest you could hire someone to help.)
  2. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    I just had another idea. You asked about setting a destination URL with the login link.
    I recall seeing something like that. Here's something from my notes.

    See if this works for you:

    Code:
    <a href="/amember/login.php?amember_redirect_url=http://www.samedomain.com/upsell-page.html">
  3. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    THAT IS AWESOME!!!

    I checked out the code and that appears to do exactly what I want it to do.

    [I do have PHP experience. I've made many customizations and fixes to the aMember code. I've also hired programmers to do some bigger things, but I know may way around. :)]

    Thank you SO much!
  4. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    Glad I could help.

Share This Page